Closed hollowaykeanho closed 4 years ago
Both workaround are not working for me.
This is my config:
config/_default/outputs.toml
page = ["HTML","AMP"]
This markup is not working in my project: layouts/_default/_markup/render-image.amp.html
New Workaround I have created a new workaround and consist in create an empty shortcode like this: /shortcodes/footer.html /shortcodes/footer.amp.html
finally, put this shortcode at the end of every md file
{{<footer>}}
In my project, only pages that don't use any shortcode (with amp version) present this problem (thats was the way I realized the problem)
This is my config: config/_default/outputs.toml page = ["HTML","AMP"]
There are lot more configurations based on the specification. Mine is:
home = [ "HTML", "AMP" ]
page = [ "HTML", "AMP" ]
section = [ "HTML", "AMP" ]
taxonomy = [ "HTML", "AMP" ]
term = [ "HTML", "AMP" ]
Filepath: https://gitlab.com/zoralab/bissetii/-/blob/next/.sites/config/_default/outputs.toml
You need be very careful with amp shortcode because it was the shortcode that I picked up this consistent bug (amp.html version did not render until I save the output.toml
explicitly).
layouts/_default/_markup/render-image.amp.html
Also, I do not recall any seeker with search layouts/_default/_markup
inside layout unless you shift it to partial layouts. Is there a supporting documentation for it?
I'm looking at https://gohugo.io/templates/output-formats/.
Please test again with 0.74. I suspect this was resolved with https://github.com/gohugoio/hugo/pull/7455.
Please test again with 0.74. I suspect this was resolved with #7455.
Hello, I have recently tested with version 0.74 and the problem persists. I think markup is not recognized when a different output like AMP is processed. My workaround works because somehow it tells Hugo that the page is an AMP version and as a consequence the markup knows it in a some way
@jmooring. same as @jmsalazar84 . Here's my test result:
Test results with Hugo Static Site Generator v0.74.1-15163266/extended linux/amd64 BuildDate: 2020-07-13T19:02:45Z
.
v0.73
resourcesResult: amp-img
is rendered without needing workaround.
v0.73
resources and run v0.74
from scratchResult: Issue persist. Workaround must be applied in order to make shortcode amp.html works.
v0.74
resourceResult: Issue persist. Workaround must be applied in order to make shortcode amp.html works.
Can I get the specification for the layouts/_default/_markup
so I can build a CI test for this and issue #7160 please? I can contribute testing effort. Dev team can issue test version in .deb
packaging to me ya.
Updated on latest test with Hugo Static Site Generator v0.74.3-DA0437B4/extended linux/amd64 BuildDate: 2020-07-23T16:30:30Z
:
Issue is still persist. I still need to explicitly save config/_default/outputs.toml
everytime I want the .amp.html
shortcodes to run.
New findings: it is affecting build command. Currently, building with $ hugo --minify
randomly process/ignore multiple output shortcodes. Sometimes it builds correctly, sometimes it does not.
Updated on latest test with Hugo Static Site Generator v0.75.0-FEF924BA linux/amd64 BuildDate: 2020-09-14T09:20:23Z
.
Issue is still persisting.
Close this issue as duplicate of https://github.com/gohugoio/hugo/issues/7160. Proceed to track issue over there.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Tested versions:
v0.73
Hugo Static Site Generator v0.74.1-15163266/extended linux/amd64 BuildDate: 2020-07-13T19:02:45Z
Hugo Static Site Generator v0.74.3-DA0437B4/extended linux/amd64 BuildDate: 2020-07-23T16:30:30Z
Hugo Static Site Generator v0.75.0-FEF924BA linux/amd64 BuildDate: 2020-09-14T09:20:23Z
Issue
Hugo server does not parse
config/_default/outputs.toml
when first run. Thatoutputs.toml
contains the multiple outputs definitions (e.g.HTML
,AMP
, etc.).Workaround
There are
2"1" workaround:outputs.toml
one time to let hugo server picks up the settings upon self-reload.Migrate the settings back to(EDIT: same outcome. Only first workaround works.)config/_default/configs.toml
.When Does This Issue Found
During theme module AMP integrations. The shortcode with AMP rendering (
.amp.html
) does not pick up and render<img>
tag instead of<amp-img>
.