0.0.6 β€’ Published 1 year ago

astro-default-prerender v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Table of contents

Why astro-default-prerender?

Astro's hybrid rendering is a great feature that allows you to mix static and dynamic pages. However, it can be a bit tedious to add export const prerender = true to your pages, especially if you have a lot of static pages and only a few dynamic ones.

astro-default-prerender is an Astro integration that allows you to opt-out of prerendering instead of opting-in. This means that all your pages will be prerendered by default, unless you explicitly set export const prerender = false on a page.

Many Thanks to all the Stargazers

Stargazers repo roster for astro-default-prerender

πŸš€ Demo

Try out the minimal demo.

Open in StackBlitz

πŸ’» Quickstart

Before you get started set the output target to server and have an adapter wired up. You can learn more about this in the Astro docs.

Now that you're all set up, you can install astro-default-prerender with the astro add CLI tool

# Using NPM
npx astro add astro-default-prerender

# Using YARN
yarn astro add astro-default-prerender

# Using PNPM
pnpm astro add astro-default-prerender

That's it! Now all your pages will be prerendered by default. You can still override this by adding export const prerender = false to your pages.

πŸ›‘οΈ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ—ΊοΈ Roadmap

These are the features that are planned for the future. If you have any suggestions, please open an issue.

  • Prerendering endpoints
  • Excluding pages/directories from prerendering with a glob pattern

πŸ™ Support

If you liked this project, please give it a ⭐️. That's the best way you can support it!