Kirby Blueprint
Create and modify Kirby CMS blueprints for this project.
Project Structure
code
app/blueprints/
├── site.yml # Site-wide settings
├── pages/
│ ├── home.yml
│ ├── default.yml
│ ├── error.yml
│ └── legal-notice.yml
├── fields/ # Reusable field definitions
│ ├── cards.yml
│ └── references.yml
└── users/
└── default.yml
Page Blueprint Structure
yaml
title:
en: Page Title
fr: Titre de la page
icon: emoji
columns:
- width: 7/12
icon: text
label: Content
fields:
fieldName:
label: Field Label
type: text
- width: 5/12
fields:
seo: fields/seo/meta
Common Field Types
Text Fields
yaml
title: label: Title type: text maxlength: 100 description: label: Description type: textarea maxlength: 300
Structure (Repeatable)
yaml
items:
label: Items
type: structure
fields:
name:
label: Name
type: text
width: 1/3
description:
label: Description
type: text
width: 2/3
url:
label: URL
type: url
Extending Fields
yaml
myField: extends: fields/references
URL/Email
yaml
website: label: Website type: url placeholder: "https://example.com" email: label: Email type: email
Pages Reference
yaml
navigation: label: Navigation type: pages
Images
yaml
image: label: Image type: files max: 1 query: page.images
Site Blueprint (site.yml)
yaml
title: Content
options:
changeTitle: true
columns:
left:
width: 1/2
sections:
pages:
label: Pages
status: all
right:
width: 1/2
sections:
global:
type: fields
fields:
email:
label: Email
type: email
linkedin:
label: LinkedIn
type: url
Best Practices
- •Use
widthfor field layout (1/2, 1/3, 2/3, etc.) - •Extend common fields with
extends: fields/fieldname - •Add translations for labels:
label: { en: ..., fr: ... } - •Use meaningful icons for pages
- •Group related fields in columns/sections
- •Keep blueprints DRY with field extensions