Converting blog to AMP gives blank page

I’m trying to convert my Sensr.net blog and my personal blog to use AMP AMP themes and I’m using the gohugo-amp theme.

When I run hugo -v I don’t see any errors, but the page that renders is blank. If I switch the theme back to amp or beautifulhugo it renders fine. I’m using hugo 0.47.

Any tips on how to debug this? If I go into the Chrome console I can see that the header is getting created and the body is there but has no content.

I’m new to AMP and still a novice when it comes to Hugo templates…

Cheers,
Adam

Check out Requesting Help and link to your repo. :slight_smile:

Sure, thanks for the suggestion! I simplified this even further.

I’m using the quickstart now. I install two themes, ananke and gohugo-amp. The repo is here: Adam Beguelin / basico · GitLab

When I run

hugo server -D -t ananke

everything is fine and I have a lovely site. But, when I run

hugo server -D -t gohugo-amp

I get a blank page. The page it generates is here.

Maybe the gohugo-amp theme is just broken. Or maybe I just don’t understand how to configure it (more likely).

So how would one go about debugging this? The site is about as simple as possible, one empty post…

Gracias!

To debug issues like this with themes listed on the theme site your best bet is to:

  1. Reference the included exampleSite as that’s what gets built to the theme site for demo purposes.
  2. If exampleSite doesn’t exist reference the hugoBasicExample as that’s the fallback used when a custom example isn’t needed.

If the examples work you can rule out any environment or dependency problems on your machine, at which point you can:

  • Compare your site to the example and start adding stuff to yours until it works, or;
  • Compare the example to your site and start removing stuff until it doesn’t work.

Any config or content structural issues should be obvious at this point. If you want to drill down further you can start looking into customizing layouts in the theme to see what happens or override them in your site to do what you want.