getting started with gohugo-amp
This Hugo theme is supposed to be a starter theme to make it easy to adapt to Google’s AMP-Project. Included in the theme are 40+ shortcodes and partials making it a pleasure to embed AMP-Elements within your content files or your template.
Go to the directory where you have your Hugo site and run:
$ mkdir themes $ cd themes $ git clone https://github.com/wildhaber/gohugo-amp.git $ rm -rf gohugo-amp/.git
After installing the theme successfully, we recommend you to take a look at the kitchen sink. You find extensive documentation and a demonstration of all shortcodes and partials there.
Read more about the
config.toml in the configuration example. You will find explanations how to setup General AMP Configuration, Theme Appearance, using AdSense, Configure Analytics with custom Triggers and many things more.
AMP does not allow you to include CSS styles with the regular
link rel='stylesheet'-tag we need to embed the CSS in the header section.
For this case add a file in your regular
stylesheet.html. In this file you can write pure CSS (no
Since its not a cool idea have to write your stylesheets in an HTML-File we provide an automated process rendering your Sass output directly in this file. You can read more in our Guide about Styling in the documentation.
Why we had to do this process you can read in the official amp-project documentation.