solid-router icon indicating copy to clipboard operation
solid-router copied to clipboard

[✨] feat: sitemap generator

Open TheElegantCoding opened this issue 1 year ago • 5 comments

Describe the bug

i open this as an issue because i cant open a feature request, it will be nice that we can add support of a sitemap generator i don't know if this can be done in this repo or has o be a separate package

This is a reference of how a sitemap generatos work in astro

Your Example Website or App

none

Steps to Reproduce the Bug or Issue

none

Expected behavior

none

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

TheElegantCoding avatar Jan 11 '24 15:01 TheElegantCoding

This is probably in the domain of SolidStart rather than the router

Brendonovich avatar Jan 23 '24 16:01 Brendonovich

this is for solid and solid router not solid-start

TheElegantCoding avatar Jan 23 '24 20:01 TheElegantCoding

I know you'd like this as a router feature, but I mention SolidStart as I'm not sure the router is capable enough to know the sitemap ahead of time. Looking at Astro's sitemap plugin, it only works for routes with paths that are known at build time ie. fixed-path routes and dynamic routes that are statically generated with getStaticRoutes. Dynamic routes that are evaluated at runtime can't be included in a sitemap. The router isn't in the position to know what routes are available at build time - it just knows the runtime routing schema. SolidStart on the other hand does know which routes are pre-rendered by crawling and explicit instruction. Implementing it in SS would also make sitemaps work independent of which router you use, which is pretty cool.

Brendonovich avatar Jan 23 '24 23:01 Brendonovich

Have you tried to use a Vite plugin like: https://github.com/jbaubree/vite-plugin-pages-sitemap

madaxen86 avatar Feb 28 '24 21:02 madaxen86

@madaxen86 not yet, but this issue is for a feature request in solid or solid-router, that can only be a temporary solution

TheElegantCoding avatar Feb 29 '24 02:02 TheElegantCoding