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

fix: taxonomies missing lang in sitemap #2373

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

bemyak
Copy link
Contributor

@bemyak bemyak commented Dec 13, 2023

This PR fixes sitemap.xml having incorrect i18n taxonomy URLs.


Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

  • Are you doing the PR on the next branch?

assert!(file_contains!(public, "sitemap.xml", "https://example.com/tags/"));
assert!(file_contains!(public, "sitemap.xml", "https://example.com/tags/hello/"));
assert!(file_contains!(public, "sitemap.xml", "https://example.com/fr/tags/"));
assert!(file_contains!(public, "sitemap.xml", "https://example.com/fr/tags/bonjour/"));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current version puts https://example.com/tags/bonjour/ here (notice missing fr), which results in lots of 404s in the crawlers.

name,
item.slug,
"{}{}/{}",
item.path,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we ensuring it ends with a trailing slash upstream already?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, config.make_permalink ensures it.
I've now added the slash nevertheless just for the consistency.

@bemyak bemyak force-pushed the sitemaps-missing-tax-lang branch from ec10a5f to 478c53b Compare December 13, 2023 12:52
@Keats Keats merged commit e9485ef into getzola:next Dec 13, 2023
@Keats
Copy link
Collaborator

Keats commented Dec 13, 2023

Thanks!

@bemyak bemyak deleted the sitemaps-missing-tax-lang branch December 14, 2023 07:37
Keats pushed a commit that referenced this pull request Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants