Templates

Camyll uses the Jingoo templating engine. Camyll has two types of templates:

  • Layouts, which are whole-page templates.
  • Includes, which are partial templates that are included in other templates.

Built-ins

In addition to the functions provided by Jingoo, Camyll offers two additional built-in functions:

format_date(format : string, date : float) : string

Formats a date given in Unix time. The format string is that of the Calendar library, which itself closely follows the Unix date command.

slugify(str : string) : string

"Slugifies" a string for use in a URL, consistent with Camyll's internal slugify operation. This function is useful for getting the URL of a tag page.

Pages

Individual pages have the following names in scope:

  • content - The content of the page, expressed in HTML.
  • frontmatter - The page frontmatter.
  • pages - All the pages in the current directory. Each page is an object of the following format:
    • frontmatter - The frontmatter of the post
    • url - The URL of the post