0.3.0 • Published 2 years ago
steuern v0.3.0
Steuern
Client side navigation for static or server side sites, made easy.
Features
- 👾 Supports both Navigation API (preferred, experimental) and History API
- 🏗️ Uses a custom algorithm to merge the
<head>
and replace the<body>
- 🍻 Handles clicks on links automatically when using the History API
- 📐 Maintains scroll positions and handles hashes
Getting started
To use Steuern and let it autostart on your page, include this script in your HTML:
<script src="https://unpkg.com/steuern@<version>/dist/script.js"></script>
To make the script low priority and not block page rendering, add async defer
to the script tag or use the ESM script:
<script type="module" src="https://unpkg.com/steuern@<version>/dist/script.mjs"></script>
Steuern also is available as a module in both CommonJS and ESM.
import { initialize } from "steuern";
initialize();
This requires the use of a bundler or something to that effect.
License
MIT