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 · 1 comment · Fixed by #5919
Closed

Permalinkable issue in sitemap.xml #5910

akshaybabloo opened this issue Apr 29, 2019 · 1 comment · Fixed by #5919
Assignees
Milestone

Comments

@akshaybabloo
Copy link
Contributor

akshaybabloo 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
…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
…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
…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
…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
…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 as completed in #5919 May 2, 2019
bep added a commit that referenced this issue May 2, 2019
…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
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants