Skip to content

Reusable Oliver hooks for frontmatter field injection #269

Description

@drawmeanelephant

Source: home/todo.md:201

Create reusable Oliver hooks to inject frontmatter fields into rendered documents.

Coordinates upstream with the Oliver project — check whether oliver wrap/meta (Phase 6 S1/S2, contract 1.11) already cover the need before designing anything Rotkeeper-side. If gaps remain, propose the hook shape upstream rather than working around it in Bash.

Status: implemented (2026-08-27)

Coordination (done, v2)

Checked upstream, found the gap, proposed the hook shape there rather than in Bash: oliver #126 extended wrap's dialect with version/subtitle/tags/asset_meta/navigation/warnings tokens, the pin moved 06dd6408460f28, and the adapter feeds them from bones/config/version + frontmatter (yq --front-matter extract). Documented as oliver-contract.md v1.13 (shared template contract v2, rotkeeper #244/#299).

Reusable hook (done, v3)

The remaining "reusable" gap — adding a field still meant upstream struct/fieldVal changes plus a pin move — is closed by the v3 generic hook: wrap now interpolates any key present in --meta-json (strings html-escaped, null → empty, other scalars stringified, objects/arrays compact-JSON, $if$ gating, absent → verbatim). The adapter merges every other scalar frontmatter key into wrap_meta with typed keys winning, so a new field needs no upstream change — just frontmatter + a $field$ reference in the template.

Closes the "check upstream / propose hook shape upstream" mandate with the generic mechanism shipped end-to-end.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions