Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
GoHugo theme that generates native AMP pages with PWA, structured data, service workers, and i18n out of the box.

A Jamstack blog starter built with Nuxt 3, Storyblok, and Tailwind CSS — a demo repo for building fast, headless blogs.
Amperage is a GoHugo (Hugo) theme that generates native AMP pages with built-in PWA support, structured data, service workers, and multilingual i18n out of the box.
Amperage is a theme for the static site generator GoHugo, created by asurbernardo and published on GitHub. It takes standard Hugo markdown content plus config.toml settings as input and produces AMP-valid HTML pages, a service worker file, and a JSON search index at build time. The theme is built for speed and low weight: its default CSS is only 5 KB including code highlighting.
These features are all provided by the theme without extra services or plugins.
srcset attributes are generated, giving each device an appropriately sized image.amp-adsense shortcode, comment systems via an embeddable iframe (a Disqus example is provided), and social share buttons with OGP/Twitter card tags are all included.assets/custom.scss file to your project lets you append your own styles that get transpiled, minified, and merged automatically.Amperage is aimed at Hugo users who want AMP validation, PWA behavior, and SEO metadata without assembling multiple plugins.
With the theme installed and configured, you can carry out these concrete tasks.
hugo serve to start building pages that meet the AMP HTML spec.config.toml and use the amp-adsense shortcode to insert AMP-compliant ad units.commentsEmbedUrl and the theme appends id and url parameters so a service like Disqus can display the correct thread.Amperage uses Hugo's build pipeline to transform Markdown content and configuration into static AMP pages. After cloning the repository, you copy the exampleSite into a new Hugo project, move the theme into themes/amperage, and run hugo serve to preview. Configuration is centralized in config.toml, where you set languages, menus, analytics, AdSense, comments URL, and structured data values; the theme reads these at build time and emits the final HTML. For cross-domain service worker installation, you override the static/install-sw.html file with an amp-install-serviceworker component pointing to the correct service worker URL.
These answers reflect the setup details described in the theme's README and example configuration.
Yes, Amperage includes i18n support. The example configuration shows English and Spanish content directories, and each language can have its own title, description, and menu structure.
Create an assets/custom.scss file in your Hugo project. Amperage picks it up automatically, transpiles and minifies it, and appends it to the default styles, which are already only 5 KB.
Because of AMP restrictions, comments must be hosted on a different domain. Set a commentsEmbedUrl in config.toml, and Amperage will embed that URL in an iframe at the end of each post, passing id and url parameters so your comment system can identify the thread.
Yes. Add your approved AdSense publisher code to adsensePublisher in config.toml, then use the amp-adsense shortcode with slot, width, height, and layout parameters to place a compliant ad unit.
Amperage is configured to produce a JSON search index via the SearchIndex output format. You need to wire it up to your preferred search front-end, but the index file is generated automatically at build time.
