@sp-days-framework/create-sp-days 1.0.4 → 1.1.0-beta1
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.
- package/README.md +14 -0
- package/bin/index.js +2 -0
- package/docs/advanced-config.mdx +387 -0
- package/docs/changelog.mdx +106 -0
- package/docs/index.mdx +205 -0
- package/docs/install.mdx +199 -0
- package/docs/sidebar-sections.mdx +268 -0
- package/docs/sp-days-plugin-color-light.svg +53 -0
- package/lib/.tsbuildinfo +1 -0
- package/lib/.tsbuildinfo-build +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +36 -7
- package/package.json +31 -7
- package/publish-package-docs.js +12 -0
- package/templates/addon-resources/resources/api-reference.mdx +132 -0
- package/templates/addon-resources/resources/best-practice.mdx +407 -0
- package/templates/addon-resources/resources/cheat-sheet.mdx +120 -0
- package/templates/addon-resources/resources/cli-reference.mdx +280 -0
- package/templates/addon-resources/resources/configuration-guide.mdx +211 -0
- package/templates/addon-resources/resources/environment-setup.mdx +317 -0
- package/templates/addon-resources/resources/faq.mdx +146 -0
- package/templates/addon-resources/resources/glossary.mdx +78 -0
- package/templates/addon-resources/resources/index.mdx +67 -16
- package/templates/addon-resources/resources/quick-start.mdx +193 -0
- package/templates/addon-resources/resources/troubleshooting.mdx +263 -0
- package/templates/addon-resources/resources/useful-links.mdx +61 -0
- package/templates/page-course/README.md +62 -0
- package/templates/page-course/docusaurus.config.ts +59 -11
- package/templates/page-course/package.json +12 -2
- package/templates/page-course/sidebarSections.js +118 -0
- package/tsconfig.base.client.json +10 -0
- package/tsconfig.base.json +71 -0
- package/tsconfig.build.json +9 -0
- package/sp-days-framework-create-sp-days-1.0.3.tgz +0 -0
- package/templates/addon-resources/resources/interactive-tasks/creating-tasks.mdx +0 -254
- package/templates/addon-resources/resources/interactive-tasks/examples/_category_.yml +0 -3
- package/templates/addon-resources/resources/interactive-tasks/examples/advanced-usage.mdx +0 -304
- package/templates/addon-resources/resources/interactive-tasks/examples/basic-usage.mdx +0 -128
- package/templates/addon-resources/resources/interactive-tasks/index.mdx +0 -93
- package/templates/addon-resources/resources/interactive-tasks/setup/advanced-configuration.mdx +0 -273
- package/templates/addon-resources/resources/interactive-tasks/setup/index.mdx +0 -120
- package/templates/addon-resources/resources/interactive-tasks/task-progression.mdx +0 -140
- package/templates/addon-resources/resources/slidev-integration/index.mdx +0 -106
- package/templates/addon-resources/resources/slidev-integration/setup/advanced-configuration.mdx +0 -144
- package/templates/addon-resources/resources/slidev-integration/setup/index.mdx +0 -200
- package/templates/addon-resources/resources/sykehuspartner-theme/index.mdx +0 -105
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/center.mdx +0 -33
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/default.mdx +0 -59
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/full.mdx +0 -49
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image-left.mdx +0 -37
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image-right.mdx +0 -37
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image.mdx +0 -56
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/three-cols-header.mdx +0 -49
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/three-cols.mdx +0 -47
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/two-cols-header.mdx +0 -43
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/two-cols.mdx +0 -38
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/cover.mdx +0 -43
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/end.mdx +0 -33
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/intro.mdx +0 -49
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/section.mdx +0 -41
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/_category_.yml +0 -2
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/about-me.mdx +0 -92
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/fact.mdx +0 -47
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/quote.mdx +0 -27
- package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/statement.mdx +0 -28
- package/templates/addon-resources/resources/sykehuspartner-theme/setup/advanced-configuration.mdx +0 -79
- package/templates/addon-resources/resources/sykehuspartner-theme/setup/index.mdx +0 -104
- package/templates/addon-resources/resources/sykehuspartner-theme/syntax-and-icons.mdx +0 -89
- package/templates/addon-slidev/package.json +0 -54
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 2
|
|
3
|
-
task_section_name: "Demo Module 2"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { useState } from 'react';
|
|
7
|
-
|
|
8
|
-
# Advanced Task Page
|
|
9
|
-
|
|
10
|
-
Discover how to leverage advanced Docusaurus markdown features within interactive tasks to create rich, engaging learning experiences.
|
|
11
|
-
|
|
12
|
-
<TaskProgression path="." />
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
::::task[Add Syntax Highlighting to Code Blocks]
|
|
17
|
-
|
|
18
|
-
Practice adding syntax-highlighted code blocks to your documentation:
|
|
19
|
-
|
|
20
|
-
1. Create a code block using triple backticks (```)
|
|
21
|
-
2. Add the language identifier immediately after the opening backticks
|
|
22
|
-
3. Write your code inside the block
|
|
23
|
-
4. Close with triple backticks
|
|
24
|
-
|
|
25
|
-
**Bash example:**
|
|
26
|
-
```bash
|
|
27
|
-
docker run -d -p 8080:80 nginx
|
|
28
|
-
npm install express
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**YAML example:**
|
|
32
|
-
```yaml
|
|
33
|
-
version: '3.8'
|
|
34
|
-
services:
|
|
35
|
-
web:
|
|
36
|
-
image: nginx:latest
|
|
37
|
-
ports:
|
|
38
|
-
- "8080:80"
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**JSON example:**
|
|
42
|
-
```json
|
|
43
|
-
{
|
|
44
|
-
"name": "my-app",
|
|
45
|
-
"version": "1.0.0",
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"react": "^18.0.0"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
:::hint
|
|
53
|
-
Docusaurus supports 30+ languages out of the box. Check the [Prism language list](https://prismjs.com/#supported-languages) for all available options. You can add more languages in `docusaurus.config.ts` - see the [Docusaurus documentation](https://docusaurus.io/docs/markdown-features/code-blocks#supported-languages).
|
|
54
|
-
:::
|
|
55
|
-
|
|
56
|
-
::::
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
::::task[Add File Names to Code Blocks]
|
|
61
|
-
|
|
62
|
-
Add descriptive file names to your code blocks for better context:
|
|
63
|
-
|
|
64
|
-
1. After the language identifier, add a space and `title="filename.ext"`
|
|
65
|
-
2. The filename will appear as a header above the code block
|
|
66
|
-
3. This helps readers know exactly where code should be placed
|
|
67
|
-
|
|
68
|
-
```json title="tsconfig.json"
|
|
69
|
-
{
|
|
70
|
-
"compilerOptions": {
|
|
71
|
-
"target": "ES2020",
|
|
72
|
-
"strict": true,
|
|
73
|
-
"strictNullChecks": true,
|
|
74
|
-
"skipLibCheck": true
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
:::hint
|
|
80
|
-
Use this feature to show exactly where code should be placed in a project structure. It's especially helpful in tutorials with multiple files.
|
|
81
|
-
:::
|
|
82
|
-
|
|
83
|
-
::::
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
::::task[Highlight Important Code Lines]
|
|
88
|
-
|
|
89
|
-
Learn two methods for highlighting specific lines in code blocks:
|
|
90
|
-
|
|
91
|
-
**Method 1: Inline comments** (best when actively developing)
|
|
92
|
-
|
|
93
|
-
Use `highlight-next-line`, `highlight-start`, and `highlight-end` comments to mark important lines:
|
|
94
|
-
|
|
95
|
-
```js
|
|
96
|
-
function HighlightSomeText(highlight) {
|
|
97
|
-
if (highlight) {
|
|
98
|
-
// highlight-next-line
|
|
99
|
-
return 'This text is highlighted!';
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return 'Nothing highlighted';
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function HighlightMoreText(highlight) {
|
|
106
|
-
// highlight-start
|
|
107
|
-
if (highlight) {
|
|
108
|
-
return 'This range is highlighted!';
|
|
109
|
-
}
|
|
110
|
-
// highlight-end
|
|
111
|
-
|
|
112
|
-
return 'Nothing highlighted';
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Method 2: Meta string** (cleaner for published docs)
|
|
117
|
-
|
|
118
|
-
Add line numbers after the language identifier. Separate multiple lines with commas or use ranges:
|
|
119
|
-
|
|
120
|
-
```jsx {1,4-6,11}
|
|
121
|
-
import React from 'react';
|
|
122
|
-
|
|
123
|
-
function MyComponent(props) {
|
|
124
|
-
if (props.isBar) {
|
|
125
|
-
return <div>Bar</div>;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return <div>Foo</div>;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export default MyComponent;
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
:::hint
|
|
135
|
-
|
|
136
|
-
Supported commenting syntax:
|
|
137
|
-
|
|
138
|
-
| Style | Syntax |
|
|
139
|
-
| ---------- | ------------------------ |
|
|
140
|
-
| C-style | `/* ... */` and `// ...` |
|
|
141
|
-
| JSX-style | `{/* ... */}` |
|
|
142
|
-
| Bash-style | `# ...` |
|
|
143
|
-
| HTML-style | `<!-- ... -->` |
|
|
144
|
-
|
|
145
|
-
Choose inline comments when actively developing, and meta strings for final published documentation.
|
|
146
|
-
|
|
147
|
-
:::
|
|
148
|
-
|
|
149
|
-
::::
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
:::::task[Nest Admonitions in Tasks]
|
|
154
|
-
|
|
155
|
-
Practice nesting admonitions inside tasks by using the correct number of colons:
|
|
156
|
-
|
|
157
|
-
1. Task containers use 4+ colons: `::::task`
|
|
158
|
-
2. Hints/solutions use 3+ colons: `:::hint`
|
|
159
|
-
3. Nested admonitions also use 3+ colons: `:::note`
|
|
160
|
-
4. For deeper nesting inside hints/solutions, use 4+ colons for the admonition
|
|
161
|
-
|
|
162
|
-
**Rule:** Parent containers always need **more colons** than their children to prevent the parser from prematurely closing containers.
|
|
163
|
-
|
|
164
|
-
:::note
|
|
165
|
-
|
|
166
|
-
This is a note at the task level (3 colons).
|
|
167
|
-
|
|
168
|
-
:::
|
|
169
|
-
|
|
170
|
-
:::warning
|
|
171
|
-
|
|
172
|
-
This is a warning at the task level (3 colons).
|
|
173
|
-
|
|
174
|
-
:::
|
|
175
|
-
|
|
176
|
-
::::hint
|
|
177
|
-
|
|
178
|
-
This hint contains a nested admonition (4 colons for hint, since it needs to contain a 3-colon admonition):
|
|
179
|
-
|
|
180
|
-
:::note
|
|
181
|
-
|
|
182
|
-
This note is nested inside the hint (3 colons).
|
|
183
|
-
|
|
184
|
-
:::
|
|
185
|
-
|
|
186
|
-
::::
|
|
187
|
-
|
|
188
|
-
:::::
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
::::task[Use React Components in Tasks]
|
|
193
|
-
|
|
194
|
-
Import and use React components within your task content to create interactive experiences:
|
|
195
|
-
|
|
196
|
-
1. Import React and any hooks you need at the top of the file: `import { useState } from 'react';`
|
|
197
|
-
2. Define your component using `export const`
|
|
198
|
-
3. Use the component anywhere in your MDX content
|
|
199
|
-
|
|
200
|
-
**Example - Interactive Counter:**
|
|
201
|
-
|
|
202
|
-
export const Counter = () => {
|
|
203
|
-
const [count, setCount] = useState(0);
|
|
204
|
-
return (
|
|
205
|
-
<div style={{
|
|
206
|
-
padding: '1rem',
|
|
207
|
-
border: '2px solid var(--ifm-color-primary)',
|
|
208
|
-
borderRadius: '8px',
|
|
209
|
-
textAlign: 'center',
|
|
210
|
-
margin: '1rem 0'
|
|
211
|
-
}}>
|
|
212
|
-
<p style={{ fontSize: '1.5rem', margin: '0.5rem 0' }}>
|
|
213
|
-
Count: <strong>{count}</strong>
|
|
214
|
-
</p>
|
|
215
|
-
<button
|
|
216
|
-
onClick={() => setCount(count + 1)}
|
|
217
|
-
style={{
|
|
218
|
-
marginRight: '0.5rem',
|
|
219
|
-
padding: '0.5rem 1rem',
|
|
220
|
-
fontSize: '1rem',
|
|
221
|
-
cursor: 'pointer'
|
|
222
|
-
}}
|
|
223
|
-
>
|
|
224
|
-
Increment
|
|
225
|
-
</button>
|
|
226
|
-
<button
|
|
227
|
-
onClick={() => setCount(0)}
|
|
228
|
-
style={{
|
|
229
|
-
padding: '0.5rem 1rem',
|
|
230
|
-
fontSize: '1rem',
|
|
231
|
-
cursor: 'pointer'
|
|
232
|
-
}}
|
|
233
|
-
>
|
|
234
|
-
Reset
|
|
235
|
-
</button>
|
|
236
|
-
</div>
|
|
237
|
-
);
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
<Counter />
|
|
241
|
-
|
|
242
|
-
:::hint
|
|
243
|
-
|
|
244
|
-
Tasks support all Docusaurus MDX features, including:
|
|
245
|
-
- React component imports and usage (useState, useEffect, etc.)
|
|
246
|
-
- Tabs, admonitions, and other built-in components
|
|
247
|
-
- Custom CSS and styling with theme-aware variables
|
|
248
|
-
- Interactive JavaScript functionality
|
|
249
|
-
|
|
250
|
-
This makes tasks perfect for interactive tutorials and hands-on learning experiences!
|
|
251
|
-
|
|
252
|
-
:::
|
|
253
|
-
|
|
254
|
-
:::solution
|
|
255
|
-
|
|
256
|
-
Here is the React code running in the task:
|
|
257
|
-
|
|
258
|
-
```ts
|
|
259
|
-
import { useState } from 'react';
|
|
260
|
-
|
|
261
|
-
export const Counter = () => {
|
|
262
|
-
const [count, setCount] = useState(0);
|
|
263
|
-
return (
|
|
264
|
-
<div style={{
|
|
265
|
-
padding: '1rem',
|
|
266
|
-
border: '2px solid var(--ifm-color-primary)',
|
|
267
|
-
borderRadius: '8px',
|
|
268
|
-
textAlign: 'center',
|
|
269
|
-
margin: '1rem 0'
|
|
270
|
-
}}>
|
|
271
|
-
<p style={{ fontSize: '1.5rem', margin: '0.5rem 0' }}>
|
|
272
|
-
Count: <strong>{count}</strong>
|
|
273
|
-
</p>
|
|
274
|
-
<button
|
|
275
|
-
onClick={() => setCount(count + 1)}
|
|
276
|
-
style={{
|
|
277
|
-
marginRight: '0.5rem',
|
|
278
|
-
padding: '0.5rem 1rem',
|
|
279
|
-
fontSize: '1rem',
|
|
280
|
-
cursor: 'pointer'
|
|
281
|
-
}}
|
|
282
|
-
>
|
|
283
|
-
Increment
|
|
284
|
-
</button>
|
|
285
|
-
<button
|
|
286
|
-
onClick={() => setCount(0)}
|
|
287
|
-
style={{
|
|
288
|
-
padding: '0.5rem 1rem',
|
|
289
|
-
fontSize: '1rem',
|
|
290
|
-
cursor: 'pointer'
|
|
291
|
-
}}
|
|
292
|
-
>
|
|
293
|
-
Reset
|
|
294
|
-
</button>
|
|
295
|
-
</div>
|
|
296
|
-
);
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
<Counter />
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
:::
|
|
303
|
-
|
|
304
|
-
::::
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 1
|
|
3
|
-
task_section_name: "Demo Module 1"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Basic Task Page
|
|
7
|
-
|
|
8
|
-
See interactive tasks in action with real-world examples. This page demonstrates how tasks work in a documentation environment.
|
|
9
|
-
|
|
10
|
-
<TaskProgression path="."/>
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
::::task[Install the Plugin]
|
|
15
|
-
|
|
16
|
-
Follow these steps to add Interactive Tasks to your Docusaurus project:
|
|
17
|
-
|
|
18
|
-
1. Open your terminal in the project root directory
|
|
19
|
-
2. Run the installation command for your package manager
|
|
20
|
-
3. Verify the package appears in your `package.json` dependencies
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
:::hint
|
|
24
|
-
|
|
25
|
-
If you created your project with `@sp-days-framework/create-sp-days`, this plugin is already installed and you can skip this task.
|
|
26
|
-
|
|
27
|
-
:::
|
|
28
|
-
|
|
29
|
-
::::
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
::::task[Configure Docusaurus]
|
|
34
|
-
|
|
35
|
-
Add the plugin and remark plugin to your Docusaurus configuration:
|
|
36
|
-
|
|
37
|
-
1. Open `docusaurus.config.js` in your project root
|
|
38
|
-
2. Add the plugin to the `plugins` array
|
|
39
|
-
3. Add the remark plugin to your preset's docs configuration
|
|
40
|
-
4. Save the file
|
|
41
|
-
|
|
42
|
-
:::solution
|
|
43
|
-
|
|
44
|
-
The plugin needs to be registered in two places: the `plugins` array for the main functionality, and the `remarkPlugins` array to transform task directives in your markdown files.
|
|
45
|
-
|
|
46
|
-
**Verify Configuration:**
|
|
47
|
-
|
|
48
|
-
- The file should have both entries as shown below
|
|
49
|
-
- No syntax errors when running `npm run start`
|
|
50
|
-
|
|
51
|
-
Add to your `docusaurus.config.js`:
|
|
52
|
-
|
|
53
|
-
```js title="docusaurus.config.js"
|
|
54
|
-
module.exports = {
|
|
55
|
-
plugins: ["@sp-days-framework/docusaurus-plugin-interactive-tasks"],
|
|
56
|
-
|
|
57
|
-
presets: [
|
|
58
|
-
[
|
|
59
|
-
"classic",
|
|
60
|
-
{
|
|
61
|
-
docs: {
|
|
62
|
-
remarkPlugins: [
|
|
63
|
-
require("@sp-days-framework/docusaurus-plugin-interactive-tasks")
|
|
64
|
-
.remarkTaskDirective,
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
],
|
|
70
|
-
};
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
:::
|
|
74
|
-
|
|
75
|
-
::::
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
::::task[Add Progress Tracking]
|
|
80
|
-
|
|
81
|
-
Display task completion progress on your documentation pages:
|
|
82
|
-
|
|
83
|
-
1. Import the `TaskProgression` component in your MDX file
|
|
84
|
-
2. Add the component where you want to show progress
|
|
85
|
-
3. Provide the path to the document you want to track
|
|
86
|
-
|
|
87
|
-
Add to your MDX file:
|
|
88
|
-
|
|
89
|
-
```mdx
|
|
90
|
-
import TaskProgression from "@theme/TaskProgression";
|
|
91
|
-
|
|
92
|
-
<TaskProgression path="." />
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Reference other pages:
|
|
96
|
-
|
|
97
|
-
```mdx
|
|
98
|
-
<TaskProgression path="/docs/tutorial/first-task" />
|
|
99
|
-
<TaskProgression path="../module-02/introduction" />
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
:::hint
|
|
103
|
-
|
|
104
|
-
Use `path="."` to reference the current page, or provide an absolute/relative path to track other pages. The component shows a visual progress bar and completion count.
|
|
105
|
-
|
|
106
|
-
:::
|
|
107
|
-
|
|
108
|
-
::::
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
::::task[Test Auto-Collapse Feature]
|
|
113
|
-
|
|
114
|
-
Learn how the auto-collapse feature helps you focus on incomplete tasks:
|
|
115
|
-
|
|
116
|
-
1. Complete at least one task on this page by clicking "Mark as Done"
|
|
117
|
-
2. Look for the collapse icon button in the navbar
|
|
118
|
-
3. Click the collapse icon to enable auto-collapse mode
|
|
119
|
-
4. Observe how completed tasks automatically collapse
|
|
120
|
-
5. Click the collapse icon again to disable the feature
|
|
121
|
-
|
|
122
|
-
:::hint
|
|
123
|
-
|
|
124
|
-
The auto-collapse setting is saved to your browser's localStorage and syncs across all tabs. This feature is especially useful when working through long tutorial pages with many tasks.
|
|
125
|
-
|
|
126
|
-
:::
|
|
127
|
-
|
|
128
|
-
::::
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Interactive Tasks
|
|
3
|
-
sidebar_custom_props:
|
|
4
|
-
sidebar_task_hide_progress: true
|
|
5
|
-
sidebar_class_name: sidebar-logo-docusaurus
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
import { Iconify } from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
9
|
-
|
|
10
|
-
<div align="center">
|
|
11
|
-
<div className="resourceLandingPage">
|
|
12
|
-
<Iconify icon="logos:docusaurus" width="105px"/>
|
|
13
|
-
</div>
|
|
14
|
-
<div align="center">
|
|
15
|
-
# Docusaurus Interactive Tasks
|
|
16
|
-
</div>
|
|
17
|
-
<div align="center">
|
|
18
|
-
<p>
|
|
19
|
-
*A Docusaurus plugin that transforms documentation into interactive learning experiences!*
|
|
20
|
-
</p>
|
|
21
|
-
<h4>
|
|
22
|
-
[Setup](./setup/index.mdx)
|
|
23
|
-
·
|
|
24
|
-
[NPM Package](https://www.npmjs.com/package/@sp-days-framework/docusaurus-plugin-interactive-tasks)
|
|
25
|
-
·
|
|
26
|
-
[Source Code](https://github.com/helse-sorost/sp-days-framework)
|
|
27
|
-
</h4>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Features
|
|
34
|
-
|
|
35
|
-
- **Interactive Tasks** - Collapsible task components with completion tracking
|
|
36
|
-
- **Hints & Solutions** - Optional toggleable hints and solutions for each task
|
|
37
|
-
- **Auto-Numbering** - Automatic task numbering per page
|
|
38
|
-
- **Persistent Progress** - Completion status saved to localStorage
|
|
39
|
-
- **Progress Tracking** - Visual progress indicators in sidebar and task progression components
|
|
40
|
-
- **Sidebar Badges** - Automatic completion badges (e.g., "2/5") in sidebar navigation
|
|
41
|
-
- **Auto-Collapse Toggle** - Navbar button to enable/disable auto-collapsing of completed tasks
|
|
42
|
-
|
|
43
|
-
## Getting Started
|
|
44
|
-
|
|
45
|
-
Create interactive tasks using simple markdown directives:
|
|
46
|
-
|
|
47
|
-
````mdx
|
|
48
|
-
::::task[Install the Plugin]
|
|
49
|
-
|
|
50
|
-
Install the Interactive Tasks plugin using npm or yarn.
|
|
51
|
-
|
|
52
|
-
:::hint
|
|
53
|
-
Use npm install or yarn add to install the package.
|
|
54
|
-
:::
|
|
55
|
-
|
|
56
|
-
:::solution
|
|
57
|
-
```bash
|
|
58
|
-
npm install @sp-days-framework/docusaurus-plugin-interactive-tasks
|
|
59
|
-
```
|
|
60
|
-
:::
|
|
61
|
-
|
|
62
|
-
::::
|
|
63
|
-
````
|
|
64
|
-
|
|
65
|
-
<div className="preview">
|
|
66
|
-
<div className="container" style={{ width: '-webkit-fill-available' }}>
|
|
67
|
-
::::task-example[Install the Plugin]
|
|
68
|
-
|
|
69
|
-
Install the Interactive Tasks plugin using npm or yarn.
|
|
70
|
-
|
|
71
|
-
:::hint
|
|
72
|
-
Use npm install or yarn add to install the package.
|
|
73
|
-
:::
|
|
74
|
-
|
|
75
|
-
:::solution
|
|
76
|
-
```bash
|
|
77
|
-
npm install @sp-days-framework/docusaurus-plugin-interactive-tasks
|
|
78
|
-
```
|
|
79
|
-
:::
|
|
80
|
-
|
|
81
|
-
::::
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
<br>
|
|
85
|
-
</br>
|
|
86
|
-
|
|
87
|
-
Tasks are automatically numbered, track completion in localStorage, and sync across browser tabs. See [Setup](./setup/index.mdx) for installation and configuration.
|
|
88
|
-
|
|
89
|
-
## Documentation
|
|
90
|
-
|
|
91
|
-
- **[Creating Tasks](./creating-tasks.mdx)** - Learn the task directive syntax
|
|
92
|
-
- **[Task Progression](./task-progression.mdx)** - Display progress with components
|
|
93
|
-
- **[Advanced Configuration](./setup/advanced-configuration.mdx)** - Detailed options and internals
|