The Twig-function markdown(string $markdown) takes a string with markdown syntax and returns html. It is useful if the author should be able to use markdown syntax in the theme settings, for example to create content for the footer.

Example Usage

<div class="sidebar-box">
    {{ markdown(settings.themes.mytheme.sidebar) }}

This will render the markdown-content that the author has added into the textarea of the theme-settings. The definition of the input file in the theme-configuration with yaml looks like this:

  type: textarea
  label: Add some text for the sidebar with markdown
  placeholder: Add markdown here