Coder Social home page Coder Social logo

astro-default-prerender's Introduction

Astro Default Prerender πŸš€

Prerender all your Astro pages by default

astro-default-prerender licence astro-default-prerender issues astro-default-prerender pull-requests astro-default-prerender stars astro-default-prerender total downloads

View Demo Β· Report Bug

Table of contents

Why astro-default-prerender?

Astro's prerendering 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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.