johannschopplich / kirby-extended
Environment, SEO, and build utilities for Kirby CMS
Package info
github.com/johannschopplich/kirby-helpers
Type:kirby-plugin
pkg:composer/johannschopplich/kirby-extended
Requires
- php: >=8.2
- getkirby/composer-installer: ^1
- vlucas/phpdotenv: ^5
Requires (Dev)
- getkirby/cms: ^5
- phpunit/phpunit: ^12
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 7.0.1
- 7.0.0
- 6.7.1
- 6.7.0
- 6.6.0
- 6.5.0
- 6.4.0
- 6.3.1
- 6.3.0
- 6.2.0
- 6.1.1
- 6.1.0
- 6.0.0
- 5.0.0
- 4.2.1
- 4.2.0
- 4.1.0
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.0.14
- 3.0.13
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.12.1
- 2.12.0
- 2.11.5
- 2.11.4
- 2.11.3
- 2.11.2
- 2.11.1
- 2.11.0
- 2.10.3
- 2.10.2
- v2.10.1
- 2.10.0
- v2.9.4
- v2.9.3
- v2.9.2
- v2.9.1
- v2.9.0
- v2.8.2
- v2.8.1
- v2.8.0
- v2.7.6
- v2.7.5
- v2.7.4
- v2.7.3
- v2.7.2
- v2.7.1
- v2.7.0
- v2.6.0
- v2.5.7
- v2.5.6
- v2.5.5
- v2.5.4
- v2.5.3
- v2.5.2
- v2.5.1
- v2.5.0
- v2.4.0
- v2.3.0
- v2.2.1
- v2.2.0
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.1
- v2.0.0
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- 1.0.0
- dev-feat/v4-compat
This package is auto-updated.
Last update: 2026-09-14 15:54:48 UTC
README
Kirby Helpers
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
When to Use
| 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() |
Features
🔑 Environment Variables
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');
🏷️ SEO Meta Tags
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() ?>
🧭 XML Sitemaps
Auto-generate XML sitemaps with multilingual hreflang, template and page exclusion, and per-page control via blueprints – plus an optional generated robots.txt.
// Sitemap at /sitemap.xml, with hreflang for multilingual sites // Optional robots.txt via the robots.enabled option
🔀 Smart Redirects
Pattern-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'
⚡️ Vite Integration
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') ?>
Requirements
- Kirby 5
- PHP 8.3+
Installation
Composer (Recommended)
composer require johannschopplich/kirby-helpers
Manual Installation
Download and copy this repository to /site/plugins/kirby-helpers.
License
MIT License © 2020-PRESENT Johann Schopplich
MIT License © 2020-2022 Bastian Allgeier
MIT License © 2020-2022 Nico Hoffmann