Skip to content

feat(config): expose a free-form extra table - #13

Merged
Jalkhov merged 2 commits into
stablefrom
feat/extra-config
Nov 8, 2026
Merged

Jalkhov merged 2 commits into
stablefrom
feat/extra-config

Conversation

@Jalkhov

@Jalkhov Jalkhov commented Nov 8, 2026

Copy link
Copy Markdown
Member

What

  • Expose a free-form [extra] table from site.toml as site.extra in templates
  • Fail with ConfigError when [extra] is not a table
  • Document the new table and the StrictUndefined lookup pattern

Why

Complex themes need site-wide values (footer text, social links, sidebar order) that do not belong in the fixed [site] schema. The example sites planned under examples/ need them.

Notes

  • Backwards compatible: sites without [extra] get an empty mapping.
  • 51 tests pass.

- Add an `extra` mapping to `Config` and expose it to templates as
  `site.extra`
- Reject non-table values with a ConfigError instead of failing later
- Cover the new field with tests
- Describe `[extra]`, its type constraint and the StrictUndefined lookup
  pattern for optional keys
@Jalkhov
Jalkhov merged commit 9cf515c into stable Nov 8, 2026
9 checks passed
@Jalkhov
Jalkhov deleted the feat/extra-config branch November 8, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant