Skip to content

Generate sitemap.xml in the generator #255

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

Open
bjohansebas opened this issue May 1, 2025 · 5 comments
Open

Generate sitemap.xml in the generator #255

bjohansebas opened this issue May 1, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@bjohansebas
Copy link
Member

Enter your suggestions in details:

We should have the ability to generate the API sitemap. Currently, there is no generated sitemap, which could cause new APIs to be indexed by bots like Google, showing outdated information (see nodejs/nodejs.org#6577).

@bjohansebas
Copy link
Member Author

I would say i’d take care of this, but lately I’ve had too much work and this isn’t exactly a priority for me to implement soon, so if anyone wants to do it, I’d be more than happy to review the PR or help with the discussion.

@flakey5
Copy link
Member

flakey5 commented May 1, 2025

Would this be a sitemap file per release or one file that contains all the releases?

@bjohansebas
Copy link
Member Author

Both ways could work. IMO, a sitemap for each version would be more organized and easier to debug, although I’m not sure how bots would handle this (I think it doesn’t affect whatever direction is taken).

However, I’m not entirely sure how Node’s infrastructure works. From what I understand, the sitemap will only be generated when this tool is integrated into Node, so old releases won’t have this sitemap, only new releases that include this functionality of the tool, right?

@flakey5
Copy link
Member

flakey5 commented May 1, 2025

From what I understand, the sitemap will only be generated when this tool is integrated into Node, so old releases won’t have this sitemap, only new releases that include this functionality of the tool, right?

Yeah pretty much

I'm asking since, if we do decide to include all of the releases in it, it might make sense to do this as part of the release worker's update links action instead of here (more specifically, within the scripts/build-r2-symlinks.mjs script), since we could just list all of the files in the dist-prod R2 bucket and put them in the sitemap.

But, if we just want the files for the latest release to be indexed, we could just have it as a generator here

@bjohansebas
Copy link
Member Author

bjohansebas commented May 4, 2025

I think the best approach would be to create a sitemap for all versions, and to address the recent APIs by adding the <lastmod> and <priority> tags. This way, search engine bots will better understand which APIs have higher priority than others.

https://slickplan.com/blog/xml-sitemap-priority-changefreq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants