Kirby’s API

Kirby has a mighty API, which you can use in your snippets, templates and plugins to access each and every bit and piece of data and aspect of your site and system.

This section is about to give you a good overview of the most basic things you can do with the API. If you want to dive deeper you can find a full overview of all available API methods on the cheat sheet.

All parts of the API are inspired by the simplicity of jQuery. If you've played with jQuery before you will probably feel at home at once — even if it is PHP.

$site

The $site object represents the root of your site with all the information stored in /content/site.txt. It's also the access point for registered users, available languages on multi-language sites and more.