From 47cd0a9e2ed3ea00ee1a46c35cb5a6b010566029 Mon Sep 17 00:00:00 2001 From: Carlotta Castelluccio <82521518+carlotta94c@users.noreply.github.com> Date: Thu, 22 Oct 2026 11:36:45 +0000 Subject: [PATCH] fix: collapse inactive workshop sidebar groups Keep the current workshop prominent by collapsing category and workshop groups by default. Starlight expands the branch containing the active lesson. Document this convention for future sidebar additions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- website/README.md | 1 + website/astro.config.mjs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/website/README.md b/website/README.md index bdca0da2..39972b09 100644 --- a/website/README.md +++ b/website/README.md @@ -18,6 +18,7 @@ npm run preview # preview the production build ## Site config - `astro.config.mjs` — Site URL, base path, `locales` block, sidebar (manually maintained). + Workshop categories and workshop groups default to collapsed; Starlight automatically expands the branch containing the current page. Keep this behavior when adding groups so similarly named workshops in different categories are not confused. - `src/content.config.ts` — Content collection loader. Its `base` points at `../docs`, so lesson Markdown is sourced from the repo-root content directory. Excludes underscore-prefixed directories so support assets such as `_images/` aren't routed as pages. - `src/components/` — Site-shell components (`.astro`). Lesson content does **not** live here. - `src/pages/` — Standalone Astro routes outside the content collection. Currently just `shared/0-prereqs.astro`, the full-HTML redirect that forwards the legacy `/shared/0-prereqs/` URL to the home page (prerequisites are now per-harness at `//0-prerequisites/`). diff --git a/website/astro.config.mjs b/website/astro.config.mjs index f4622ef8..b46bb21f 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -60,6 +60,7 @@ export default defineConfig({ }, { label: 'First steps', + collapsed: true, translations: { 'es-ES': 'Primeros pasos', 'ja-JP': 'はじめの一歩', @@ -81,6 +82,7 @@ export default defineConfig({ }, { label: 'GitHub Copilot app', + collapsed: true, translations: { 'ko-KR': 'GitHub Copilot 앱', }, @@ -254,6 +256,7 @@ export default defineConfig({ }, { label: 'GitHub Copilot CLI', + collapsed: true, items: [ { label: 'Overview', @@ -391,6 +394,7 @@ export default defineConfig({ }, { label: 'Visual Studio Code', + collapsed: true, items: [ { label: 'Overview', @@ -530,6 +534,7 @@ export default defineConfig({ }, { label: 'Real-world development', + collapsed: true, translations: { 'ko-KR': '실제 개발', }, @@ -543,6 +548,7 @@ export default defineConfig({ }, { label: 'GitHub Copilot CLI', + collapsed: true, translations: { 'ko-KR': 'GitHub Copilot CLI', }, @@ -692,6 +698,7 @@ export default defineConfig({ }, { label: 'GitHub Copilot app', + collapsed: true, translations: { 'ko-KR': 'GitHub Copilot 앱', }, @@ -836,6 +843,7 @@ export default defineConfig({ }, { label: 'GitHub Copilot cloud agent', + collapsed: true, translations: { 'ko-KR': 'GitHub Copilot 클라우드 에이전트', }, @@ -893,6 +901,7 @@ export default defineConfig({ }, { label: 'Visual Studio Code', + collapsed: true, translations: { 'ko-KR': 'Visual Studio Code', },