Shortcode for a custom output not rendered on the fly

I have 2 shortcodes - one for HTML and one for AMP output and I couldn’t get AMP shortcode to work. Hugo was rebuilding the site but there was no effect whatsoever - shortcode for AMP just couldn’t work.

figureimage.html
figureimage.amp.html

Only after some time I realized that AMP won’t work until the server is restarted. Is it a bug?

Maybe. You can report the problem on GitHub if you can:

  • Consistently reproduce the problem with the current version of Hugo
  • Provide concise instructions so that others can consistently reproduce the problem
  • Provide the data and/or files required to consistently reproduce the problem

I have no idea how frequently it happens to others, but there are several situations where we must restart hugo server to obtain the expected results, and we’re OK with that. In my view hugo server is a powerful development tool, making it possible to immediately see changes without a full build, and I can live with a few quirks.

Not seeing what you expect?

  1. Clear cache
  2. Restart hugo server
  3. Etc.

It’s become a habit.

2 Likes

I ran Hugo with hugo server --ignoreCache but the problem persists. As much as I would like to, I am not always sure of my coding but luckily I was rather sure of this shortcode method and eventually decided to restart Hugo (and I am ok with that as well). Nevertheless, I’m grateful for all help I receive in here, it’s a really great community.

I will try to report it on Github.

i think i’ts related with this issue

the OP also ecountered this bug on <shortcodes>.amp.html

1 Like

Perhaps it is. I’ve only noticed when I was trying to see any changes from my AMP shortcode.

1 Like