Skip to content

allow a site theme to include multiple styles - #904

Open
parmentelat wants to merge 3 commits into
jupyter-book:mainfrom
flotpython:feat/2022
Open

allow a site theme to include multiple styles#904
parmentelat wants to merge 3 commits into
jupyter-book:mainfrom
flotpython:feat/2022

Conversation

@parmentelat

@parmentelat parmentelat commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

implements multiple style clauses in a theme as discussed in
jupyter-book/mystmd#2022

requires jupyter-book/mystmd#2910

Copilot AI review requested due to automatic review settings June 16, 2026 14:52
@netlify

netlify Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploy Preview for myst-theme failed. Why did it fail? →

Built without sensitive environment variables

Name Link
🔨 Latest commit 0e2a422
🔍 Latest deploy log https://app.netlify.com/projects/myst-theme/deploys/6a316cf5606a3400088cfd1c

@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0e2a422

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

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.

This PR updates the Book and Article themes to support configuring multiple custom CSS files via the style option and loads them in deterministic order.

Changes:

  • Marked the style option as multiple: true in both theme templates.
  • Updated both themes’ getCustomStyleSheet() to normalize style to an array, fetch all styles, and concatenate results in declared order.
  • Updated common manifest link-rewriting to handle style as either a single value or an array.

Reviewed changes

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

Show a summary per file
File Description
themes/book/template.yml Declares style as a multi-value option and updates its description accordingly.
themes/book/app/utils/loaders.server.ts Loads and concatenates multiple custom stylesheets.
themes/article/template.yml Declares style as a multi-value option and updates its description accordingly.
themes/article/app/utils/loaders.server.ts Loads and concatenates multiple custom stylesheets.
packages/common/src/utils.ts Extends static link rewriting to support array-valued style.

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

Comment thread themes/book/app/utils/loaders.server.ts
Comment thread themes/article/app/utils/loaders.server.ts
Comment thread themes/book/template.yml Outdated
Comment thread themes/article/template.yml Outdated
Comment thread themes/book/app/utils/loaders.server.ts
@choldgraf

choldgraf commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

A few process comments:

  • Please use a more informative title than this. The title should describe the change you're making without the author needing to read the PR text to understand it.
  • Please link to a pre-existing github issue where we've discussed this and aligned on a general path forward, or at least +1'ed the idea in general. Merging this PR should close that issue (or in some cases make it explicit the part of the issue that it complets)

@parmentelat parmentelat changed the title Feat/2022 allow a site theme to deal with multiple styles Jun 16, 2026
@parmentelat parmentelat changed the title allow a site theme to deal with multiple styles allow a site theme to include with multiple styles Jun 16, 2026
@parmentelat

Copy link
Copy Markdown
Contributor Author

apologies, this now should be better regarding your comments

@parmentelat parmentelat changed the title allow a site theme to include with multiple styles allow a site theme to include multiple styles Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants