Skip to content

Theme.toml [extra] config aren't loaded when developing a theme #2973

@bitinn

Description

@bitinn

Bug Report

I am developing a theme, but Zola doesn't read the root directory's theme.toml[extra] while serving; I have to manually copy the same variables into config.toml [extra], in order for templates to read config.extra.xxxxxx properly.

Environment

Zola version: zola-v0.21.0-aarch64-apple-darwin

Expected Behavior

It would be great to read the default value from theme.toml when we are developing a theme.
(An option to read multiple toml might also work.)

Current Behavior

theme.toml [extra] config has no effect on a site.

Step to reproduce

  1. zola init theme-name
  2. add theme.toml and a [extra] section with a custom variable
  3. try to read this value in template without declaring in config.toml

The doc made it sound like theme.toml extra are merged with config.toml extra, but instead theme.toml extra aren't used.
https://www.getzola.org/documentation/themes/creating-a-theme/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions