fedeya / remix-sitemap

Sitemap generator for Remix applications
https://npmjs.com/remix-sitemap
MIT License
95 stars 5 forks source link

Better support for V2 routing conventions #32

Closed isaac-jordan closed 1 year ago

isaac-jordan commented 1 year ago

Describe the bug Hi there, thanks for this great library. Really simplifies sitemaps.

I've just opted in to V2 routing conventions in my Remix project, and I have a blog.$slug.tsx route and blog._index.tsx route. Unfortunately remix-sitemap doesn't seem to pick up the index page for the blog automatically (/blog), but adding the following code made it start working correctly:

export const sitemap: SitemapFunction = async ({ config, request }) => {    
    return [
        {loc: "/blog"},
    ];
};

Expected behavior Ideally it would just pick up this route automatically, like other routes.

fedeya commented 1 year ago

Hi @isaac-jordan thanks!

I released a new version today to fix this, could you try again with the latest version?

isaac-jordan commented 1 year ago

Looks good @fedeya, thanks!