Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The sitemap.xml link sections looks odd #14912

@bep

Description

@bep
{{- if .IsTranslated }}
	{{- range .Translations }}
		<xhtml:link
			rel="alternate"
			hreflang="{{ .Language.Locale }}"
			href="{{ .Permalink }}"
		/>
	{{- end }}
	<xhtml:link
		rel="alternate"
		hreflang="{{ .Language.Locale }}"
		href="{{ .Permalink }}"
	/>
{{- end }}
  • This links to alternate versions of the article, but it also repeats a link to the current, which doesn't make much sense to me.
  • If that is really what we want, we could use range .AllTranslations instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions