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
**Style handling:** Style is a **client-side preference** stored in localStorage per-framework (`vjs_docs_style_html`, `vjs_docs_style_react`). The `StyleInit.astro` component reads localStorage before paint and sets `html[data-style]`. CSS rules control content visibility via `[data-for-style]` attributes on `<StyleCase>` wrapped content.
@@ -171,21 +173,25 @@ Use `<FrameworkCase>` or `<StyleCase>` components to show framework/style-specif
171
173
172
174
**2. In sidebar config (`src/docs.config.ts`):**
173
175
176
+
Restrict entire guides to specific frameworks:
177
+
174
178
```ts
175
179
const sidebar:Sidebar= [
176
180
{
177
181
sidebarLabel: 'Getting started',
178
182
contents: [
179
-
{ slug: 'how-to/installation' }, // Available to all
183
+
{ slug: 'how-to/installation' }, // Available to all frameworks
180
184
{
181
185
slug: 'how-to/react-hooks',
182
-
frameworks: ['react'] // Only for React
186
+
frameworks: ['react'] // Only visible when viewing React docs
183
187
},
184
188
],
185
189
},
186
190
];
187
191
```
188
192
193
+
**Note:** Style restrictions on sidebar items are no longer supported. All docs are visible to all styles; use `<StyleCase>` within docs to show style-specific content.
194
+
189
195
### Sidebar Configuration
190
196
191
197
**Structure** (`src/docs.config.ts`):
@@ -195,7 +201,6 @@ const sidebar: Sidebar = [
195
201
-`slug`: Path relative to `src/content/docs/` (without `.mdx`)
196
202
-`sidebarLabel` (optional): Override display name
197
203
-`frameworks` (optional): Restrict to specific frameworks
198
-
-`styles` (optional): Restrict to specific styles
199
204
-`devOnly` (optional): Show only in development mode
0 commit comments