Blitz: Add support for sitemaps

Created on 11 Jun 2020  路  3Comments  路  Source: blitz-js/blitz

What do you want and why?

Given the static and dynamic routes, I should be able to generate static sitemap(s).

  • [ ] Support static routes
  • [ ] Support dynamic routes
  • [ ] Support multiple sitemap files, as per spec
  • [ ] Consider static sitemap generation (build-time) vs dynamic generation at run-time.

Possible implementation(s)

240

Additional context

kinfeature-change statuready-to-work-on

Most helpful comment

I just came across Blitz last night @flybayer!

I think you guys are on to the right philosophy and there is a significant desire and proven demand (RoR) to have a more applicable layer of a framework on top of NextJS type core. NextJS has done a great job in adding similar abstractions over React, yet giving you the core as is. Having said that, despite so much community behind NextJS and their /examples... simple, early stage, and essential things like sitemaps are not trivial. I think thats where the value of Blitz type frameworks come in. If we can have Authentication, Authorization (Hasura does well), DB (Prisma + event-driven Subscriptions similar to Hasura again), and Forms (Redwood type approach perhaps), plus various plugins and essential elements like Sitemaps... all in one framework, aligned to work together. That is a fantastic story for a very wide range of developers to focus on their core business logic and follow DRY principle.

Thank you.

All 3 comments

Thank you @SharadKumar! This is a great idea. We can definitely add this.

Some notes for anyone looking into this:

We can probably do this many different ways because we wrap the Next.js build, so we can do custom stuff before and after. One possibility is to generate a sitemap from the Next.js manifest file that's output from next build. But I'm not sure if that handles getStaticPaths, etc. Needs investigation.

I just came across Blitz last night @flybayer!

I think you guys are on to the right philosophy and there is a significant desire and proven demand (RoR) to have a more applicable layer of a framework on top of NextJS type core. NextJS has done a great job in adding similar abstractions over React, yet giving you the core as is. Having said that, despite so much community behind NextJS and their /examples... simple, early stage, and essential things like sitemaps are not trivial. I think thats where the value of Blitz type frameworks come in. If we can have Authentication, Authorization (Hasura does well), DB (Prisma + event-driven Subscriptions similar to Hasura again), and Forms (Redwood type approach perhaps), plus various plugins and essential elements like Sitemaps... all in one framework, aligned to work together. That is a fantastic story for a very wide range of developers to focus on their core business logic and follow DRY principle.

Thank you.

Yes!! That's the dream we are making a reality! 馃槏

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LoriKarikari picture LoriKarikari  路  4Comments

flybayer picture flybayer  路  4Comments

yhoiseth picture yhoiseth  路  3Comments

timsuchanek picture timsuchanek  路  5Comments

simonedelmann picture simonedelmann  路  3Comments