Skip to content

bug(website): Fix duplicated origin in generated sitemap URLs #4455

Description

@HarshPopat23

Problem:

The production sitemap at https://www.kubeflow.org/sitemap.xml contains malformed URLs. For example:

https://www.kubeflow.orghttps://www.kubeflow.org/docs/started/introduction/

All current sitemap entries have the same duplicated origin. This makes the sitemap unreliable for search-engine discovery.

The problem is in layouts/sitemap.xml, which prepends https://www.kubeflow.org to {{ .Permalink }} even though Hugo already renders .Permalink as an absolute URL during the production build.

Proposed Solution:

Remove the custom layouts/sitemap.xml override and use Hugo’s built-in sitemap template.

Alternatively, retain the custom template but change:

<loc>https://www.kubeflow.org{{ .Permalink }}</loc>

to:

<loc>{{ .Permalink }}</loc>

A small post-build validation should also verify that every <loc> is a valid absolute URL and does not contain a duplicated https:// prefix.

Page to Update (provide the full path):

https://www.kubeflow.org/sitemap.xml

Component/Kubeflow Version:

Current master / production website.

Labels

/area website

Impacted by this bug? Give it a 👍.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/websiteAREA: Website Styles/Hosting/Servingkind/bugKIND: Bugs

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions