The site variable is the mother of all variables in Kirby. It's a huge object which contains everything else. You will find more about this later, but the most important parts for your templates are:
<?php echo $site->title() ?>
This is defined in content/site.txt
and you can use that to set the global name of your site and probably use it for the title tag in your templates.
<?php echo $site->description() ?>
This is defined in content/site.txt
as well and will hold the description for your description meta tag.
<?php echo $site->keywords() ?>
Well, that one is defined in content/site.txt
again and I guess you know what you can do with that :)
<?php echo $site->modified() ?>
Returns the date and time of the site’s most recent modification.
In general all the fields you define in the content/site.txt
file will be available that way. So if you define a field for copyright for example:
Copyright: John Doe
----
You can access it in your templates like this:
<?php echo $site->copyright() ?>
BTW: Field names will always be converted to lowercase variables.
The site variable also contains an URI object, which has some nice information about the current url, path and query.
To learn more about the URI object, please read the URI tutorial…