Colour scheme choice on one website changes every other Quarto site on the same origin
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 58/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript
- 領域
- frontend
研究方向
Start with src/resources/formats/html/templates/quarto-html-before-body.ejs, linked in the issue, and inspect how the colour scheme preference is read and stored. Reproduce with two rendered sites under one local HTTP origin using the supplied steps. Done means changing the colour scheme on one site leaves the other site's choice unchanged; the reader mode and tabset keys are noted as related but are not confirmed by the reporter.
由索引模型根據 Issue 內容生成。
描述
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
Quarto stores the reader's colour scheme choice under one fixed localStorage key, quarto-color-scheme.
localStorage is per origin, so every Quarto site served from the same origin reads and writes the same value.
This is the usual layout for project sites on GitHub Pages, where user.github.io/site-a/ and user.github.io/site-b/ share the origin user.github.io.
A reader who switches site-a to dark finds site-b dark on their next visit, although they never touched its toggle.
The reader mode (quarto-reader-mode) and tabset (quarto-persistent-tabsets-data) keys are fixed in the same way.
I only tested the colour scheme.
Related: #15296 (the same code throws when storage is blocked).
Steps to reproduce
Two website projects, site-a and site-b, each with this _quarto.yml (only the title differs):
project:
type: website
website:
title: "site-a"
navbar:
left:
- index.qmd
format:
html:
theme:
light: flatly
dark: darkly
index.qmd:
---
title: "site-a"
---
Hello.
- Run
quarto renderin each folder. - Serve the parent folder over HTTP, for example
python3 -m http.server, so both sites share one origin. - Open
/site-b/_site/index.html: it is light. - Open
/site-a/_site/index.htmland click the colour scheme toggle. - Open
/site-b/_site/index.htmlagain.
Actual behavior
site-b opens dark.
State read in Chromium 156 with a light system preference:
site-b first visit: {'body': 'quarto-light', 'stored': None}
site-a before toggle: {'body': 'quarto-light', 'stored': None}
site-a after toggle: {'body': 'quarto-dark', 'stored': 'alternate'}
site-b next visit: {'body': 'quarto-dark', 'stored': 'alternate'}
https://github.com/user-attachments/assets/af5995a0-b13e-4eab-ac2d-2155ce1c39b8
Expected behavior
Each site keeps its own choice.
One option is a key that includes the site path, for example the site-url path or the site root that Quarto already knows at render time.
Your environment
- IDE: none, command line.
- OS: macOS 27.2.
- Browser: Chromium 156.0.8078.4 (Playwright).
Quarto check output
Reproduced with a development build of main at 089ba530b.
The template is the same at the v1.11.9 tag.
Quarto 99.9.9
[✓] Checking environment information...
Quarto cache location: /Users/mcanouil/Library/Caches/quarto
Project: none found (single-file mode)
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.107.1: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 089ba530b3ed4ec156a355d41b6b7de2db3e44ea
Path: /Users/mcanouil/Projects/quarto-dev/quarto-cli/package/dist/bin
[✓] Checking tools....................OK
TinyTeX: v2026.07
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/mcanouil/Library/TinyTeX/bin/universal-darwin
Version: 2026
[✓] Checking Chrome Headless....................OK
Using: Chrome from QUARTO_CHROMIUM
Path: /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
[✓] Checking basic markdown render....OK
- 主要語言
- JavaScript
- 星號
- 6.2k
- 分支
- 482
- 平均合併
- 17 小時 46 分鐘
- 30 天內合併 PR
- 135
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
quarto-dev/quarto-cli 的其他 Issue
-
bug listings
難度 2/5 1-3 小時 新手友好度 72/100
quarto-dev/quarto-cli#15340 ·
維護者通常 1 天內回覆
-
brand bug typst
難度 2/5 1-3 小時 新手友好度 78/100
quarto-dev/quarto-cli#15311 ·
維護者通常 1 天內回覆
-
Notebook preview header title takes the heading colour on the primary background可能已有人在做 @SabyaXSachi 於 5 天前認領。 未關閉accessibility bug embed
難度 2/5 1-3 小時 新手友好度 85/100
quarto-dev/quarto-cli#15306 · 1 則留言 ·
維護者通常 1 天內回覆
-
bootstrap bug themes
難度 2/5 1-3 小時 新手友好度 82/100
quarto-dev/quarto-cli#15304 ·
維護者通常 1 天內回覆
-
accessibility bug code-blocks html themes
難度 2/5 1-3 小時 新手友好度 78/100
quarto-dev/quarto-cli#15303 ·
維護者通常 1 天內回覆
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
0. Needs triage bug feature: api
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
agent-os ai bug good first issue help wanted
難度 1/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
area: documentation good first issue package: rule-data status: accepting prs
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
status: needs triage
難度 2/5 1-3 小時 新手友好度 85/100
mastra-ai/mastra#30109 · 2 則留言 ·
維護者通常 1 天內回覆