Environment variables, SEO meta, XML sitemaps, URL redirects, and Vite integration for Kirby – the utilities most projects re-implement, in one plugin.
Environment • SEO Meta • Sitemaps • Redirects • Vite
| I want to… | Use |
|---|---|
Read typed values from a .env file |
env('KEY', $fallback) |
| Emit meta description, OpenGraph, Twitter, and JSON-LD | $page->meta()->social() |
Auto-generate an XML sitemap with hreflang |
sitemap.enabled option |
| Redirect dead URLs without touching existing content | redirects option |
| Serve Vite dev or built assets automatically | vite()->js() / vite()->css() |
Load .env files and read variables through a global env() helper, with type coercion and fallbacks.
// .env file support with fallbacks
$apiKey = env('STRIPE_SECRET_KEY', 'fallback-key');Generate meta description, OpenGraph, Twitter Card, JSON-LD, and canonical tags from page fields, page models, and global defaults.
// Complete meta tag generation
<?= $page->meta()->social() ?>
<?= $page->meta()->robots() ?>Auto-generate XML sitemaps with multilingual hreflang, template and page exclusion, and per-page control via blueprints.
// Automatically available at /sitemap.xml
// Supports hreflang for multilingual sitesPattern-based redirect rules that only fire when no existing page or route matches the URL, with placeholders and callback targets.
// Pattern-based redirects with placeholders
'old/blog/(:any)' => 'news/$1'Switch between the Vite dev server (with HMR) and built manifest.json assets automatically, including Panel asset integration.
// Load Vite assets with automatic dev/production switching
<?= vite()->js('src/main.js') ?>
<?= vite()->css('src/main.js') ?>- Kirby 5
- PHP 8.3+
composer require johannschopplich/kirby-helpersDownload and copy this repository to /site/plugins/kirby-helpers.
MIT License © 2020-PRESENT Johann Schopplich
MIT License © 2020-2022 Bastian Allgeier
MIT License © 2020-2022 Nico Hoffmann