Capri

Build static sites with interactive islands
GitHub
208
Created 2 years ago, last commit 10 months ago
3 contributors
409 commits
Stars added on GitHub, month by month
0
11
12
1
2
3
4
5
6
7
8
9
10
2023
2024
Stars added on GitHub, per day, on average
Yesterday
=
Last week
0.0
/day
Last month
0.0
/day
Last 12 months
0.0
/day
npmPackage on NPM
capri
5.2.3
Monthly downloads on NPM
11
12
1
2
3
4
5
6
7
8
9
10
2023
2024
README

Capri

Capri allows you to build static websites using a frontend framework of your choice (React/Preact/Vue/Solid/Svelte).

Carbon-friendly 🌱

By default, zero KB of JavaScript is shipped to the browser.

You can sprinkle in client-side interactivity by turning some of your components into islands. Capri will make sure, that only that part of your JavaScript is sent down the wire that is required to let these islands become interactive.

Use what you already know 🎓

With Capri, you don't have to learn any new APIs. In fact, Capri doesn't even have an API! Use your framework's regular ecosystem as if you were building a single page app and follow these two rules:

  1. 📍 Pick a router that supports server-side rendering (pretty much all popular routing libraries do this).
  2. 🏝️ If a component needs to become interactive, name it *.island.*. Capri will take care of the rest.

👉 Visit https://capri.build to get started.

No lock-in 🔓

Should you ever decide to remove Capri from your project, you will be left with a 100% working Vite app. Of course, instead of pre-rendered static pages, the output will then be a regular SPA.

Bonus: Live CMS previews 🔮

When you connect your Capri website to a headless CMS, you can take further advantage of Capri's architecture, as it allows you to generate a separate SPA version of your site that can be used to live-preview any content changes without requiring a build-step or server-side rendering. You can use cheap and energy efficient static file hosting and still get real-time previews right inside your CMS.

License

MIT