-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat: add sitemap index file #235
Conversation
✅ Deploy Preview for new-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for es-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for ja-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for hi-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for cn-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for fr-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
.eleventy.js
Outdated
@@ -307,6 +307,15 @@ module.exports = eleventyConfig => { | |||
eleventyConfig.addShortcode("image", imageShortcode) | |||
// END, eleventy-img | |||
|
|||
/* | |||
* Do not generate sitemap and sitemap index files for translation sites because we're |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should at least generate a shallow site map for translation sites. That will help if people are searching in other languages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added multilingual: true
to 6 pages that have translations (did I miss some?) and updated the sitemap template to include only pages with this property on translation sites.
Note that only 3 of those 6 appear in the sitemap because the other 3 have eleventyExcludeFromCollections: true
.
Pages in the sitemap for translation sites:
Pages not in the sitemap because of eleventyExcludeFromCollections: true
(was that intentional?):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
Fixes #232
This PR:
<loc>
tags of the sitemap to be absolute as required by https://sitemaps.org/protocol.html.<changefreq>
in the sitemap. It was always empty (<changefreq></changefreq>
), which is technically invalid against https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsdsitemap-index.xml
file in the root. It will contain references tohttps://eslint.org/sitemap.xml
andhttps://eslint.org/docs/latest/sitemap.xml
. On translation sites, it will contain only one reference, e.g,https://es.eslint.org/sitemap.xml
.robots.txt
to point tositemap-index.xml
instead ofsitemap.xml
.User-agent
andDisallow
, as blank lines are delimiters.Disables generating sitemaps on translation sites (see the comment in.eleventy.js
).multilingual: true
to pages that appear on translation sites and filters the sitemaps for translation sites by this property.