Adding Content

The content folder

Kirby has no database. The content for your site is stored in the /content folder. All you need to add and edit content is your Finder or Windows Explorer and a text editor.

A folder for every page

Every page of your site is represented by a subfolder of /content. You can add as many subfolders and even nest them as deep as you want or need. The folder names build the URL structure for your site. Here are some examples:

Folder URL

As you can see, it is very easy to outline your site with this simple folder structure.

Text files

Each folder contains a text file, which stores all the data for the page. The name of the text file determines, which template should be used to render the page.

Text file Template
home.txt /site/templates/home.php
about.txt /site/templates/about.php
project.txt /site/templates/project.php

If there's no template for the text file, Kirby will use /site/templates/default.php to render the page.


Text files are separated into data fields with a very simple format.

Title: About us
Intro: This is some intro text
Text: This is the text for the about page

Fields are divided by four regular dashes ---- Each field begins with the fieldname and a colon. The content of a field can be a single or multiple lines of text. You can store plain text, HTML, JSON, YAML or anything else, which can be written in plain text in a field.

Fields can be added or removed at any time and there's no limitation how many fields you have per text file. All fields are instantly available in Kirby's templates.

Each text file can contain its very own set of fields. You can even add different fields for text files with the same template. Together with the flexible folder structure you get a NoSQL-like data store with literally unlimited possibilities.

Visible and invisible pages

Pages in Kirby can be marked as visible by prepending a number to the folder name:

Visible pages


Invisible page


You can use the distinction between visible and invisible pages in your templates to only show visible pages in a menu for example. Invisible pages are still accessible via their URL.
The prepended number will be stripped from the generated URLs to keep them clean.

Sorting pages

The prepended number for visible pages also determines the order of those pages.

Manual order


Alphabetical order

The easiest way sort visible pages in alphabetical order is by prepending a zero:


Chronological order

For blogs or event pages a chronological order can be achived like this: