Recipes
-
Performance
Responsive images
Boost your website's performance with resized images that adapt to all screen sizes and save bandwidth
-
Setup
Going Headless
Prepare Kirby for headless use.
-
Integrations
Populate Figma designs with Kirby data
Using a JSON representation to auto-populate your Figma designs with content from your Kirby installation
-
Performance
Image lazy-loading
Lazy-loading strategies to improve the performance of you site
-
Setup
The media folder
Understanding the advantages of the media folder and how to serve files from the content folder if you prefer.
-
Extensions
Replacing Kirby's core classes
Extend core classes like the Kirby or site classes
-
Panel
Branding the Panel to adapt it to yours or your client's brand
Adapt the Panel's look & feel to your brand
-
Templating
Translate exception messages in frontend
Translate Kirby's exception messages on the frontend in single language sites
-
Forms
User sign-up
Leveraging Kirby's authentication features to create a user registration system
-
Extensions
Creating preview images for PDF files
Display a nice auto-generated image when linking to PDF flyers, booklets etc.
-
Setup
Git-based deployment with Dokku
A clean and simple way to get Kirby up and running with Dokku, a lightweight PaaS
-
Panel
Programmable blueprints
Create blueprints programmatically with PHP
-
Panel
Advanced Panel area
Create an editable product list as custom Panel area, complete with dialogs, dropdowns and search.
-
Panel
My first Panel area
Create your first custom Panel view from scratch
-
Content
Batch updating content
Flexible and reliable updates to large amounts of content
-
Setup
Kirby meets PurgeCSS
A walkthrough on how to install and use PurgeCSS with Kirby.
-
Setup
Kirby meets Tailwind CSS
A walkthrough on how to install and use Tailwind CSS with Kirby.
-
Templating
Quicktip: Different blueprints — same template
How to use the same template/controller/model for pages with different blueprints
-
Extensions
Quicktip: Update file template/metadata
Learn how to update file metadata programmatically
-
Panel
Nested blocks
This is an example of how to build a nested block including live panel preview and output snippets for the website.
-
Extensions
Virtual files
Use files from outside of Kirby’s file system as first class citizens
-
Security
Protecting files behind a firewall
Creating a download section with restricted access for authorized users
-
Setup
Running Kirby on a Nginx web server
How to configure the popular Nginx web server to run a Kirby website.
-
Panel
Block factory: Creating your own blocks collection
Start your own block collection based on examples in this recipe
-
Setup
Kirby meets Docker
Getting started with Docker for development: Quickly spin up Kirby in a Docker container, bind local directories and add other services like MailHog
-
Templating
Virtual pages from image gallery
Create virtual pages from a set of uploaded images and their meta data.
-
Panel
To bundle or not to bundle: differences of creating plugins with or without a build process
Using bundlers like kirbyup is not for everyone. Here we show how you can build Panel extensions without a build process.
-
Panel
Creating a custom block type from scratch
A step-by-step guide to creating custom blocks with a preview using the example of an audio block with a poster and some additional settings.
-
Templating
Load more with Ajax
Add a load more button to your listings and append items via Ajax.
-
Templating
A brief intro to object oriented programming in PHP
Understanding classes, objects, member functions and common pitfalls
-
Templating
Quicktip: Don't repeat the same query multiple times
"Don't repeat yourself" (DRY) is a coding paradigm that when not heeded can seriously harm performance.
-
Templating
Quicktip: Add blocks to a blocks field programmatically
Update a blocks field from the frontend, for example from form data
-
Extensions
Kirby loves CDN
Set up custom components to deliver assets and files through a CDN.
-
Setup
First steps to start debugging with Xdebug
Xdebug helps you track down errors in your PHP scripts. In this recipe, we will set it up with VS Code.
-
Forms
Using MailHog for local email testing
Make email testing a breeze with the right tools for the task
-
Translations
Find translations in your code
Find and collect all your translations used with the t() helper function in your code.
-
Panel
Examples for customizing the Panel
Style Panel elements via blueprint settings and custom CSS
-
Extensions
Going beyond Kirby's permissions features
Find out about ways to fine-tune and go beyond Kirby's built-in permission system in the Panel
-
Setup
Monolithic Plugin Setup
Set up a plugin workflow that allows you to both develop and test your plugin from the same Git repository.
-
Extensions
My first Panel field
Create your first custom Panel field from scratch
-
Templating
Shared Controllers
Share the content of a controller across multiple templates
-
Templating
Quicktip: Fine-tuning cache settings
Control caching from a blueprint option or a field
-
Setup
A variant to using Kirby for multiple sites
An alternative approach for running multiple sites from the same Kirby installation.
-
Extensions
The order of KirbyText/KirbyTags hooks
When to use what type of KirbyText/KirbyTags hook
-
Extensions
The power of placeholders
Use placeholders for recurring text snippets and more
-
Extensions
My first Panel section
Let's build a custom Panel section
-
Templating
Menu builders
Create custom menus from the Panel leveraging the power of the pages and the structure field
-
Setup
Kirby in a nutshell
Or what you wish you had known when you started your first Kirby project.
-
Setup
Plugin test workflow with PHPUnit
Set up multiple plugins with PHPUnit testing under a single Kirby installation.
-
Forms
Email with attachments
Send an email with attachments from form input.
-
Extensions
Subpage builder
Auto-generate subpages when you create a new page
-
Forms
Creating pages from frontend
Create pages from user input on the front end, e.g. from an event registration form.
-
Templating
Fetching field options
Get text labels for your option values from fields
-
Templating
Paginating long posts
Split long post into separate pages with pagination
-
Content
Filtering via routes
Learn how to filter using routes instead of parameters
-
Setup
Local development environment
Find the development environment that fits your needs.
-
Translations
Quicktip: Using placeholders in language strings
Make language translations more powerful with placeholders.
-
Forms
Email contact form
Create a basic contact form that sends HTML or plain text emails.
-
Setup
How we built getkirby.com
Learn more about the hidden gems and secrets in our own website.
-
Setup
Kirby meets Composer
Install and update Kirby via Composer.
-
Setup
Kirby meets Git
Install and update Kirby via Git
-
Content
Sitemap for search engines
Automatically create a sitemap for search engines.
-
Content
Sorting
Use Kirby's API to sort your content by all sorts of criteria.
-
Translations
Import and export translations
Write scripts to import and export translations for external translators.
-
Integrations
IndieAuth for your site
Log in to other sites with your domain via RelMeAuth/IndieAuth.
-
Setup
Basic error hunting & prevention
When developing, debugging helps identify errors more easily.
-
Extensions
Columns in Kirbytext
Add columns to your textarea fields with this KirbyTag plugin.
-
Templating
Custom homepage title
Set a unique title for the homepage.
-
Content
Random content
Simulate activity on your site by showing random content.
-
Extensions
Cleaning up content files
Remove unused fields from content files
-
Setup
Quicktip: To slash or not to slash
How to enforce URLs with or without trailing slashes
-
Extensions
Of anchors and ToCs, part 1
Auto-replace headlines with anchors and generate a table of contents
-
Content
Filtering compendium
Filter pages, files and users with Kirby's extensive filtering methods.
-
Content
Filter collections by tags
Classify content and make it easy for visitors to find related content.
-
Content
Grouping collections
Group collections like articles, events or files by various criteria.
-
Content
Related articles
Build relations between articles using YAML content and the pages field.
-
Content
Search
Learn how to build a simple search for your site or sections of your site.
-
Content
Structured field content
Add structured data like addresses, events, etc. to your site.
-
Extensions
A/B testing with Kirby
Split visitors into groups to compare how different versions perform.
-
Extensions
Quicktip: Reusing KirbyTags in custom tags
Extend existing KirbyTags in custom tags with less hassle.
-
Forms
Uploading files from frontend
Learn how to upload files through a frontend form.
-
Translations
Quicktip: Filtering by language
Prevent fallback to default language if no translated content exist.
-
Translations
Flexible language variables
Define language variables the way you need them.
-
Integrations
Dropbox sync
Set up Dropbox sync for your site (VPS or dedicated server required).
-
Integrations
Quicktip: Simple share buttons
Add basic Twitter and Facebook buttons to your site.
-
Security
Restricting access to your site
Use Kirby’s authentication system to build login-protected pages.
-
Setup
How to migrate file metadata
Update your file meta data for Kirby 3.
-
Setup
How to upgrade Kirby 2 plugins
Adapt your existing plugins to Kirby 3's new plugin system.
-
Setup
How to upgrade from Kirby 2
Learn how to upgrade an existing project to Kirby 3.
-
Setup
How to migrate users
Move your Kirby 2 user accounts over to Kirby 3.
-
Setup
Using Kirby for multiple sites
Run multiple sites from the same Kirby installation.
-
Setup
Quicktip: Serving a page on its own domain
Serve a single page of your site on its own separate domain.
-
Setup
Editable redirects
Redirect visitors to external resources.
-
Templating
Art-directed pages
Add custom CSS and JavaScript to style individual pages without the need for additional templates.
-
Templating
Add authors to your pages
Tie pages to a person. Create an author system for your blog posts.
-
Templating
Using blueprints in the frontend
Access blueprints and use this data to control your logic.
-
Templating
Creating a Kirby-powered blog
Set up a blog system with an overview, articles, tags, feeds and more.
-
Templating
Custom post types
Create different templates for different kinds of content.
-
Templating
Generating JSON with Kirby
Create a JSON representation of your blog content in Kirby.
-
Templating
Fun with loops and collections
Foreach loops are control structures useful in many contexts.
-
Templating
Menus
Create any kind of menu you need for your project.
-
Templating
One-pager site
Create a one-pager for small companies or simple portfolios.
-
Templating
Pagination
Use pagination to divide content into a list of digestible chunks.
-
Templating
Kirby templates 101
Learn some PHP basics that make creating templates a breeze.
-
Templating
Previous / Next navigation
Create a previous/next navigation for your site.
-
Text
Custom content fields
Structure your content in the most flexible way with custom fields.
-
Text
Working with dates
Use dates in your content files and output different date formats.