When writing for the web, nobody really wants to wrap HTML tags around text. On the other hand, most WYSIWYG editors produce awful HTML output and have tons of other issues. In Kirby, content is therefore marked up and formatted in Markdown or our extended version of it, which we call KirbyText.
The following Markdown tags are available to add simple formatting to your text.
Line breaks & paragraphs
If you need even more options to format text, like footnotes, tables, definition lists, etc. you can activate Markdown Extra in your config file to use those additional formats:
In addition to Markdown, Kirby automatically parses a set of handy tags in your text, whenever you use the
->kirbytext() field method to render content in your templates. Those tags make it simple to embed links, images, videos and more.
Adds a dynamic date to the text
Creates an email address link
Creates a download link for any file
Embeds a GitHub Gist by URL
Embeds an image
Creates a link
Embeds a linked telephone number
Creates a link to a Twitter profile
Embeds a YouTube or Vimeo video by URL
Using KirbyTags in templates
You can even use KirbyTags in your templates with the
kirbytag() helper, for example to embed a video quickly:
<?= kirbytag([ 'video' => 'http://vimeo.com/3432886', 'width' => 400, 'height' => 400 ]);
You'd love to have a special tag for embedding cat pictures from http://placekitten.com/ or you need some other tags for your next client project?
KirbyText is extensible, so you can actually build in all the great features you need.
SmartyPants is a handy little helper to convert typical formatting issues in text into a typographically correct version. This includes quotes, dashes and more.
When you activate SmartyPants in your config, SmartyPants rules are automatically applied whenever you use the
->smartypants() field methods.