Пробна сторінка
українською мовою

How con­tent is stored

In Kirby, con­tent is stored within the /content direc­tory, where every page is a folder. Pages can be nested, so every of those pages/​folders may also con­tain sub­fold­ers.

Take this blog demo for exam­ple; all posts are just sub­fold­ers of the blog folder. This comes with great flex­i­bil­ity, because it is very easy to mix dif­fer­ent kinds of con­tent. In this demo, the blog only has one tem­plate for arti­cles and a cor­re­spond­ing blue­print file (/site/blueprints/article.yml) to pro­vide the cor­rect fields in the Panel when edit­ing the con­tent. But if you need dif­fer­ent fields for video posts, gallery posts etc. you can extend the blog’s func­tion­al­ity by adding cor­re­spond­ing blue­prints and tem­plates to define those post types. You needs tags? Easy as pie! Just add a tags field to your article.yml blue­print.

But if you don’t use the Panel, you also don’t need to setup blue­prints at all. That’s Kirby’s advan­tage: The con­tent files can be edited directly if you want to.

Kir­by­text

Kirby’s con­tent is writ­ten Kir­by­text by default. It is basi­cally an extended ver­sion of Mark­down or Mark­down Extra. In addi­tion to Markdown’s simple syntax, Kir­by­text also includes a bunch of useful tags. For exam­ple, to link to an email address, you can use Kirby’s email tag:

(email: hello@example.com)

It is not only hand­ier than typing “<a href="mailto: …”, but also encodes every char­ac­ter of the pro­vided email address as an HTML entity to make the life of spam­bots a little harder. You can also define your own Kir­by­tags and even over­ride the behav­ior of Kirby’s built-in tags. Your custom tags will be stored within /site/tags.


Fur­ther read­ing