You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The theme declares two layout options, hide_toc and hide_search. The docs say they hide the contents drawer and its toolbar toggle, and the toolbar search control, either site-wide or on one page. Nothing acts on either value. Set either one to true in site.options, or under site: in a page's frontmatter, and the page still renders the contents drawer (a closed popover), its "Table of contents" toggle and the "Search" trigger.
Page.tsx reads both values and passes them to NavigationAndArticleWrapper, and the next component down drops them. The trace below is from the code at d504555:
ContentsSidebar() takes no props and returns null only when there is no site manifest. Otherwise it renders the popover drawer
No other code acts on the values. A git grep for hide_toc, hide_search and hideSearch at d504555 finds no other reader in app/. In @myst-theme/site 1.3.0, only TopNav, Navigation and PrimarySidebar take these flags, and the theme imports none of them.
The CLI drops every site.options key that the template does not declare (see #173). Neither option was declared until #194, which shipped in v2.7.0 (CHANGELOG.md L70-L81). Before that, a site-wide value never reached the theme. Now it arrives and nothing uses it. A page's site: block is checked against the same declarations (mystmd packages/myst-cli/src/frontmatter.ts L83-L91).
No test checks what either option does:
The only use of either key in the test fixture is hide_search: false in tests/visual/fixture/features.md L31-L33. It is there so a declared per-page key sits next to the page's git_metadata override. It does not test what the option does.
Scale: no lecture site is known to set either key. On 2026-09-11, GitHub code search across the QuantEcon organisation (default branches) found both keys only in this repository. The people affected are authors who follow the docs: the option passes validation, reaches the theme and silently does nothing.
Proposed change
Make both options work where the wrapper renders the page chrome:
In NavigationAndArticleWrapperInternal, destructure hide_toc and hideSearch. Render <ContentsSidebar /> only when hide_toc is not set, and pass both flags to <Toolbar />.
In Toolbar, leave out the <li> around <SidebarToggle /> when hide_toc is set, and the <li> around <Search /> when hideSearch is set. Another option is to keep the <li> and give it empty:hidden, as the toolbar's other optional slots do. Either way, avoid an empty <li>: the row spaces items with gap-x-*, so an empty <li> still takes a gap (Toolbar.tsx L36-L42).
Not rendering <Search /> also removes the Cmd/Ctrl+K shortcut, because the component registers that listener itself (Search.tsx L617-L634). Upstream works the same way. @myst-theme/site 1.3.0 renders {!hideSearch && <Search />} (src/components/Navigation/TopNav.tsx line 170), and its Search registers the shortcut inside the component (src/components/Navigation/Search.tsx lines 614-631). Say this in docs/configuration.md.
Add a Playwright test next to site-options. It should load a fixture page that sets both options to true under site: and assert there is no "Search" button, no "Table of contents" button and no drawer. It should also check that another fixture page still has all three.
app/components/ErrorPage.tsx L5-L18 mounts the wrapper with no props. With the change above, a site-wide value would not apply to 404 and error pages. Either pass the site-wide values there too, or say in the docs that error pages keep both controls.
Maintainers may prefer not to support these options. The consistent alternative is then to remove them from template.yml, app/types.ts, Page.tsx, the wrapper's props, docs/configuration.md, docs/layout.md, README.md, and the hide_search: false line in the fixture. #194 took that route for the never-read hide_outline, hide_title_block, hide_footer_links and outline_maxdepth.
Acceptance criteria
If the options are implemented (the proposed change):
hide_toc: true in site.options removes the contents drawer and the "Table of contents" toggle from every article page. Set under site: in one page's frontmatter, it removes them from that page only.
hide_search: true removes the "Search" trigger and the Cmd/Ctrl+K shortcut, site-wide or on one page in the same way.
With neither option set, the toolbar and drawer look and behave as they do today.
Hiding a control leaves no empty <li> and no extra gap in the toolbar row.
A Playwright test in the visual fixture fails if either option stops working.
docs/configuration.md, docs/layout.md and README.md describe the shipped behaviour, including the search shortcut and what error pages do.
If maintainers remove the options instead:
Neither key remains in template.yml, app/, docs/, README.md or tests/visual/fixture, and the CHANGELOG records the removal.
Context
Source: the 2026-09-11 book-theme parity study, rows F021 (toolbar search box and search results page) and F002 (left "Contents" drawer and toolbar toggle). The report lists this in section 3.4, "Housekeeping before closing", under "File issues for target defects found in passing". Both rows call it a defect in this theme, not a gap in parity with the book theme. The report says the options are "never read", which is not quite right: Page.tsx reads both values, but nothing acts on them.
In the same study, row F093 treats the book theme's inert single_page option as covered by the declared hide_toc. That is only true once hide_toc works.
First recorded as item 18, "hide_toc / hideSearch props unused", in the Low Priority table of the February 2026 technical review in Technical Review & Feature Comparison — February 2026 #33. That issue was closed on 2026-06-13, but item 18 was never dealt with.
History: the repository's first commit passed both flags to upstream's TopNav in app/routes/$.tsx L110. d1ac95aac (2025-02-14) replaced that with the custom <Toolbar /> inside the new NavigationAndArticleWrapper. No component has used the flags since.
Problem
The theme declares two layout options,
hide_tocandhide_search. The docs say they hide the contents drawer and its toolbar toggle, and the toolbar search control, either site-wide or on one page. Nothing acts on either value. Set either one totrueinsite.options, or undersite:in a page's frontmatter, and the page still renders the contents drawer (a closed popover), its "Table of contents" toggle and the "Search" trigger.Page.tsxreads both values and passes them toNavigationAndArticleWrapper, and the next component down drops them. The trace below is from the code at d504555:site:block oversite.options, then passeshide_tocandhideSearch={hide_search}toNavigationAndArticleWrapperchildren, and renders<Toolbar />and<ContentsSidebar />with no propsToolbar()takes no props, and<SidebarToggle />and<Search />render unconditionallyContentsSidebar()takes no props and returnsnullonly when there is no site manifest. Otherwise it renders the popover drawerNo other code acts on the values. A
git grepforhide_toc,hide_searchandhideSearchat d504555 finds no other reader inapp/. In@myst-theme/site1.3.0, onlyTopNav,NavigationandPrimarySidebartake these flags, and the theme imports none of them.The CLI drops every
site.optionskey that the template does not declare (see #173). Neither option was declared until #194, which shipped in v2.7.0 (CHANGELOG.md L70-L81). Before that, a site-wide value never reached the theme. Now it arrives and nothing uses it. A page'ssite:block is checked against the same declarations (mystmd packages/myst-cli/src/frontmatter.ts L83-L91).No test checks what either option does:
hide_search: falsein tests/visual/fixture/features.md L31-L33. It is there so a declared per-page key sits next to the page'sgit_metadataoverride. It does not test what the option does.site-optionstest (tests/visual/theme.spec.ts L505-L546) checks onlytwitterandfavicon.Scale: no lecture site is known to set either key. On 2026-09-11, GitHub code search across the QuantEcon organisation (default branches) found both keys only in this repository. The people affected are authors who follow the docs: the option passes validation, reaches the theme and silently does nothing.
Proposed change
Make both options work where the wrapper renders the page chrome:
NavigationAndArticleWrapperInternal, destructurehide_tocandhideSearch. Render<ContentsSidebar />only whenhide_tocis not set, and pass both flags to<Toolbar />.Toolbar, leave out the<li>around<SidebarToggle />whenhide_tocis set, and the<li>around<Search />whenhideSearchis set. Another option is to keep the<li>and give itempty:hidden, as the toolbar's other optional slots do. Either way, avoid an empty<li>: the row spaces items withgap-x-*, so an empty<li>still takes a gap (Toolbar.tsx L36-L42).<Search />also removes the Cmd/Ctrl+K shortcut, because the component registers that listener itself (Search.tsx L617-L634). Upstream works the same way.@myst-theme/site1.3.0 renders{!hideSearch && <Search />}(src/components/Navigation/TopNav.tsx line 170), and itsSearchregisters the shortcut inside the component (src/components/Navigation/Search.tsx lines 614-631). Say this in docs/configuration.md.site-options. It should load a fixture page that sets both options totrueundersite:and assert there is no "Search" button, no "Table of contents" button and no drawer. It should also check that another fixture page still has all three.app/components/ErrorPage.tsx L5-L18 mounts the wrapper with no props. With the change above, a site-wide value would not apply to 404 and error pages. Either pass the site-wide values there too, or say in the docs that error pages keep both controls.
Maintainers may prefer not to support these options. The consistent alternative is then to remove them from template.yml, app/types.ts, Page.tsx, the wrapper's props, docs/configuration.md, docs/layout.md, README.md, and the
hide_search: falseline in the fixture. #194 took that route for the never-readhide_outline,hide_title_block,hide_footer_linksandoutline_maxdepth.Acceptance criteria
If the options are implemented (the proposed change):
hide_toc: trueinsite.optionsremoves the contents drawer and the "Table of contents" toggle from every article page. Set undersite:in one page's frontmatter, it removes them from that page only.hide_search: trueremoves the "Search" trigger and the Cmd/Ctrl+K shortcut, site-wide or on one page in the same way.<li>and no extra gap in the toolbar row.If maintainers remove the options instead:
Context
Page.tsxreads both values, but nothing acts on them.single_pageoption as covered by the declaredhide_toc. That is only true oncehide_tocworks.hide_toc/hideSearchprops unused", in the Low Priority table of the February 2026 technical review in Technical Review & Feature Comparison — February 2026 #33. That issue was closed on 2026-06-13, but item 18 was never dealt with.TopNavin app/routes/$.tsx L110. d1ac95aac (2025-02-14) replaced that with the custom<Toolbar />inside the newNavigationAndArticleWrapper. No component has used the flags since.