@sp-days-framework/create-sp-days 1.0.4 → 1.1.0-beta2

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 (75) hide show
  1. package/README.md +14 -0
  2. package/bin/index.js +2 -0
  3. package/docs/advanced-config.mdx +412 -0
  4. package/docs/changelog.mdx +129 -0
  5. package/docs/index.mdx +206 -0
  6. package/docs/install.mdx +199 -0
  7. package/docs/sidebar-sections.mdx +268 -0
  8. package/docs/sp-days-plugin-color-light.svg +53 -0
  9. package/lib/.tsbuildinfo +1 -0
  10. package/lib/.tsbuildinfo-build +1 -0
  11. package/lib/index.d.ts +1 -0
  12. package/lib/index.js +36 -7
  13. package/package.json +31 -7
  14. package/publish-package-docs.js +12 -0
  15. package/templates/addon-resources/resources/api-reference.mdx +132 -0
  16. package/templates/addon-resources/resources/best-practice.mdx +407 -0
  17. package/templates/addon-resources/resources/cheat-sheet.mdx +120 -0
  18. package/templates/addon-resources/resources/cli-reference.mdx +280 -0
  19. package/templates/addon-resources/resources/configuration-guide.mdx +211 -0
  20. package/templates/addon-resources/resources/environment-setup.mdx +317 -0
  21. package/templates/addon-resources/resources/faq.mdx +146 -0
  22. package/templates/addon-resources/resources/glossary.mdx +78 -0
  23. package/templates/addon-resources/resources/index.mdx +67 -16
  24. package/templates/addon-resources/resources/quick-start.mdx +193 -0
  25. package/templates/addon-resources/resources/troubleshooting.mdx +263 -0
  26. package/templates/addon-resources/resources/useful-links.mdx +61 -0
  27. package/templates/page-course/README.md +87 -0
  28. package/templates/page-course/docusaurus.config.ts +103 -10
  29. package/templates/page-course/package.json +12 -2
  30. package/templates/page-course/sidebarSections.js +118 -0
  31. package/templates/page-course/src/css/sp-days-theme.scss +428 -211
  32. package/tsconfig.base.client.json +10 -0
  33. package/tsconfig.base.json +71 -0
  34. package/tsconfig.build.json +9 -0
  35. package/sp-days-framework-create-sp-days-1.0.3.tgz +0 -0
  36. package/templates/addon-resources/resources/interactive-tasks/creating-tasks.mdx +0 -254
  37. package/templates/addon-resources/resources/interactive-tasks/examples/_category_.yml +0 -3
  38. package/templates/addon-resources/resources/interactive-tasks/examples/advanced-usage.mdx +0 -304
  39. package/templates/addon-resources/resources/interactive-tasks/examples/basic-usage.mdx +0 -128
  40. package/templates/addon-resources/resources/interactive-tasks/index.mdx +0 -93
  41. package/templates/addon-resources/resources/interactive-tasks/setup/advanced-configuration.mdx +0 -273
  42. package/templates/addon-resources/resources/interactive-tasks/setup/index.mdx +0 -120
  43. package/templates/addon-resources/resources/interactive-tasks/task-progression.mdx +0 -140
  44. package/templates/addon-resources/resources/slidev-integration/index.mdx +0 -106
  45. package/templates/addon-resources/resources/slidev-integration/setup/advanced-configuration.mdx +0 -144
  46. package/templates/addon-resources/resources/slidev-integration/setup/index.mdx +0 -200
  47. package/templates/addon-resources/resources/sykehuspartner-theme/index.mdx +0 -105
  48. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/_category_.yml +0 -2
  49. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/_category_.yml +0 -2
  50. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/center.mdx +0 -33
  51. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/default.mdx +0 -59
  52. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/content/full.mdx +0 -49
  53. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/_category_.yml +0 -2
  54. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image-left.mdx +0 -37
  55. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image-right.mdx +0 -37
  56. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/image/image.mdx +0 -56
  57. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/_category_.yml +0 -2
  58. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/three-cols-header.mdx +0 -49
  59. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/three-cols.mdx +0 -47
  60. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/two-cols-header.mdx +0 -43
  61. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/multi-column/two-cols.mdx +0 -38
  62. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/_category_.yml +0 -2
  63. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/cover.mdx +0 -43
  64. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/end.mdx +0 -33
  65. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/intro.mdx +0 -49
  66. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/section/section.mdx +0 -41
  67. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/_category_.yml +0 -2
  68. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/about-me.mdx +0 -92
  69. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/fact.mdx +0 -47
  70. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/quote.mdx +0 -27
  71. package/templates/addon-resources/resources/sykehuspartner-theme/layouts/special/statement.mdx +0 -28
  72. package/templates/addon-resources/resources/sykehuspartner-theme/setup/advanced-configuration.mdx +0 -79
  73. package/templates/addon-resources/resources/sykehuspartner-theme/setup/index.mdx +0 -104
  74. package/templates/addon-resources/resources/sykehuspartner-theme/syntax-and-icons.mdx +0 -89
  75. package/templates/addon-slidev/package.json +0 -54
@@ -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
@@ -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.