Frontmatter
| id | 7910 |
| title | Enhancement: Update SEO generator to support middleware-compatible routes |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Nov 29, 2025, 11:11 AM |
| updatedAt | Nov 29, 2025, 12:44 PM |
| githubUrl | https://github.com/neomjs/neo/issues/7910 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Nov 29, 2025, 12:41 PM |
| milestone | 11.12.0 |
Enhancement: Update SEO generator to support middleware-compatible routes
tobiu assigned to @tobiu on Nov 29, 2025, 11:11 AM

tobiu
Nov 29, 2025, 12:06 PM
Input from Gemini:
✦ I have refactored the route generation logic in
buildScripts/generateSeoFiles.mjsto rely on explicit categories instead of brittle string matching (like.htmlextensions).Changes:
- Categorized Routes: Routes are now classified as
tree(documentation),top-level(SPA pages), orfile(examples/apps).- Correct Pathing:
fileroutes (examples) are treated as absolute paths (e.g.,/apps/colors/index.html) and do not get prefixed with/learn.- Their
clientSideRouteis correctly set to an empty string"", as they are standalone entry points, not hash-based routes within the main app.- Verified Output:
node buildScripts/generateSeoFiles.mjs --format objectsnow produces the correct structure:{ "route": "/apps/colors/index.html", "clientSideRoute": "" }- Documentation routes (e.g.,
/learn/benefits/Introduction) are also correctly generated with their corresponding hash-basedclientSideRoute(/#/learn/benefits/Introduction).
tobiu closed this issue on Nov 29, 2025, 12:41 PM
tobiu added this to the 11.12.0 milestone on Nov 29, 2025, 12:44 PM
The
buildScripts/generateSeoFiles.mjsscript needs to be updated to support the new middleware routing strategy.Currently, the sitemap generator produces hash-based URLs (e.g.,
https://neomjs.com/#/services), which is suboptimal for SEO. The middleware will handle "real" routes (e.g.,https://neomjs.com/services) and map them to client-side routes.Tasks:
getSitemapXmlandgetLlmsTxtto generate "real routes" (without the hash fragment) for the<loc>tags and content links.jsonorobjects) to the CLI that outputs an array of route objects. Each object should contain:route: The real route (e.g.,/services)clientSideRoute: The hash-based route (e.g.,/#/services) This will allow the middleware to easily resolve URLs and determine the correct client-side route state.