@sp-days-framework/create-sp-days 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +318 -0
  3. package/bin/index.js +86 -0
  4. package/lib/index.d.ts +20 -0
  5. package/lib/index.js +454 -0
  6. package/package.json +41 -0
  7. package/sp-days-framework-create-sp-days-1.0.0.tgz +0 -0
  8. package/templates/addon-resources/resources/frontpage-collection/components/Columns.mdx +191 -0
  9. package/templates/addon-resources/resources/frontpage-collection/components/ContentBlock.mdx +126 -0
  10. package/templates/addon-resources/resources/frontpage-collection/components/CourseFeature.mdx +147 -0
  11. package/templates/addon-resources/resources/frontpage-collection/components/FancyHeader.mdx +76 -0
  12. package/templates/addon-resources/resources/frontpage-collection/components/GetStarted.mdx +222 -0
  13. package/templates/addon-resources/resources/frontpage-collection/components/HeroBanner.mdx +205 -0
  14. package/templates/addon-resources/resources/frontpage-collection/components/IconContainer.mdx +249 -0
  15. package/templates/addon-resources/resources/frontpage-collection/components/Iconify.mdx +228 -0
  16. package/templates/addon-resources/resources/frontpage-collection/components/_category_.yml +2 -0
  17. package/templates/addon-resources/resources/frontpage-collection/index.mdx +85 -0
  18. package/templates/addon-resources/resources/frontpage-collection/setup/index.mdx +185 -0
  19. package/templates/addon-resources/resources/index.mdx +35 -0
  20. package/templates/addon-resources/resources/interactive-tasks/creating-tasks.mdx +292 -0
  21. package/templates/addon-resources/resources/interactive-tasks/examples/_category_.yml +3 -0
  22. package/templates/addon-resources/resources/interactive-tasks/examples/advanced-usage.mdx +304 -0
  23. package/templates/addon-resources/resources/interactive-tasks/examples/basic-usage.mdx +128 -0
  24. package/templates/addon-resources/resources/interactive-tasks/index.mdx +93 -0
  25. package/templates/addon-resources/resources/interactive-tasks/setup/advanced-configuration.mdx +150 -0
  26. package/templates/addon-resources/resources/interactive-tasks/setup/index.mdx +174 -0
  27. package/templates/addon-resources/resources/interactive-tasks/task-progression.mdx +140 -0
  28. package/templates/addon-resources/resources/slidev-integration/index.mdx +106 -0
  29. package/templates/addon-resources/resources/slidev-integration/setup/advanced-configuration.mdx +144 -0
  30. package/templates/addon-resources/resources/slidev-integration/setup/index.mdx +200 -0
  31. package/templates/addon-resources/resources/sykehuspartner-theme/index.mdx +105 -0
  32. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/_category_.yml +2 -0
  33. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/_category_.yml +2 -0
  34. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/center.mdx +33 -0
  35. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/default.mdx +59 -0
  36. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/full.mdx +49 -0
  37. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/_category_.yml +2 -0
  38. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image-left.mdx +37 -0
  39. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image-right.mdx +37 -0
  40. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image.mdx +56 -0
  41. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/_category_.yml +2 -0
  42. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/three-cols-header.mdx +49 -0
  43. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/three-cols.mdx +47 -0
  44. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/two-cols-header.mdx +43 -0
  45. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/two-cols.mdx +38 -0
  46. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/_category_.yml +2 -0
  47. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/cover.mdx +43 -0
  48. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/end.mdx +33 -0
  49. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/intro.mdx +49 -0
  50. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/section.mdx +41 -0
  51. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/_category_.yml +2 -0
  52. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/about-me.mdx +92 -0
  53. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/fact.mdx +47 -0
  54. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/quote.mdx +27 -0
  55. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/statement.mdx +28 -0
  56. package/templates/addon-resources/resources/sykehuspartner-theme/setup/advanced-configuration.mdx +79 -0
  57. package/templates/addon-resources/resources/sykehuspartner-theme/setup/index.mdx +104 -0
  58. package/templates/addon-resources/resources/sykehuspartner-theme/syntax-and-icons.mdx +89 -0
  59. package/templates/addon-slidev/package.json +54 -0
  60. package/templates/addon-slidev/slidev/creating-your-first-slidev.md +301 -0
  61. package/templates/addon-slidev/slidev/slidev-theme-sykehuspartner.md +403 -0
  62. package/templates/page-course/README.md +152 -0
  63. package/templates/page-course/course/index.mdx +7 -0
  64. package/templates/page-course/course/placeholder-advanced-usage.mdx +304 -0
  65. package/templates/page-course/course/placeholder-basic-usage.mdx +128 -0
  66. package/templates/page-course/docusaurus.config.ts +171 -0
  67. package/templates/page-course/example-github-pages.yml +66 -0
  68. package/templates/page-course/gitignore +20 -0
  69. package/templates/page-course/package.json +51 -0
  70. package/templates/page-course/src/css/sp-days-theme.scss +297 -0
  71. package/templates/page-course/src/pages/index.mdx +165 -0
  72. package/templates/page-course/static/.nojekyll +0 -0
  73. package/templates/page-course/static/img/favicon-navbar/github.svg +3 -0
  74. package/templates/page-course/static/img/favicon-navbar/sorost-logo-dark.svg +24 -0
  75. package/templates/page-course/static/img/favicon-navbar/sorost-logo-light.svg +24 -0
  76. package/templates/page-course/static/img/footer/sykehuspartner-dark.svg +37 -0
  77. package/templates/page-course/static/img/footer/sykehuspartner-light.svg +37 -0
  78. package/templates/page-course/static/img/sidebar/docusaurus.svg +17 -0
  79. package/templates/page-course/static/img/sidebar/slidev.svg +22 -0
  80. package/templates/page-course/static/img/sp-days-logo-color-dark.svg +70 -0
  81. package/templates/page-course/static/img/sp-days-logo-color-light.svg +70 -0
  82. package/templates/page-course/static/img/sp-days-logo-filled-invert.svg +11 -0
  83. package/templates/page-course/static/img/sp-days-logo-filled.svg +11 -0
  84. package/templates/page-course/static/img/sp-days-logo-outline.svg +19 -0
  85. package/templates/page-course/static/img/sp-days-plugin-color-dark.svg +57 -0
  86. package/templates/page-course/static/img/sp-days-plugin-color-light.svg +53 -0
  87. package/templates/page-course/tsconfig.json +8 -0
