@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
package/templates/addon-resources/resources/interactive-tasks/setup/advanced-configuration.mdx
DELETED
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Advanced
|
|
3
|
-
sidebar_position: 2
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import Tabs from "@theme/Tabs";
|
|
7
|
-
import TabItem from "@theme/TabItem";
|
|
8
|
-
|
|
9
|
-
# Advanced Configuration
|
|
10
|
-
|
|
11
|
-
## TOC (Table of Contents) Configuration
|
|
12
|
-
|
|
13
|
-
The Interactive Tasks plugin supports TOC configuration via the `remarkTaskDirective` plugin options. This allows you to control whether tasks appear in the table of contents and at what heading level.
|
|
14
|
-
|
|
15
|
-
### Remark Plugin Options
|
|
16
|
-
|
|
17
|
-
Configure TOC behavior in your `docusaurus.config.ts` for each docs instance:
|
|
18
|
-
|
|
19
|
-
```ts title="docusaurus.config.ts"
|
|
20
|
-
module.exports = {
|
|
21
|
-
presets: [
|
|
22
|
-
[
|
|
23
|
-
'classic',
|
|
24
|
-
{
|
|
25
|
-
docs: {
|
|
26
|
-
beforeDefaultRemarkPlugins: [
|
|
27
|
-
[
|
|
28
|
-
require('@sp-days-framework/docusaurus-plugin-interactive-tasks')
|
|
29
|
-
.remarkTaskDirective,
|
|
30
|
-
{
|
|
31
|
-
// Enable TOC generation for tasks (default: true)
|
|
32
|
-
tocEnabled: true,
|
|
33
|
-
|
|
34
|
-
// Heading level for TOC entries (default: 2)
|
|
35
|
-
// Values: 2 (h2), 3 (h3), 4 (h4), 5 (h5), 6 (h6)
|
|
36
|
-
tocHeadingLevel: 2,
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
],
|
|
44
|
-
};
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Remark Plugin Options Reference
|
|
48
|
-
|
|
49
|
-
| Option | Type | Default | Description |
|
|
50
|
-
|--------|------|---------|-------------|
|
|
51
|
-
| `tocEnabled` | `boolean` | `true` | Enable/disable TOC entry generation for tasks |
|
|
52
|
-
| `tocHeadingLevel` | `2` \| `3` \| `4` \| `5` \| `6` | `2` | Heading level for TOC entries (h2-h6) |
|
|
53
|
-
|
|
54
|
-
### TOC Configuration Examples
|
|
55
|
-
|
|
56
|
-
#### Disable TOC Generation
|
|
57
|
-
|
|
58
|
-
If you don't want tasks to appear in the table of contents:
|
|
59
|
-
|
|
60
|
-
```ts title="docusaurus.config.ts"
|
|
61
|
-
beforeDefaultRemarkPlugins: [
|
|
62
|
-
[
|
|
63
|
-
require('@sp-days-framework/docusaurus-plugin-interactive-tasks')
|
|
64
|
-
.remarkTaskDirective,
|
|
65
|
-
{
|
|
66
|
-
tocEnabled: false,
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
],
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
#### Use h3 for Task TOC Entries
|
|
73
|
-
|
|
74
|
-
To make tasks appear as subsections in the TOC:
|
|
75
|
-
|
|
76
|
-
```ts title="docusaurus.config.ts"
|
|
77
|
-
beforeDefaultRemarkPlugins: [
|
|
78
|
-
[
|
|
79
|
-
require('@sp-days-framework/docusaurus-plugin-interactive-tasks')
|
|
80
|
-
.remarkTaskDirective,
|
|
81
|
-
{
|
|
82
|
-
tocEnabled: true,
|
|
83
|
-
tocHeadingLevel: 3, // Tasks appear as h3 in TOC
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
],
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
This is useful when you have main h2 headings and want tasks to be nested under them in the TOC.
|
|
90
|
-
|
|
91
|
-
#### Different Config Per Docs Instance
|
|
92
|
-
|
|
93
|
-
You can configure TOC differently for each docs instance:
|
|
94
|
-
|
|
95
|
-
```ts title="docusaurus.config.ts"
|
|
96
|
-
module.exports = {
|
|
97
|
-
presets: [
|
|
98
|
-
[
|
|
99
|
-
'classic',
|
|
100
|
-
{
|
|
101
|
-
docs: {
|
|
102
|
-
// Course docs: use h2 for tasks
|
|
103
|
-
beforeDefaultRemarkPlugins: [
|
|
104
|
-
[
|
|
105
|
-
require('@sp-days-framework/docusaurus-plugin-interactive-tasks')
|
|
106
|
-
.remarkTaskDirective,
|
|
107
|
-
{ tocEnabled: true, tocHeadingLevel: 2 },
|
|
108
|
-
],
|
|
109
|
-
],
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
],
|
|
114
|
-
plugins: [
|
|
115
|
-
[
|
|
116
|
-
'@docusaurus/plugin-content-docs',
|
|
117
|
-
{
|
|
118
|
-
id: 'resources',
|
|
119
|
-
path: 'resources',
|
|
120
|
-
// Resources docs: use h3 for tasks
|
|
121
|
-
beforeDefaultRemarkPlugins: [
|
|
122
|
-
[
|
|
123
|
-
require('@sp-days-framework/docusaurus-plugin-interactive-tasks')
|
|
124
|
-
.remarkTaskDirective,
|
|
125
|
-
{ tocEnabled: true, tocHeadingLevel: 3 },
|
|
126
|
-
],
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
],
|
|
130
|
-
],
|
|
131
|
-
};
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Document Frontmatter Options
|
|
135
|
-
|
|
136
|
-
| Property | Type | Default | Description |
|
|
137
|
-
| ------------------------------- | --------- | ------- | -------------------------------------------------- |
|
|
138
|
-
| `sidebar_task_hide_progress` | `boolean` | `false` | Hide the task progress badge entirely |
|
|
139
|
-
| `sidebar_task_disable_icon` | `boolean` | `false` | Show "5/5" instead of checkmark icon when complete |
|
|
140
|
-
| `sidebar_task_badge_colors` | `object` | - | Badge color configuration (see below) |
|
|
141
|
-
|
|
142
|
-
### Badge Colors Structure
|
|
143
|
-
|
|
144
|
-
```yaml
|
|
145
|
-
sidebar_task_badge_colors:
|
|
146
|
-
completed:
|
|
147
|
-
lightmode: "#4caf50" # Background color when all tasks completed (light mode)
|
|
148
|
-
darkmode: "#66bb6a" # Background color when all tasks completed (dark mode)
|
|
149
|
-
incomplete:
|
|
150
|
-
lightmode: "#2196f3" # Background color when tasks incomplete (light mode)
|
|
151
|
-
darkmode: "#42a5f5" # Background color when tasks incomplete (dark mode)
|
|
152
|
-
font:
|
|
153
|
-
lightmode: "#ffffff" # Text color (light mode)
|
|
154
|
-
darkmode: "#000000" # Text color (dark mode)
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
**Supported Color Formats:**
|
|
158
|
-
|
|
159
|
-
- Hex: `#ff6b6b`, `#f00`
|
|
160
|
-
- RGB/RGBA: `rgb(255, 107, 107)`, `rgba(255, 107, 107, 0.8)`
|
|
161
|
-
- HSL/HSLA: `hsl(0, 100%, 71%)`
|
|
162
|
-
- Named colors: `red`, `blue`, `green`
|
|
163
|
-
- CSS variables: `var(--ifm-color-primary)`
|
|
164
|
-
|
|
165
|
-
## How It Works
|
|
166
|
-
|
|
167
|
-
### Task Registry
|
|
168
|
-
|
|
169
|
-
During the build process, the plugin:
|
|
170
|
-
|
|
171
|
-
1. **Scans** all MDX files in the docs directory for task directives
|
|
172
|
-
2. **Extracts** metadata from each task (name, number, document info)
|
|
173
|
-
3. **Reads** frontmatter for document-level badge customization
|
|
174
|
-
4. **Generates** a registry file (`task-registry.json`) containing:
|
|
175
|
-
- Total task count per document
|
|
176
|
-
- Task names and sequential numbers
|
|
177
|
-
- Document metadata (title, section, permalink)
|
|
178
|
-
- Badge customization settings from frontmatter
|
|
179
|
-
- Sidebar position information
|
|
180
|
-
|
|
181
|
-
The registry powers features like the TaskProgression component and sidebar badges.
|
|
182
|
-
|
|
183
|
-
### Completion Tracking
|
|
184
|
-
|
|
185
|
-
Task completion is tracked using browser localStorage:
|
|
186
|
-
|
|
187
|
-
- **Storage Keys** - Format: `task-{pluginId}-{docId}-{taskNumber}-{encodedName}`
|
|
188
|
-
- **Real-time Updates** - Progress updates immediately when tasks are completed
|
|
189
|
-
- **Cross-tab Sync** - Changes sync across browser tabs via storage events
|
|
190
|
-
- **Persistence** - Completion state persists across browser sessions
|
|
191
|
-
|
|
192
|
-
### Path Resolution
|
|
193
|
-
|
|
194
|
-
The TaskProgression component uses intelligent path resolution:
|
|
195
|
-
|
|
196
|
-
1. **Normalizes** the provided path (handles `@site/` prefix, file extensions)
|
|
197
|
-
2. **Resolves** relative paths (`.`, `./`, `../`) based on current document
|
|
198
|
-
3. **Searches** the task registry for matching document source
|
|
199
|
-
4. **Returns** document metadata and task information
|
|
200
|
-
|
|
201
|
-
This allows flexible path references:
|
|
202
|
-
|
|
203
|
-
```mdx
|
|
204
|
-
<!-- Absolute paths -->
|
|
205
|
-
<TaskProgression path="/docs/module1/tasks" />
|
|
206
|
-
|
|
207
|
-
<!-- Relative paths -->
|
|
208
|
-
<TaskProgression path="./sibling-page" />
|
|
209
|
-
<TaskProgression path="../parent-page" />
|
|
210
|
-
|
|
211
|
-
<!-- Current page -->
|
|
212
|
-
<TaskProgression path="." />
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
## Multiple Docs Instances
|
|
216
|
-
|
|
217
|
-
The plugin automatically works with [multiple docs instances](https://docusaurus.io/docs/docs-multi-instance). Each instance is tracked independently:
|
|
218
|
-
|
|
219
|
-
```js title="docusaurus.config.js"
|
|
220
|
-
module.exports = {
|
|
221
|
-
presets: [
|
|
222
|
-
[
|
|
223
|
-
'@docusaurus/preset-classic',
|
|
224
|
-
{
|
|
225
|
-
docs: {
|
|
226
|
-
path: 'docs',
|
|
227
|
-
remarkPlugins: [
|
|
228
|
-
require('@sp-days-framework/docusaurus-plugin-interactive-tasks').remarkTaskDirective,
|
|
229
|
-
],
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
],
|
|
233
|
-
],
|
|
234
|
-
plugins: [
|
|
235
|
-
'@sp-days-framework/docusaurus-plugin-interactive-tasks',
|
|
236
|
-
[
|
|
237
|
-
'@docusaurus/plugin-content-docs',
|
|
238
|
-
{
|
|
239
|
-
id: 'community',
|
|
240
|
-
path: 'community',
|
|
241
|
-
routeBasePath: 'community',
|
|
242
|
-
remarkPlugins: [
|
|
243
|
-
require('@sp-days-framework/docusaurus-plugin-interactive-tasks').remarkTaskDirective,
|
|
244
|
-
],
|
|
245
|
-
},
|
|
246
|
-
],
|
|
247
|
-
],
|
|
248
|
-
};
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
The `TaskProgression` component auto-detects the instance. To reference a different instance explicitly:
|
|
252
|
-
|
|
253
|
-
```mdx
|
|
254
|
-
<!-- Auto-detects parent doc's instance -->
|
|
255
|
-
<TaskProgression path="./intro" />
|
|
256
|
-
|
|
257
|
-
<!-- Explicitly reference a different instance -->
|
|
258
|
-
<TaskProgression path="/docs/intro" pluginId="default" />
|
|
259
|
-
<TaskProgression path="/community/getting-started" pluginId="community" />
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
### Configuring `TaskProgression`
|
|
263
|
-
|
|
264
|
-
| Prop | Type | Default | Description |
|
|
265
|
-
| ---------- | -------- | ----------- | ---------------------------------------------- |
|
|
266
|
-
| `path` | `string` | **Required** | Path to the document (absolute or relative) |
|
|
267
|
-
| `pluginId` | `string` | *Auto-detected* | [Docs Multi-instance](https://docusaurus.io/docs/docs-multi-instance) instance ID. Auto-detects from parent doc if not provided. |
|
|
268
|
-
|
|
269
|
-
### Configuring `TaskProgressionOverview`
|
|
270
|
-
|
|
271
|
-
| Prop | Type | Default | Description |
|
|
272
|
-
| ---------- | -------- | ----------- | ---------------------------- |
|
|
273
|
-
| `pluginId` | `string` | *Auto-detected* | [Docs Multi-instance](https://docusaurus.io/docs/docs-multi-instance) instance ID. Auto-detects from parent doc if not provided. |
|
|
@@ -1,120 +0,0 @@
|
|
|
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 Interactive Tasks plugin is already installed and configured. You can start creating tasks right away!
|
|
12
|
-
:::
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
Install the plugin using your preferred package manager:
|
|
17
|
-
|
|
18
|
-
<Tabs>
|
|
19
|
-
<TabItem value="npm" label="npm" default>
|
|
20
|
-
```bash
|
|
21
|
-
npm install @sp-days-framework/docusaurus-plugin-interactive-tasks
|
|
22
|
-
```
|
|
23
|
-
</TabItem>
|
|
24
|
-
<TabItem value="yarn" label="Yarn">
|
|
25
|
-
```bash
|
|
26
|
-
yarn add @sp-days-framework/docusaurus-plugin-interactive-tasks
|
|
27
|
-
```
|
|
28
|
-
</TabItem>
|
|
29
|
-
</Tabs>
|
|
30
|
-
|
|
31
|
-
Add the plugin to your plugins array and the remark plugin to your docs configuration:
|
|
32
|
-
|
|
33
|
-
```js title="docusaurus.config.js" {2,9-11}
|
|
34
|
-
module.exports = {
|
|
35
|
-
plugins: ["@sp-days-framework/docusaurus-plugin-interactive-tasks"],
|
|
36
|
-
|
|
37
|
-
presets: [
|
|
38
|
-
[
|
|
39
|
-
"classic",
|
|
40
|
-
{
|
|
41
|
-
docs: {
|
|
42
|
-
beforeDefaultRemarkPlugins: [
|
|
43
|
-
require("@sp-days-framework/docusaurus-plugin-interactive-tasks")
|
|
44
|
-
.remarkTaskDirective,
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
],
|
|
50
|
-
};
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Frontmatter Options
|
|
54
|
-
|
|
55
|
-
Customize task badge appearance for individual pages:
|
|
56
|
-
|
|
57
|
-
```mdx title="docs/my-module.mdx"
|
|
58
|
-
---
|
|
59
|
-
title: My Module
|
|
60
|
-
sidebar_task_hide_progress: false
|
|
61
|
-
sidebar_task_disable_icon: false
|
|
62
|
-
sidebar_task_badge_colors:
|
|
63
|
-
completed:
|
|
64
|
-
lightmode: "#4caf50"
|
|
65
|
-
darkmode: "#66bb6a"
|
|
66
|
-
incomplete:
|
|
67
|
-
lightmode: "#2196f3"
|
|
68
|
-
darkmode: "#42a5f5"
|
|
69
|
-
font:
|
|
70
|
-
lightmode: "#ffffff"
|
|
71
|
-
darkmode: "#000000"
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
# My Module Content
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Category Sidebar Configuration
|
|
78
|
-
|
|
79
|
-
Customize task badges for entire categories using `_category_.yml` or `_category_.json`:
|
|
80
|
-
|
|
81
|
-
<Tabs>
|
|
82
|
-
<TabItem value="yaml" label="YAML" default>
|
|
83
|
-
```yaml title="docs/module-01/_category_.yml"
|
|
84
|
-
label: "Module 1"
|
|
85
|
-
position: 1
|
|
86
|
-
customProps:
|
|
87
|
-
sidebar_task_badge_colors:
|
|
88
|
-
completed:
|
|
89
|
-
lightmode: "#4caf50"
|
|
90
|
-
darkmode: "#66bb6a"
|
|
91
|
-
incomplete:
|
|
92
|
-
lightmode: "#2196f3"
|
|
93
|
-
darkmode: "#42a5f5"
|
|
94
|
-
sidebar_task_disable_icon: false
|
|
95
|
-
```
|
|
96
|
-
</TabItem>
|
|
97
|
-
<TabItem value="json" label="JSON">
|
|
98
|
-
```json title="docs/module-02/_category_.json"
|
|
99
|
-
{
|
|
100
|
-
"label": "Module 2",
|
|
101
|
-
"position": 2,
|
|
102
|
-
"customProps": {
|
|
103
|
-
"sidebar_task_hide_progress": false,
|
|
104
|
-
"sidebar_task_badge_colors": {
|
|
105
|
-
"completed": {
|
|
106
|
-
"lightmode": "#4caf50",
|
|
107
|
-
"darkmode": "#66bb6a"
|
|
108
|
-
},
|
|
109
|
-
"incomplete": {
|
|
110
|
-
"lightmode": "#2196f3",
|
|
111
|
-
"darkmode": "#42a5f5"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
</TabItem>
|
|
118
|
-
</Tabs>
|
|
119
|
-
|
|
120
|
-
See [Advanced Configuration](./advanced-configuration.mdx) for all available options.
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 3
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
import Tabs from "@theme/Tabs";
|
|
6
|
-
import TabItem from "@theme/TabItem";
|
|
7
|
-
|
|
8
|
-
# Progress Components
|
|
9
|
-
|
|
10
|
-
Display task completion progress using the `TaskProgression` and `TaskProgressionOverview` components.
|
|
11
|
-
|
|
12
|
-
## Basic Usage
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<Tabs>
|
|
16
|
-
<TabItem value="single" label="Single Page" default>
|
|
17
|
-
Display progress for a specific document with a visual progress indicator.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```mdx
|
|
21
|
-
<TaskProgression path="./examples/basic-usage.mdx" />
|
|
22
|
-
```
|
|
23
|
-
<div className="preview">
|
|
24
|
-
<div className="container" style={{ width: '-webkit-fill-available'}}>
|
|
25
|
-
<TaskProgression path="./examples/basic-usage.mdx" />
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</TabItem>
|
|
29
|
-
<TabItem value="current" label="Current Page">
|
|
30
|
-
Reference the current page using `.` as the path:
|
|
31
|
-
|
|
32
|
-
```mdx
|
|
33
|
-
<TaskProgression path="." />
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
<div className="preview">
|
|
37
|
-
<div className="container" style={{ width: '-webkit-fill-available'}}>
|
|
38
|
-
<TaskProgression path="." />
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
<br/>
|
|
42
|
-
|
|
43
|
-
:::note
|
|
44
|
-
If no tasks is found on the page the Task Progression will show a error.
|
|
45
|
-
:::
|
|
46
|
-
</TabItem>
|
|
47
|
-
<TabItem value="result" label="Overview">
|
|
48
|
-
Display progress across all documents in the docs plugin instance.
|
|
49
|
-
|
|
50
|
-
```mdx
|
|
51
|
-
<TaskProgressionOverview />
|
|
52
|
-
```
|
|
53
|
-
<div className="preview">
|
|
54
|
-
<div className="container" style={{ width: '-webkit-fill-available', paddingBottom: '1.5rem'}}>
|
|
55
|
-
<TaskProgressionOverview />
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</TabItem>
|
|
59
|
-
</Tabs>
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Path Formats
|
|
64
|
-
|
|
65
|
-
The component supports multiple path formats:
|
|
66
|
-
|
|
67
|
-
```mdx
|
|
68
|
-
<!-- Current page -->
|
|
69
|
-
<TaskProgression path="." />
|
|
70
|
-
|
|
71
|
-
<!-- Absolute path -->
|
|
72
|
-
<TaskProgression path="/docs/tasks/creating-tasks" />
|
|
73
|
-
|
|
74
|
-
<!-- Relative to current page -->
|
|
75
|
-
<TaskProgression path="./sibling-page" />
|
|
76
|
-
<TaskProgression path="../parent-page" />
|
|
77
|
-
|
|
78
|
-
<!-- With file extension -->
|
|
79
|
-
<TaskProgression path="/docs/tasks/tasks-showcase.mdx" />
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Examples
|
|
85
|
-
|
|
86
|
-
### Learning Module Overview
|
|
87
|
-
|
|
88
|
-
Create an overview page showing progress across all modules:
|
|
89
|
-
|
|
90
|
-
```mdx
|
|
91
|
-
---
|
|
92
|
-
title: Course Overview
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
# Welcome to the Course
|
|
96
|
-
|
|
97
|
-
Track your progress across all modules:
|
|
98
|
-
|
|
99
|
-
<TaskProgressionOverview />
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Module Navigation
|
|
103
|
-
|
|
104
|
-
Link between related modules with progress indicators:
|
|
105
|
-
|
|
106
|
-
```mdx
|
|
107
|
-
## Prerequisites
|
|
108
|
-
|
|
109
|
-
Make sure you've completed the previous module:
|
|
110
|
-
|
|
111
|
-
<TaskProgression path="../module-01/index" />
|
|
112
|
-
|
|
113
|
-
## Current Module
|
|
114
|
-
|
|
115
|
-
Your progress in this module:
|
|
116
|
-
|
|
117
|
-
<TaskProgression path="." />
|
|
118
|
-
|
|
119
|
-
## Next Steps
|
|
120
|
-
|
|
121
|
-
Continue to the next module:
|
|
122
|
-
|
|
123
|
-
<TaskProgression path="../module-03/index" />
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Section Summary
|
|
127
|
-
|
|
128
|
-
Show progress for the current page at the top:
|
|
129
|
-
|
|
130
|
-
```mdx
|
|
131
|
-
# Introduction to React
|
|
132
|
-
|
|
133
|
-
<TaskProgression path="." />
|
|
134
|
-
|
|
135
|
-
Complete the tasks below to learn React fundamentals.
|
|
136
|
-
|
|
137
|
-
::::task[Setup React Project]
|
|
138
|
-
...
|
|
139
|
-
::::
|
|
140
|
-
```
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Slidev Integration
|
|
3
|
-
hide_title: true
|
|
4
|
-
sidebar_class_name: sidebar-logo-docusaurus
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
import { Iconify } from "@sp-days-framework/docusaurus-frontpage-collection";
|
|
8
|
-
|
|
9
|
-
<div align="center">
|
|
10
|
-
<div className="resourceLandingPage">
|
|
11
|
-
<Iconify icon="logos:docusaurus" width="105px"/>
|
|
12
|
-
<Iconify icon="mdi:plus-thick" width="50px" iconColors={{ light: "#000000", dark: "#ffffff" }} />
|
|
13
|
-
<Iconify icon="logos:slidev" width="95px"/>
|
|
14
|
-
</div>
|
|
15
|
-
<div align="center">
|
|
16
|
-
# Docusaurus Slidev Integration
|
|
17
|
-
</div>
|
|
18
|
-
<div align="center">
|
|
19
|
-
<p>
|
|
20
|
-
*Seamlessly integrate Slidev presentations into your Docusaurus site!*
|
|
21
|
-
</p>
|
|
22
|
-
<h4>
|
|
23
|
-
[Setup](./setup/index.mdx)
|
|
24
|
-
·
|
|
25
|
-
[NPM Package](https://www.npmjs.com/package/@sp-days-framework/docusaurus-plugin-slidev)
|
|
26
|
-
·
|
|
27
|
-
[Source Code](https://github.com/helse-sorost/sp-days-framework)
|
|
28
|
-
</h4>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Features
|
|
35
|
-
|
|
36
|
-
- **Automatic Discovery** - Scans directories for Slidev markdown files and builds them automatically
|
|
37
|
-
- **Interactive Overview Page** - Auto-generated gallery with presentation previews, metadata, and sorting
|
|
38
|
-
- **Zero-Config Setup** - Works out of the box with sensible defaults
|
|
39
|
-
- **Theme Support** - Global or per-presentation theme configuration with automatic validation
|
|
40
|
-
- **Development & Production Modes** - Fast development workflow with separate slide preview
|
|
41
|
-
|
|
42
|
-
## Getting Started
|
|
43
|
-
|
|
44
|
-
### 1. Create Your Presentation
|
|
45
|
-
|
|
46
|
-
Create a presentation in the `/slidev/` directory:
|
|
47
|
-
|
|
48
|
-
```markdown title="slidev/introduction.md"
|
|
49
|
-
---
|
|
50
|
-
theme: "@sp-days-framework/slidev-theme-sykehuspartner"
|
|
51
|
-
title: Introduction to Docker
|
|
52
|
-
description: Learn containerization fundamentals
|
|
53
|
-
author: Your Name
|
|
54
|
-
layout: cover
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
# Introduction to Docker
|
|
58
|
-
## Containerization Made Simple
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
# What is Docker?
|
|
63
|
-
|
|
64
|
-
Docker is a platform for developing, shipping, and running applications in containers.
|
|
65
|
-
```
|
|
66
|
-
### 2. Live Preview During Development
|
|
67
|
-
|
|
68
|
-
Run Slidev directly to work on your presentation with hot-reload:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
npm run slidev ./slidev/my-presentation.md
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
This opens your presentation in the browser with live updates as you edit.
|
|
75
|
-
|
|
76
|
-
### 3. View in Docusaurus
|
|
77
|
-
|
|
78
|
-
Build your Docusaurus site to see presentations integrated:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
npm run build
|
|
82
|
-
npm run serve
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Open the page and select "Slides" in the navbar to see the overview gallery.
|
|
86
|
-
|
|
87
|
-
:::note[Development Mode Limitation]
|
|
88
|
-
|
|
89
|
-
Presentations are **not built** during `npm run start`, [read more about it here.](./setup/index.mdx#development-vs-production-modes)
|
|
90
|
-
|
|
91
|
-
:::
|
|
92
|
-
|
|
93
|
-
See [Setup](./setup/index.mdx) for installation and configuration.
|
|
94
|
-
|
|
95
|
-
## How It Works
|
|
96
|
-
|
|
97
|
-
1. **Scan Phase** - Plugin scans the `/slidev/` directory for `.md` files during build
|
|
98
|
-
2. **Extract Metadata** - Frontmatter is parsed from each file (title, description, theme, author)
|
|
99
|
-
3. **Build Phase** - In production, Slidev builds each presentation to `static/slides/`
|
|
100
|
-
4. **Generate Overview** - Creates an interactive overview page (default: `/slidev`) with previews
|
|
101
|
-
5. **Serve** - Built presentations are accessible via unique URLs
|
|
102
|
-
|
|
103
|
-
## Documentation
|
|
104
|
-
|
|
105
|
-
- **[Advanced Configuration](./setup/advanced-configuration.mdx)** - Detailed plugin options
|
|
106
|
-
- **[Sykehuspartner Theme](../sykehuspartner-theme/index.mdx)** - Theme documentation and layouts
|