Alcove CMS
Ru

Part I, Basics

Alcoves and inline data

A folder with a template and the rows it shows.

An alcove is a folder in content/alcoves/. The folder name is the alcove name, which pages use in their nooks and other templates use in {{ alcove:name }}.

FileRole
blueprint.htmlRequired. The template of the alcove.
tile.htmlOptional. The template for one row.
alcove.yamlOptional. Where the rows come from, their fields, tiles, cache, form.
reveal.htmlOptional. A page of its own for every row. See Detail pages.

Rows come from exactly one place. data: keeps them in the YAML file, which suits copy, menus and short lists. query: reads them from the database. See Migrations and queries.

{{ tiles }} in the blueprint is replaced by every row rendered with the tile. Placeholders in the blueprint itself use the first row.

Live result This page is a static file, built once.

  • Headings

    A site made of plain files

    Cormorant Garamond

  • Body text

    Pages in YAML, templates in HTML.

    EB Garamond

  • Code

    ./alcove -dir ./content

    IBM Plex Mono

Source the files behind the result above

content/alcoves/demo_typefaces/alcove.yaml

fields:
  - name: name
    type: text
    required: true
  - name: role
    type: text
    required: true
  - name: sample
    type: text
    required: true
data:
  - name: Cormorant Garamond
    role: Headings
    sample: A site made of plain files
  - name: EB Garamond
    role: Body text
    sample: Pages in YAML, templates in HTML.
  - name: IBM Plex Mono
    role: Code
    sample: ./alcove -dir ./content

content/alcoves/demo_typefaces/blueprint.html

<ul class="specimens">{{ tiles }}</ul>

content/alcoves/demo_typefaces/tile.html

<li>
  <p class="specimen-role">{{ role }}</p>
  <p class="specimen-sample" style="font-family: '{{ name }}'">{{ sample }}</p>
  <p class="specimen-name">{{ name }}</p>
</li>