Basker Docs

Template references

Per-collection field references for every content type Basker passes to your templates

This section is a per-collection reference. For each content type Basker exposes to templates, you will find:

  • The template filename Basker looks for.
  • The shape of the document object passed to the template (page, event, post, etc.).
  • Common patterns for rendering each collection.

Use it to find which fields are available on a record. Also use it when you start a new template for a collection you have not used before.

Templates by content type

Runtime routing notes

Most content types use a base Liquid template such as templates/page.liquid, templates/post.liquid, or templates/event.liquid. Some pages are route-specific instead of normal collection defaults:

  • Event detail pages use templates/event.liquid. Individual event-instance pages (/events/instances/:shortId/:date/:slug) default to templates/instance.liquid and support named variants. The event's performance list (/events/:slug/instances) is the exception: it always renders the fixed templates/instances.liquid.
  • Smart collections use templates/collection.liquid, even though the docs call the object smart-collection.
  • Dedicated routes wire category and tag pages to templates/category and templates/tags.
  • Custom not-found middleware renders 404 pages using templates/404.liquid when present.
  • Templates: how to write a template using these references.
  • Template context: the global functions and variables available alongside the per-collection document.

On this page