@@ -0,0 +1,85 @@
1
+ ---
2
+ title: Frontpage Collection
3
+ sidebar_class_name: sidebar-logo-docusaurus
4
+ ---
5
+
6
+ import { Iconify } from "@sp-days-framework/docusaurus-frontpage-collection";
7
+
8
+ <div align="center">
9
+ <div className="resourceLandingPage">
10
+ <Iconify icon="logos:docusaurus" width="105px"/>
11
+ </div>
12
+ <div align="center">
13
+ # Frontpage Collection
14
+ </div>
15
+ <div align="center">
16
+ <p>
17
+ *Collection of React components for Docusaurus.
18
+ <br/> Designed for creating landing pages using the `.mdx` file format.*
19
+ </p>
20
+ <h4>
21
+ [Setup](./setup/index.mdx)
22
+ ·
23
+ [NPM Package](https://www.npmjs.com/package/@sp-days-framework/docusaurus-frontpage-collection)
24
+ ·
25
+ [Source Code](https://github.com/helse-sorost/sp-days-framework)
26
+ </h4>
27
+ </div>
28
+ </div>
29
+
30
+ ---
31
+
32
+ ## Features
33
+
34
+ - **Pre-built Components** - Professional React components ready to use
35
+ - **Icon System** - Support for Iconify icons and custom images
36
+ - **Theme-Aware** - Automatic light/dark mode support with customizable colors
37
+ - **Responsive Design** - Mobile-friendly layouts that adapt to all screen sizes
38
+ - **MDX Integration** - Works seamlessly with Docusaurus MDX pages
39
+
40
+ ## Getting Started
41
+
42
+ Import and use components in your MDX pages:
43
+
44
+ ```mdx title="src/pages/index.mdx"
45
+ ---
46
+ title: Course Homepage
47
+ hide_table_of_contents: true
48
+ ---
49
+
50
+ import {
51
+ HeroBanner,
52
+ CourseFeature,
53
+ Included,
54
+ NotIncluded
55
+ } from "@sp-days-framework/docusaurus-frontpage-collection";
56
+
57
+ <HeroBanner
58
+ bannerText="Learn Docker with our hands-on course"
59
+ iconify="mdi:docker"
60
+ />
61
+
62
+ <CourseFeature>
63
+ <Included>
64
+ - Hands-on exercises
65
+ - Real-world examples
66
+ </Included>
67
+ <NotIncluded>
68
+ - Prerequisites knowledge
69
+ - Development environment
70
+ </NotIncluded>
71
+ </CourseFeature>
72
+ ```
73
+
74
+ See [Setup](./setup/index.mdx) for installation and configuration.
75
+
76
+ ## Available Components
77
+
78
+ - **[Block](./components/ContentBlock.mdx)** - Simple styled content block
79
+ - **[Columns](./components/Columns.mdx)** - Two-column responsive layout
80
+ - **[CourseFeature](./components/CourseFeature.mdx)** - Display course features with included/not included sections
81
+ - **[FancyHeader](./components/FancyHeader.mdx)** - Header with decorative underline
82
+ - **[GetStarted](./components/GetStarted.mdx)** - Call-to-action section with explore items
83
+ - **[HeroBanner](./components/HeroBanner.mdx)** - Full-width banner with title and icon
84
+ - **[IconContainersSection](./components/IconContainer.mdx)** - Display icon containers in a grid
85
+ - **[Iconify](./components/Iconify.mdx)** - Add Iconify icons to pages with theme-aware colors
@@ -0,0 +1,185 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ import Tabs from "@theme/Tabs";
6
+ import TabItem from "@theme/TabItem";
7
+
8
+ # Setup
9
+
10
+ :::tip[Already Included]
11
+ If you're using `@sp-days-framework/create-sp-days`, the Frontpage Collection is already installed and configured. You can start using components right away!
12
+ :::
13
+
14
+ ## Installation
15
+
16
+ Install the package using your preferred package manager:
17
+
18
+ <Tabs>
19
+ <TabItem value="npm" label="npm" default>
20
+ ```bash
21
+ npm install @sp-days-framework/docusaurus-frontpage-collection
22
+ ```
23
+ </TabItem>
24
+ <TabItem value="yarn" label="Yarn">
25
+ ```bash
26
+ yarn add @sp-days-framework/docusaurus-frontpage-collection
27
+ ```
28
+ </TabItem>
29
+ </Tabs>
30
+
31
+ Unlike plugins, the Frontpage Collection works immediately after installation. No changes to `docusaurus.config.js` are needed.
32
+
33
+ ## Configuration
34
+
35
+ ### Import Methods
36
+
37
+ You can import components in several ways depending on your needs.
38
+
39
+ <Tabs>
40
+ <TabItem value="individual" label="Individual Imports (Recommended)" default>
41
+ Import only the components you need for optimal bundle size:
42
+
43
+ ```mdx title="src/pages/index.mdx"
44
+ import {
45
+ HeroBanner,
46
+ IconContainersSection,
47
+ IconContainerBlock,
48
+ } from "@sp-days-framework/docusaurus-frontpage-collection";
49
+
50
+ <HeroBanner
51
+ bannerText="Welcome to Our Course"
52
+ iconify="mdi:school"
53
+ />
54
+
55
+ <IconContainersSection>
56
+ <IconContainerBlock
57
+ title="Getting Started"
58
+ iconify="mdi:rocket-launch"
59
+ link="/docs/intro"
60
+ />
61
+ </IconContainersSection>
62
+ ```
63
+ </TabItem>
64
+ <TabItem value="default" label="Default Imports">
65
+ Import specific components directly from their source:
66
+
67
+ ```mdx title="src/pages/index.mdx"
68
+ import HeroBanner from "@sp-days-framework/docusaurus-frontpage-collection/lib/components/HeroBanner";
69
+ import IconContainersSection, { IconContainerBlock } from "@sp-days-framework/docusaurus-frontpage-collection/lib/components/IconContainer";
70
+
71
+ <HeroBanner bannerText="Welcome" iconify="mdi:school" />
72
+
73
+ <IconContainersSection>
74
+ <IconContainerBlock title="Start" iconify="mdi:rocket-launch" link="/docs/intro" />
75
+ </IconContainersSection>
76
+ ```
77
+ </TabItem>
78
+ <TabItem value="wildcard" label="Wildcard">
79
+ :::warning[Not Recommended]
80
+ Wildcard imports may increase bundle size as they import the entire library. Use individual imports instead.
81
+ :::
82
+
83
+ ```mdx title="src/pages/index.mdx"
84
+ import * as Components from "@sp-days-framework/docusaurus-frontpage-collection";
85
+
86
+ <Components.HeroBanner bannerText="Welcome" iconify="mdi:school" />
87
+ ```
88
+ </TabItem>
89
+ </Tabs>
90
+
91
+ ### Where to Use
92
+
93
+ The components are designed for creating landing pages in MDX format. Place your landing pages in the `/src/pages/` directory:
94
+
95
+ ```
96
+ src/pages/
97
+ ├── index.mdx # Homepage
98
+ ├── courses.mdx # Courses overview
99
+ └── workshops/
100
+ └── index.mdx # Workshop landing page
101
+ ```
102
+
103
+ Files in `/src/pages/` automatically map to URLs:
104
+
105
+ - `src/pages/index.mdx` → `/`
106
+ - `src/pages/courses.mdx` → `/courses`
107
+ - `src/pages/workshops/index.mdx` → `/workshops/`
108
+
109
+ ### Page Configuration
110
+
111
+ Use frontmatter to configure your landing pages:
112
+
113
+ ```mdx title="src/pages/index.mdx"
114
+ ---
115
+ title: Course Homepage
116
+ description: Learn with our comprehensive course
117
+ hide_table_of_contents: true
118
+ ---
119
+
120
+ import { HeroBanner, CourseFeature } from "@sp-days-framework/docusaurus-frontpage-collection";
121
+
122
+ <HeroBanner
123
+ bannerText="Learn with our hands-on course"
124
+ iconify="mdi:school"
125
+ />
126
+ ```
127
+
128
+ :::tip
129
+ Set `hide_table_of_contents: true` in frontmatter for cleaner landing pages.
130
+ :::
131
+
132
+ ### Icon Configuration
133
+
134
+ All components support flexible icon configuration.
135
+
136
+ **Using Iconify Icons:**
137
+
138
+ Browse icons at [Iconify](https://icon-sets.iconify.design/) and use the icon name:
139
+
140
+ ```mdx
141
+ <HeroBanner
142
+ iconify="mdi:docker"
143
+ iconColors={{
144
+ light: "#2496ED",
145
+ dark: "#2496ED"
146
+ }}
147
+ />
148
+ ```
149
+
150
+ **Using Custom Images:**
151
+
152
+ Provide custom SVG or PNG images with theme variants:
153
+
154
+ ```mdx
155
+ <HeroBanner
156
+ customSvg={{
157
+ light: "img/logo-light.svg",
158
+ dark: "img/logo-dark.svg",
159
+ }}
160
+ />
161
+ ```
162
+
163
+ Place custom images in the `/static/img/` directory.
164
+
165
+ ### Usage with React Pages
166
+
167
+ :::note
168
+ While the components are compatible with React (`.jsx`, `.tsx`) pages, we recommend using them in MDX pages for the best experience.
169
+ :::
170
+
171
+ If using in React pages, import as standard React components:
172
+
173
+ ```tsx title="src/pages/index.tsx"
174
+ import React from 'react';
175
+ import { HeroBanner } from '@sp-days-framework/docusaurus-frontpage-collection';
176
+
177
+ export default function Home() {
178
+ return (
179
+ <HeroBanner
180
+ bannerText="Welcome to Our Course"
181
+ iconify="mdi:school"
182
+ />
183
+ );
184
+ }
185
+ ```
@@ -0,0 +1,35 @@
1
+ ---
2
+ sidebar_position: 1
3
+ sidebar_class_name: sidebar-logo-sp-days
4
+ pagination_next: null
5
+ ---
6
+
7
+ import {
8
+ IconContainersSection,
9
+ IconContainerBlock,
10
+ } from "@sp-days-framework/docusaurus-frontpage-collection";
11
+
12
+ # Resources Overview
13
+
14
+ <IconContainersSection maxItemsPerRow="2">
15
+ <IconContainerBlock
16
+ title="Frontpage Collection"
17
+ iconify="mdi:code-block-tags"
18
+ link="/resources/frontpage-collection/"
19
+ />
20
+ <IconContainerBlock
21
+ title="Interactive Tasks"
22
+ iconify="ci:window-check"
23
+ link="/resources/interactive-tasks/"
24
+ />
25
+ <IconContainerBlock
26
+ title="Slidev Integration"
27
+ iconify="mdi:television-play"
28
+ link="/resources/slidev-integration/"
29
+ />
30
+ <IconContainerBlock
31
+ title="Slidev SP Theme"
32
+ iconify="mdi:palette-outline"
33
+ link="/resources/sykehuspartner-theme/"
34
+ />
35
+ </IconContainersSection>
@@ -0,0 +1,292 @@
1
+ ---
2
+ sidebar_position: 2
3
+ ---
4
+
5
+ import Tabs from "@theme/Tabs";
6
+ import TabItem from "@theme/TabItem";
7
+ import Mermaid from '@theme/Mermaid';
8
+
9
+ # Task Component
10
+
11
+ Learn how to create interactive tasks with various features including hints, solutions, and non-persistent examples.
12
+
13
+ ## Syntax Reference
14
+
15
+ | Element | Directive | Requirement | Notes |
16
+ |---------|-----------|-------------|-------|
17
+ | **Task Container** | `::::task[Task Name]` (4+ colons) | Required | Tasks are auto-numbered sequentially per page |
18
+ | **Hint Section** | `:::hint` (3+ colons) | Optional | Max one per task; additional hints ignored with warning. Can appear anywhere inside task container |
19
+ | **Solution Section** | `:::solution` (3+ colons) | Optional | Max one per task; additional solutions ignored with warning. Can appear anywhere inside task container |
20
+ | **Task Example** | `::::task-example[Example Name]` (4+ colons) | Required | Same as regular tasks but non-persistent; uses "Example N" numbering |
21
+
22
+ ## Basic Task
23
+
24
+ A simple task without hints or solutions.
25
+
26
+ <Tabs>
27
+ <TabItem value="code" label="Code" default>
28
+ ```md
29
+ ::::task[Create a Component]
30
+
31
+ Create a new React component in `src/components/MyComponent.tsx`.
32
+
33
+ ::::
34
+ ```
35
+ </TabItem>
36
+ <TabItem value="preview" label="Preview">
37
+ <div className="preview">
38
+ <div className="container" style={{ width: '-webkit-fill-available' }}>
39
+ ::::task-example[Create a Component]
40
+
41
+ Create a new React component in `src/components/MyComponent.tsx`.
42
+
43
+ ::::
44
+ </div>
45
+ </div>
46
+ </TabItem>
47
+ </Tabs>
48
+
49
+ ---
50
+
51
+ ## Task with Hint
52
+
53
+ Add a hint to guide users through the task.
54
+
55
+ <Tabs>
56
+ <TabItem value="code" label="Code" default>
57
+ ```mdx
58
+ ::::task[Configure TypeScript]
59
+
60
+ Set up TypeScript configuration for strict mode.
61
+
62
+ :::hint
63
+ Look for the `tsconfig.json` file in your project root.
64
+ :::
65
+
66
+ ::::
67
+ ```
68
+ </TabItem>
69
+ <TabItem value="preview" label="Preview">
70
+ <div className="preview">
71
+ <div className="container" style={{ width: '-webkit-fill-available' }}>
72
+ ::::task-example[Configure TypeScript]
73
+
74
+ Set up TypeScript configuration for strict mode.
75
+
76
+ :::hint
77
+ Look for the `tsconfig.json` file in your project root.
78
+ :::
79
+
80
+ ::::
81
+ </div>
82
+ </div>
83
+ </TabItem>
84
+ </Tabs>
85
+
86
+ ---
87
+
88
+ ## Task with Solution
89
+
90
+ Provide a complete solution for the task.
91
+
92
+ <Tabs>
93
+ <TabItem value="code" label="Code" default>
94
+ ```mdx
95
+ ::::task[Create Package JSON]
96
+
97
+ Initialize a new Node.js project with npm.
98
+
99
+ :::solution
100
+ Run `npm init -y` in your project directory.
101
+ :::
102
+
103
+ ::::
104
+ ```
105
+ </TabItem>
106
+ <TabItem value="preview" label="Preview">
107
+ <div className="preview">
108
+ <div className="container" style={{ width: '-webkit-fill-available' }}>
109
+ ::::task-example[Create Package JSON]
110
+
111
+ Initialize a new Node.js project with npm.
112
+
113
+ :::solution
114
+ Run `npm init -y` in your project directory.
115
+ :::
116
+
117
+ ::::
118
+ </div>
119
+ </div>
120
+ </TabItem>
121
+ </Tabs>
122
+
123
+ ---
124
+
125
+ ## Task with Hint and Solution
126
+
127
+ Combine both hint and solution for comprehensive guidance.
128
+
129
+ <Tabs>
130
+ <TabItem value="code" label="Code" default>
131
+ ````mdx
132
+ ::::task[Add API Route]
133
+
134
+ Create a new API endpoint for user authentication.
135
+
136
+ :::hint
137
+ API routes in Next.js go in the `app/api` directory.
138
+ :::
139
+
140
+ :::solution
141
+ Create `app/api/auth/route.ts`:
142
+
143
+ ```typescript
144
+ export async function POST(request: Request) {
145
+ const body = await request.json();
146
+ // Authentication logic here
147
+ return Response.json({ success: true });
148
+ }
149
+ ```
150
+ :::
151
+
152
+ ::::
153
+ ````
154
+ </TabItem>
155
+ <TabItem value="preview" label="Preview">
156
+ <div className="preview">
157
+ <div className="container" style={{ width: '-webkit-fill-available' }}>
158
+ ::::task-example[Add API Route]
159
+
160
+ Create a new API endpoint for user authentication.
161
+
162
+ :::hint
163
+ API routes in Next.js go in the `app/api` directory.
164
+ :::
165
+
166
+ :::solution
167
+ Create `app/api/auth/route.ts`:
168
+
169
+ ```typescript
170
+ export async function POST(request: Request) {
171
+ const body = await request.json();
172
+ // Authentication logic here
173
+ return Response.json({ success: true });
174
+ }
175
+ ```
176
+ :::
177
+
178
+ ::::
179
+ </div>
180
+ </div>
181
+ </TabItem>
182
+ </Tabs>
183
+
184
+ ---
185
+
186
+ ## Using Markdown Features
187
+
188
+ Tasks fully support standard Docusaurus markdown features like the [admonitions feature](https://docusaurus.io/docs/markdown-features/admonitions).
189
+
190
+ <Tabs>
191
+ <TabItem value="code" label="Code" default>
192
+ ````mdx
193
+ ::::task[Setup Development Environment]
194
+
195
+ Follow these steps to configure your workspace.
196
+
197
+ :::note
198
+ Make sure you have Node.js 18+ installed before proceeding.
199
+ :::
200
+
201
+ **Installation Steps:**
202
+
203
+ 1. Install dependencies:
204
+ ```bash
205
+ npm install
206
+ ```
207
+
208
+ 2. Start the development server:
209
+ ```bash
210
+ npm run dev
211
+ ```
212
+
213
+ :::warning
214
+ Do not commit your `.env` file to version control!
215
+ :::
216
+
217
+ :::hint
218
+ Check the README.md for environment variable examples.
219
+ :::
220
+
221
+ ::::
222
+ ````
223
+ </TabItem>
224
+ <TabItem value="preview" label="Preview">
225
+ <div className="preview">
226
+ <div className="container" style={{ width: '-webkit-fill-available' }}>
227
+ ::::task-example[Setup Development Environment]
228
+
229
+ Follow these steps to configure your workspace.
230
+
231
+ :::note
232
+ Make sure you have Node.js 18+ installed before proceeding.
233
+ :::
234
+
235
+ **Installation Steps:**
236
+
237
+ 1. Install dependencies:
238
+ ```bash
239
+ npm install
240
+ ```
241
+
242
+ 2. Start the development server:
243
+ ```bash
244
+ npm run dev
245
+ ```
246
+
247
+ :::warning
248
+ Do not commit your `.env` file to version control!
249
+ :::
250
+
251
+ :::hint
252
+ Check the README.md for environment variable examples.
253
+ :::
254
+
255
+ ::::
256
+ </div>
257
+ </div>
258
+ </TabItem>
259
+ </Tabs>
260
+
261
+ ## Nesting
262
+
263
+ The `::::task` directive supports nesting [admonitions](https://docusaurus.io/docs/markdown-features/admonitions) and other markdown features by using colon count to determine hierarchy. Each parent container must use **more colons** than its children to prevent premature closure.
264
+
265
+ **Nesting rules:**
266
+ - Task container: `::::task` (4+ colons)
267
+ - Hint/Solution: `:::hint` or `:::solution` (3+ colons)
268
+ - Nested admonition: `:::note`, `:::tip`, etc. (3+ colons)
269
+ - For deeper nesting, add more colons to parent containers
270
+
271
+ Each level needs more colons than its children to avoid premature closure.
272
+
273
+ ### Nesting Example
274
+
275
+ ```mdx
276
+ ::::::task[Nested Example]
277
+ (Layer 1)
278
+
279
+ :::::hint
280
+ (Layer 2)
281
+
282
+ ::::note
283
+ (Layer 3)
284
+
285
+ :::warning
286
+ (Layer 4)
287
+ :::
288
+
289
+ :::::
290
+
291
+ ::::::
292
+ ```
@@ -0,0 +1,3 @@
1
+ label: 'Task Examples'
2
+ customProps:
3
+ sidebar_task_hide_progress: true