Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permalinkable issue in sitemap.xml #5910

Closed
akshaybabloo opened this issue Apr 29, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@akshaybabloo
Copy link
Contributor

commented Apr 29, 2019

Similar to #5849, discussion at https://discourse.gohugo.io/t/ignore-amp-links-in-sitemap/18387/6 and code at https://github.com/akshaybabloo/gollahalli.com/blob/master/themes/Spark/layouts/sitemap.xml.

hugo version

Hugo Static Site Generator v0.55.4-579004178/extended darwin/amd64 BuildDate: 2019-04-25T07:50:33Z

I have been getting localhost:1313/amp/blog/* links instead of localhost:1313/blog/* in my sitemap and where ever I have used {{ .Permalink }} then I had to disable permalinkable by doing this:

[outputFormats]
  [outputFormats.AMP]
    permalinkable = false

and the links are not AMP anymore.

@bep bep added the Bug label Apr 29, 2019

@bep bep self-assigned this Apr 29, 2019

@bep bep added this to the v0.55.5 milestone Apr 29, 2019

bep added a commit to bep/hugo that referenced this issue May 2, 2019

output: Fix permalink in sitemap etc. when multiple permalinkable out…
…put formats

In Hugo 0.55.0 we made AMP `permalinkable`. We also render the output formats in their natural sort order, meaning
`AMP` will be rendered before `HTML`. References in the sitemap would then point to the AMP version,
and this is normally not what you'd want.

This commit fixes that by making `HTML` by default sort before the others. If this is not you want, you can set `weight` on
the output format configuration.

Fixes gohugoio#5910

bep added a commit to bep/hugo that referenced this issue May 2, 2019

output: Fix permalink in sitemap etc. when multiple permalinkable out…
…put formats

In Hugo 0.55.0 we made AMP `permalinkable`. We also render the output formats in their natural sort order, meaning `AMP` will be rendered before `HTML`. References in the sitemap would then point to the AMP version, and this is normally not what you'd want.

This commit fixes that by making `HTML` by default sort before the others.

If this is not you want, you can set `weight` on the output format configuration.

Fixes gohugoio#5910

bep added a commit to bep/hugo that referenced this issue May 2, 2019

output: Fix permalink in sitemap etc. when multiple permalinkable out…
…put formats

In Hugo 0.55.0 we made AMP `permalinkable`. We also render the output formats in their natural sort order, meaning `AMP` will be rendered before `HTML`. References in the sitemap would then point to the AMP version, and this is normally not what you'd want.

This commit fixes that by making `HTML` by default sort before the others.

If this is not you want, you can set `weight` on the output format configuration.

Fixes gohugoio#5910

bep added a commit to bep/hugo that referenced this issue May 2, 2019

output: Fix permalink in sitemap etc. when multiple permalinkable out…
…put formats

In Hugo 0.55.0 we made AMP `permalinkable`. We also render the output formats in their natural sort order, meaning `AMP` will be rendered before `HTML`. References in the sitemap would then point to the AMP version, and this is normally not what you'd want.

This commit fixes that by making `HTML` by default sort before the others.

If this is not you want, you can set `weight` on the output format configuration.

Fixes gohugoio#5910

bep added a commit to bep/hugo that referenced this issue May 2, 2019

output: Fix permalink in sitemap etc. when multiple permalinkable out…
…put formats

In Hugo 0.55.0 we made AMP `permalinkable`. We also render the output formats in their natural sort order, meaning `AMP` will be rendered before `HTML`. References in the sitemap would then point to the AMP version, and this is normally not what you'd want.

This commit fixes that by making `HTML` by default sort before the others.

If this is not you want, you can set `weight` on the output format configuration.

Fixes gohugoio#5910

@bep bep closed this in #5919 May 2, 2019

bep added a commit that referenced this issue May 2, 2019

output: Fix permalink in sitemap etc. when multiple permalinkable out…
…put formats

In Hugo 0.55.0 we made AMP `permalinkable`. We also render the output formats in their natural sort order, meaning `AMP` will be rendered before `HTML`. References in the sitemap would then point to the AMP version, and this is normally not what you'd want.

This commit fixes that by making `HTML` by default sort before the others.

If this is not you want, you can set `weight` on the output format configuration.

Fixes #5910
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.