Skip to content

support arrays in site options - #2910

Open
parmentelat wants to merge 6 commits into
jupyter-book:mainfrom
parmentelat:feat/2729
Open

support arrays in site options#2910
parmentelat wants to merge 6 commits into
jupyter-book:mainfrom
parmentelat:feat/2729

Conversation

@parmentelat

@parmentelat parmentelat commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

a proposal to implement #2729 (whose focus is now restricted to arrays, not objects)

Copilot AI review requested due to automatic review settings June 9, 2026 18:08
@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 03a2821

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
myst-templates Minor
myst-cli Minor
mystmd Minor
myst-migrate Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the enhancement New feature or request label Jun 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for template options that accept multiple values via a new multiple flag, including validation/coercion behavior and file-option resolution in site manifests.

Changes:

  • Added multiple?: boolean to TemplateOptionDefinition and validated it in option-definition validation.
  • Updated validateTemplateOption to support list inputs (and scalar-to-list coercion) when multiple is enabled.
  • Updated site manifest file-option resolution to handle file options that validate to a list, plus added tests to cover these behaviors.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/myst-templates/src/validators.ts Wraps option validation to support multiple via list validation/coercion and validates the multiple flag on definitions.
packages/myst-templates/src/validators.spec.ts Adds unit tests for multiple option behavior across option validation, options objects, and option definitions.
packages/myst-templates/src/types.ts Extends TemplateOptionDefinition with a documented multiple flag.
packages/myst-cli/src/build/site/manifest.ts Resolves/copies file options that may now be arrays (when multiple is enabled).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/myst-templates/src/validators.ts Outdated
Comment thread packages/myst-cli/src/build/site/manifest.ts Outdated
Comment thread packages/myst-templates/src/types.ts
@parmentelat

Copy link
Copy Markdown
Contributor Author

my recent move is only about rebasing on top of the current main

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

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants