directory

A simple records listing — a faculty directory, an alumni list, an item catalog. Pinned to @unipress/data. Outputs an Excel workbook (one sheet, one row per record) or a Word listing.

Scaffold

unipress create faculty --template directory --title "Faculty Directory" --author "Dean's Office"
cd faculty
unipress compile . --format xlsx --out faculty.xlsx

What you get

faculty/
├── document.yml          pinned to @unipress/data@<version>; one queryable query
├── records/
│   └── members/          three sample records
└── content/
    └── directory/        cover (Loom-rendered count) + listing

document.yml fields

FieldPurpose
nameWorkbook title.
formatxlsx (default) or docx.
indexRoutes / → content/directory.
queries.membersThe query over the records in records/members/.
queries.members.queryableFilterable fields — drives the FilterPanel UI.

Add an entry

Drop a YAML file under records/members/. Filename (stem) becomes the slug:

# records/members/your-name.yml
name: "Your Name"
role: member          # or lead / advisor
department: sciences  # or engineering / humanities
active: true
email: you@example.org
joined_year: 2024

Adjust the queryable fields

The fields exposed in the FilterPanel UI come from document.yml's collections.members.queryable: block. Each field becomes a control:

  • enum → multi-select dropdown.
  • boolean → toggle.
  • range → numeric range input.
  • text → search box (substring match).

Add a joined_year: range field, for example, if filtering by start year matters for your directory.

Hand-pick the displayed columns

The Members section reads every key from each record by default. To restrict the columns shown in the web preview and the xlsx export, set columns: on the section frontmatter in content/directory/members.md.

When to pick directory over data-report

  • The data is one flat collection of records (faculty, members, alumni, items).
  • You want a single listing, not aggregate metrics broken out by axis.
  • Filterability + a tabular export is the entire point.

For multi-section aggregate reports (publications-by-year, funding totals, supervision counts), use data-report.

Foundation reference

@unipress/data — see the foundation's README: framework/unipress/foundations/data/README.md.