Bases

Bases are filtered, sorted, table-or-card views over your vault's pages — the same idea as Obsidian's Bases plugin, but rendered statically at build time. They're declared as .base files (YAML), embedded into pages via the same ![[Foo]] syntax as image embeds, and resolved against page frontmatter.

The example on the homepage

The homepage embeds NPCs.base (in the vault root) which queries the NPCs/ folder. Here's the same Base, re-embedded:

The .base source:

filters:
  and:
    - 'file.folder == "NPCs"'
    - 'file.name != "index"'
properties:
  note.role-class: { displayName: Class }
  note.location: { displayName: Location }
views:
  - type: cards
    name: Roster
    image: image
    imageFit: cover
    imageAspectRatio: 1
    order:
      - file.name
      - note.role-class
      - note.location
  - type: table
    name: Stats
    order:
      - file.name
      - note.role-class
      - note.cr
      - note.location

Two views were declared (Roster cards + Stats table); both render in order. Each card's cover image comes from the page's image: frontmatter (falling back to body auto-discovery — see Images).

View types

TypeUse for
tableSpreadsheet-style. Good for stat blocks, item indexes.
cardsVisual grid with cover images. Good for NPC rosters, location galleries.
listCompact bullet list with optional metadata. Good for changelogs, link catalogues.

Multiple views in one Base render as a sequence; the user doesn't tab between them.

Filtering

filters: accepts a single expression or an and/or tree:

# Simple
filters: 'role == "patron"'

# Combined
filters:
  and:
    - 'file.folder == "NPCs"'
    - 'cr >= 2'
    - or:
        - 'role-class == "Ranger"'
        - 'role-class == "Rogue"'

Available functions: file.inFolder("NPCs"), file.hasTag("villain"), plus comparison operators (==, !=, <, <=, >, >=, contains, startsWith, endsWith).

Sorting + limits

views:
  - type: table
    sort:
      - { column: "note.cr", direction: DESC }
      - { column: "file.name", direction: ASC }
    limit: 10

Multi-key sort breaks ties from earlier columns with later ones.

Computed columns

You can declare formula columns and reference them as formula.<name>:

formulas:
  hp_per_cr: 'note.hp / max(1, note.cr)'
views:
  - type: table
    order:
      - file.name
      - formula.hp_per_cr

Formulas can reference other formulas (cycle detection inline-renders an error block instead of crashing the build).

Standalone view names

Embed a specific view by name with a # anchor:

![[NPCs#Stats]]      # render only the Stats view
Stats
3 rows
NameClasscrLocation
Aelar GalanodelRanger3Mossfoot Inn
Bram MossfootCommoner0Mossfoot Inn
Dr. Bixby WizzlethorpeArchmage12Mossfoot Inn (sabbatical)

Useful when the same Base wants to appear in different shapes on different pages.

Updated