You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Page menu URLs vs permalinkable output formats #5849
After setting section = ["HTML", "RSS", "AMP"] in config.tomal all the hyperlinks in the page links to http://domain.com/amp/.... This was working fine in 0.54.
Note that we added a Permalinkable config option on the Output Format -- this defaults to true for HTML and AMP. You can turn that off, but you need to add a output format config section.
Any links that have been generated by Hugo that links to other pages in the same domain, not to the external domain. Permalinkable is not the problem I guess.
Does adding AMP to sections turn all non-AMP links to AMP? as in localhost:1313/blog/welcome to localhost:1313/amp/blog/welcome in a page with URL localhost:1313/blog? This was not the case in 0.54.
Does adding AMP to sections turn all non-AMP links to AMP? as in localhost:1313/blog/welcome to localhost:1313/amp/blog/welcome in a page with URL localhost:1313/blog? This was not the case in 0.54.
No.
I will double check the logic to make sure that we only link from AMP => AMP, but when you now do .RelPermalink on a page when rendering the AMP variant, it will link to the AMP variant.
If this is not what you want, you can turn it off. See above.
OK, the page menus. I understand now. I will fix this, eventually, but you can get back the old behaviour by adding a AMP definition with permalinkable turned off:
Activity
[-]Multiple output types defaults to /amp/ links[/-][+]Multiple output types defaults to /amp/ links in 0.55[/+]bep commentedon Apr 13, 2019
What do you mean by ALL?
Note that we added a
Permalinkableconfig option on the Output Format -- this defaults to true for HTML and AMP. You can turn that off, but you need to add a output format config section.akshaybabloo commentedon Apr 13, 2019
Any links that have been generated by Hugo that links to other pages in the same domain, not to the external domain.
Permalinkableis not the problem I guess.Does adding
AMPto sections turn all non-AMP links to AMP? as inlocalhost:1313/blog/welcometolocalhost:1313/amp/blog/welcomein a page with URLlocalhost:1313/blog? This was not the case in 0.54.bep commentedon Apr 14, 2019
No.
I will double check the logic to make sure that we only link from AMP => AMP, but when you now do
.RelPermalinkon a page when rendering the AMP variant, it will link to the AMP variant.If this is not what you want, you can turn it off. See above.
[-]Multiple output types defaults to /amp/ links in 0.55[/-][+]Check AMP vs Permalinkable[/+]akshaybabloo commentedon Apr 16, 2019
But it's happening to me for some reason.
I am not using
. RelPermalinkBTW I am using.Permalink. Are both same?bep commentedon Apr 16, 2019
They are conceptually the same, yes.
hugolib: Add more tests for Permalinkable
bep commentedon Apr 17, 2019
@akshaybabloo I have added some more tests for this -- and it behaves exactly as expected.
akshaybabloo commentedon Apr 18, 2019
OK, I am not sure what the problem is then:
The code is here -> https://github.com/akshaybabloo/gollahalli.com
The output options I have in my
config.tomlis:Now, I have removed
sectionfrom it but I still getampURL in my nav bar, the code for that is:https://github.com/akshaybabloo/gollahalli.com/blob/8d31bbc560fd7b0cd7e236e05b9d748194a68e08/themes/Spark/layouts/index.html#L20-L24
The
aboutandprojectshas amp links I have no idea why.bep commentedon Apr 18, 2019
OK, the page menus. I understand now. I will fix this, eventually, but you can get back the old behaviour by adding a
AMPdefinition with permalinkable turned off:https://gohugo.io/templates/output-formats#readout
[-]Check AMP vs Permalinkable[/-][+]Page menu URLs vs permalinkable output formats[/+]akshaybabloo commentedon Apr 18, 2019
you mean by adding
permalinkable = falsein theconfig.tomlright?bep commentedon Apr 18, 2019
Something llike this:
Fix menu URL when multiple permalinkable output formats
Fix menu URL when multiple permalinkable output formats
github-actions commentedon Feb 18, 2022
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.