johannschopplich / kirby-helpers
Environment, SEO, and build utilities for Kirby CMS
Installs: 6 736
Dependents: 0
Suggesters: 0
Security: 0
Stars: 28
Watchers: 2
Forks: 3
Open Issues: 1
Type:kirby-plugin
Requires
Requires (Dev)
- getkirby/cms: ^5
- dev-main
- 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-dependabot/composer/getkirby/cms-4.7.1
- dev-feat/v4-compat
This package is auto-updated.
Last update: 2025-09-25 05:54:18 UTC
README
A comprehensive toolkit that extends Kirby CMS with essential development utilities. This plugin consolidates commonly needed functionality into a single, well-integrated package, eliminating the need for multiple separate plugins.
Why Kirby Helpers?
Building modern Kirby websites often requires the same set of tools: environment variable management, SEO meta tags, XML sitemaps, URL redirects, and modern build tool integration. Instead of installing and configuring multiple plugins, Kirby Helpers provides these essential features in one cohesive package, designed to work seamlessly together.
Features
⚡️ Environment Variables
Load .env
files automatically and access variables through a global env()
helper function. Perfect for managing API keys, database credentials, and environment-specific settings securely.
// .env file support with fallbacks $apiKey = env('STRIPE_SECRET_KEY', 'fallback-key');
🗂 SEO Meta Tags
Generate comprehensive meta tags for search engines and social media automatically. Supports OpenGraph, Twitter Cards, JSON-LD structured data, and canonical URLs with smart defaults and easy customization.
// Complete meta tag generation <?= $page->meta()->social() ?> <?= $page->meta()->robots() ?>
🧭 XML Sitemaps
Auto-generate XML sitemaps with full multilingual support. Automatically excludes unwanted pages and templates while providing fine-grained control over what gets included.
// Automatically available at /sitemap.xml // Supports hreflang for multilingual sites
🔀 Smart Redirects
Create flexible redirect rules that only activate when no existing page matches the URL. Supports pattern matching, placeholders, and custom logic through callbacks.
// Pattern-based redirects with placeholders 'old/blog/(:any)' => 'news/$1'
⚡️ Vite Integration
Seamless Vite integration for modern frontend tooling. Automatically switches between development server and production assets, with support for Hot Module Replacement during development.
// Load Vite assets with automatic dev/production switching <?= vite()->js('src/main.js') ?> <?= vite()->css('src/main.js') ?>
Requirements
- Kirby 4+
- PHP 8.1+
Installation
Composer (Recommended)
composer require johannschopplich/kirby-helpers
Manual Installation
Download and copy this repository to /site/plugins/kirby-helpers
.
Quick Start
-
Environment Variables: Create a
.env
file in your project root and start usingenv('VARIABLE_NAME')
-
Meta Tags: Add
<?= $page->meta()->social() ?>
to your header snippet -
Sitemap: Enable in your config with
'johannschopplich.helpers.sitemap.enabled' => true
-
Redirects: Define redirect rules in your config under
'johannschopplich.helpers.redirects'
-
Vite: Configure your Vite setup and use
vite()->js()
andvite()->css()
helpers
Documentation
Detailed documentation for each feature is available in the docs
directory:
License
MIT License © 2020-PRESENT Johann Schopplich
MIT License © 2020-2022 Bastian Allgeier
MIT License © 2020-2022 Nico Hoffmann
MIT License © 2021-2022 Oblik Studio