Skip to content

$id

Defines a unique identifier for something. Identifiers are case sensitive. For instance:

Our cats table is now globally identified as my-cats. You can render it on any page of the site by this name:

simple.yaml
$id: my-cats

table:columns:
  - name
  - color
  - birthday

table:rows:
  - name: Ray
    color: Red
    birthday: 2010-01-01
  - name: Smoky
    color: Gray
    birthday: 2010-12-10

table:order-by: birthday
Name Color Birthday
Ray Red 2010-01-01
Smoky Gray 2010-12-10

Other uses

Unique identifiers can be assigned to rows, columns, and generally to any node of Iolanta graph. For instance:

arda-countries.yaml
$id: arda-countries

table:columns:
  - $id: country-name
    title: Name of the country

table:rows:
  - country-name: Angmar
    $id: angmar
  - country-name: Mordor
  - country-name: Gondor
Name of the country
Angmar
Mordor
Gondor

Here, country-name becomes a global identifier. Check {{ render(…) }} to see how to use it.

Prefixes

Identifiers can have prefixes. For instance, table:columns is an identifier which has table: prefix. That prefix is associated with a URL:

  • table: = https://mkdocs.iolanta.tech/tables/
  • and therefore table:columns = https://mkdocs.iolanta.tech/tables/columns

whence you can find a page describing what table:columns really means ;)

This self-documenting trait of identifiers is widely used in Iolanta ecosystem.