Add sidebar group icons and fix homepage sidebar#142
Conversation
Navigation icons: - Add SVG icons to "Get started", "Setup", and "Sample datasets" sidebar groups via a new sidebar-icons.js customization script - Add house icon to the homepage entry in the navigation - Add icon frontmatter to install.mdx and sample-datasets/index.mdx so the root pages of those groups show the correct icon - Register sidebar-icons.js in docs.json scripts Homepage sidebar fix: - Mintlify can't match the root URL (/) to the "Get started" nav item, so it falls back to showing the Concepts sidebar on the homepage - The homepage is a full custom landing page with its own navigation cards, so hiding the sidebar there is the right fix - sidebar-icons.js detects the homepage via pathname and toggles a `ch-is-homepage` class on <html>; CSS in styles.css uses this to hide #sidebar and expand the content area Site config: - Darken background color from #1D1D1D to #151515 in dark mode - Add Inkeep and hero card dark-mode CSS overrides to styles.css Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
The sidebar should always be visible. Removing the ch-is-homepage class toggling logic from sidebar-icons.js and the matching CSS from styles.css. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit c72c7b0. Configure here.
| var labelDiv = span.parentElement; | ||
| li.dataset.chSidebarIcon = '1'; | ||
| labelDiv.style.cssText = 'display:flex;align-items:center;gap:6px;'; | ||
| labelDiv.insertBefore(makeSvg(ICON_PATHS[title]), span); |
There was a problem hiding this comment.
Premature icon-injected flag blocks retry
Low Severity
injectIcons sets li.dataset.chSidebarIcon before insertBefore adds the SVG. If insertion fails or the label structure is incomplete on that pass, later observer runs skip that group because the flag is already set, so Setup or Sample datasets can stay without an icon until a full reload.
Reviewed by Cursor Bugbot for commit c72c7b0. Configure here.


Summary
Navigation icons
sidebar-icons.jscustomization scripticonfrontmatter toinstall.mdxandsample-datasets/index.mdxso the group root pages surface the correct iconsidebar-icons.jsindocs.jsonscripts arrayHomepage sidebar fix
/) to the "Get started" nav item, so it falls back to showing the Concepts sidebar on the homepagesidebar-icons.jsdetects the homepage viapathname === '/'(including on SPA navigations viapushState/popState) and toggles ach-is-homepageclass on<html>; CSS uses this to hide#sidebarand expand the content areaSite config
#1D1D1Dto#151515in dark mode.dark .ch-hero-card)Test plan
/) shows no sidebar — full-width layout with navigation cards/and back restores the sidebar correctly🤖 Generated with Claude Code
Note
Low Risk
Docs-site presentation and client-side DOM customization only; no auth, data, or backend behavior changes.
Overview
Adds sidebar navigation icons for Get started: new SVG assets,
iconfields on the home entry and Setup / Sample datasets groups inget-started/navigation.json, matchingiconfrontmatter on the install and sample-datasets landing pages, and asidebar-icons.jsscript (registered indocs.json) that injects gear/database SVGs into Mintlify group headers via aMutationObserver.Visual polish: dark mode page background moves from
#1D1D1Dto#151515indocs.json, with related dark styles for hero cards (.ch-hero-card) and a darker Inkeep/Radix dialog overlay (--ikp-color-overlay-darkand direct overlay selectors) in_site/styles.css.Reviewed by Cursor Bugbot for commit c72c7b0. Bugbot is set up for automated code reviews on this repo. Configure here.