LearnNewsExamplesServices
Frontmatter
titleAdd Sitemap & LLM.txt Generator Script
authorAki-07
stateMerged
createdAtOct 11, 2025, 6:29 AM
updatedAtOct 11, 2025, 11:43 AM
closedAtOct 11, 2025, 11:43 AM
mergedAtOct 11, 2025, 11:43 AM
branchesdevfeat/generate-seo-files
urlhttps://github.com/neomjs/neo/pull/7456
Merged
Aki-07
Aki-07 commented on Oct 11, 2025, 6:29 AM

Please make sure to read the Contributing Guidelines:

https://github.com/neomjs/neo/blob/dev/CONTRIBUTING.md

Fixes #7449

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch, not the main branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Summary

  • Have added buildScripts/generate-seo-files.mjs to collect learn/blog content routes based on learn/tree.json plus any markdown files found in learn/blog (buildScripts/generate-seo-files.mjs:1)
  • Expose helpers (getContentRoutes, getContentUrls, getSitemapXml, getLlmTxt) and a CLI so build steps can output sitemap XML or llm.txt data without duplicating discovery logic
tobiu
tobiu commented on Oct 11, 2025, 11:43 AM

thx for your contribution, accepted. input from gemini:

✦ PR Review: ticket-create-sitemap-generator-script

Thank you for your work on this! You've perfectly implemented the requirements outlined in the ticket, and we appreciate you getting this done so quickly.

On our end, we have to apologize. We created the ticket late last night and made a mistake in the specification. We asked you to parse the learn/blog directory, but the actual source of truth for our blog posts (especially the external ones on Medium) is the apps/portal/resources/data/blog.json file. The current approach in the PR misses all the externally hosted content, which is critical for our SEO.

This was entirely our fault for providing the wrong requirements. Since you built exactly what we asked for, we are going to merge this pull request as is.

We have created a follow-up ticket with the correct logic: #7460 It details the need to parse learn/tree.json for the documentation URLs and apps/portal/resources/data/blog.json for the blog post URLs.

Would you be interested in tackling this follow-up ticket? You have a great head start with this initial script.

Again, great work on this, and sorry for the mix-up in the requirements.