Skip to content

Feature development: Allow reveal.js configuration from notebook metadata with correct precedence#11

Merged
bouzidanas merged 2 commits intomainfrom
Feature-Development
Dec 14, 2025
Merged

Feature development: Allow reveal.js configuration from notebook metadata with correct precedence#11
bouzidanas merged 2 commits intomainfrom
Feature-Development

Conversation

@bouzidanas
Copy link
Copy Markdown
Owner

This request introduces a flexible configuration system for reveal.js slides, allowing users to pass a full configuration dictionary directly from notebook metadata.

Previously, only a limited set of reveal.js options were made accessible via the command line and the configuration file. Now, any option can be set via a reveal key in the notebook's metadata, which is passed directly to Reveal.initialize().

This change also establishes and enforces a clear order of configuration precedence (override order):

  1. Command-line arguments (highest)
  2. Notebook metadata (metadata.reveal)
  3. Config file (SlidesExporter.reveal_config)
  4. Hard-coded defaults (lowest)

Key improvements include:

  • A new Dict traitlet for config file settings.
  • Updated logic to correctly layer configurations.
  • A robust check for command-line arguments, fixing previous AttributeError bugs.
  • The index.html.j2 template is now enhanced to safely merge the dynamic configuration, preserving essential default values and preventing empty metadata from overriding them.

@bouzidanas bouzidanas added the enhancement New feature or request label Dec 14, 2025
@bouzidanas bouzidanas merged commit 0b1516c into main Dec 14, 2025
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant