@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,304 @@
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
+ ::::
@@ -0,0 +1,128 @@
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
+ ::::
@@ -0,0 +1,171 @@
1
+ import { themes as prismThemes } from "prism-react-renderer";
2
+ import type { Config } from "@docusaurus/types";
3
+ import type * as Preset from "@docusaurus/preset-classic";
4
+
5
+ const organizationName = "<%= organizationName %>"; // Usually Helse Sør-Øst GitHub Organization
6
+ const projectName = "<%= projectName %>"; // Usually your repo name.
7
+ const gitRepositoryUrl = "<%= gitRepositoryUrl %>"; // Repository URL
8
+ const title = "<%= title %>"; // Site title
9
+ const tagline = "<%= tagline %>"; // Site tagline
10
+
11
+ const config: Config = {
12
+ title,
13
+ tagline,
14
+ favicon: "img/favicon-navbar/sp-days-logo",
15
+
16
+ // Improve compatibility with the upcoming Docusaurus v4
17
+ future: {
18
+ v4: true,
19
+ },
20
+
21
+ // Set the production url of your site here
22
+ url: `https://${organizationName}.github.io`,
23
+ baseUrl: "/",
24
+
25
+ // GitHub pages deployment config.
26
+ organizationName,
27
+ projectName,
28
+ trailingSlash: false,
29
+
30
+ // Recommended to set to 'throw' to ensure broken links are caught during development
31
+ onBrokenLinks: "throw",
32
+
33
+ // Adds static directories
34
+ staticDirectories: ["static"],
35
+
36
+ presets: [
37
+ [
38
+ "classic",
39
+ {
40
+ docs: {
41
+ id: "course",
42
+ path: "course",
43
+ routeBasePath: "course",
44
+ remarkPlugins: [
45
+ require("@sp-days-framework/docusaurus-plugin-interactive-tasks")
46
+ .remarkTaskDirective,
47
+ ],
48
+ },
49
+ theme: {
50
+ customCss: "./src/css/sp-days-theme.scss",
51
+ },
52
+ } satisfies Preset.Options,
53
+ ],
54
+ ],
55
+
56
+ plugins: [
57
+ // Adds SASS/SCSS support
58
+ "docusaurus-plugin-sass",
59
+
60
+ // Adds the Interactive Tasks plugin to enable task directives
61
+ "@sp-days-framework/docusaurus-plugin-interactive-tasks",
62
+
63
+ // CONDITIONAL: addon-slidev (START)
64
+ // Adds the Slidev plugin to enable slide presentations and static directories for Slidev assets
65
+ "@sp-days-framework/docusaurus-plugin-slidev",
66
+ // CONDITIONAL: addon-slidev (END)
67
+
68
+ // CONDITIONAL: addon-resources (START)
69
+ // Resources documentation instance
70
+ [
71
+ "@docusaurus/plugin-content-docs",
72
+ {
73
+ id: "resources",
74
+ path: "resources",
75
+ routeBasePath: "resources",
76
+ remarkPlugins: [
77
+ require("@sp-days-framework/docusaurus-plugin-interactive-tasks")
78
+ .remarkTaskDirective,
79
+ ],
80
+ },
81
+ ],
82
+ // CONDITIONAL: addon-resources (END)
83
+ ],
84
+
85
+ markdown: {
86
+ mermaid: true,
87
+ },
88
+
89
+ // Mermaid support
90
+ themes: ["@docusaurus/theme-mermaid"],
91
+
92
+ themeConfig: {
93
+ colorMode: {
94
+ respectPrefersColorScheme: true,
95
+ },
96
+ navbar: {
97
+ title: title,
98
+ logo: {
99
+ alt: "Sykehuspartner HF",
100
+ src: "img/favicon-navbar/sorost-logo-light.svg",
101
+ srcDark: "img/favicon-navbar/sorost-logo-dark.svg",
102
+ },
103
+ items: [
104
+ { to: "/course", label: "Course" },
105
+ // CONDITIONAL: addon-resources (START)
106
+ { to: "/resources", label: "Resources" },
107
+ // CONDITIONAL: addon-resources (END)
108
+ // CONDITIONAL: addon-slidev (START)
109
+ { to: "/slidev", label: "Slides" },
110
+ // CONDITIONAL: addon-slidev (END)
111
+ {
112
+ href: gitRepositoryUrl,
113
+ position: "right",
114
+ className: "navbar-github-link",
115
+ "aria-label": "GitHub repository",
116
+ },
117
+ ],
118
+ },
119
+ footer: {
120
+ style: "dark",
121
+ logo: {
122
+ alt: "Sykehuspartner Logo",
123
+ src: "img/footer/sykehuspartner-dark.svg",
124
+ href: "https://www.sykehuspartner.no/",
125
+ width: 360,
126
+ height: 81,
127
+ },
128
+ copyright: `Copyright © ${new Date().getFullYear()} Sykehuspartner . Built with Docusaurus.`,
129
+ },
130
+ prism: {
131
+ additionalLanguages: [
132
+ "bash",
133
+ "batch",
134
+ "c",
135
+ "csharp",
136
+ "docker",
137
+ "dot",
138
+ "git",
139
+ "hcl",
140
+ "http",
141
+ "ignore",
142
+ "ini",
143
+ "log",
144
+ "makefile",
145
+ "mermaid",
146
+ "nginx",
147
+ "plant-uml",
148
+ "powershell",
149
+ "cshtml",
150
+ "regex",
151
+ "sass",
152
+ "scss",
153
+ "shell-session",
154
+ "solution-file",
155
+ "splunk-spl",
156
+ "sql",
157
+ "systemd",
158
+ "toml",
159
+ "typescript",
160
+ "typoscript",
161
+ "uri",
162
+ "vim",
163
+ "yaml",
164
+ ],
165
+ theme: prismThemes.oceanicNext,
166
+ darkTheme: prismThemes.oceanicNext,
167
+ },
168
+ } satisfies Preset.ThemeConfig,
169
+ };
170
+
171
+ export default config;
@@ -0,0 +1,66 @@
1
+ # IMPORTANT: Verify that all paths below match your project structure.
2
+ # The DOCS_PATH variable should point to your documentation directory.
3
+
4
+ name: Deploy to GitHub Pages
5
+
6
+ # Environment variable for the documentation path
7
+ # Change this if your documentation is in a different location
8
+ env:
9
+ DOCS_PATH: <%= directoryName %>
10
+
11
+ on:
12
+ workflow_dispatch:
13
+ push:
14
+ branches:
15
+ - main
16
+ paths:
17
+ - '<%= directoryName %>/**'
18
+
19
+ concurrency:
20
+ group: "pages"
21
+ cancel-in-progress: false
22
+
23
+ jobs:
24
+ build:
25
+ name: Build Docusaurus
26
+ runs-on: ubuntu-latest
27
+ environment: github-pages
28
+ defaults:
29
+ run:
30
+ working-directory: ./${{ env.DOCS_PATH }}
31
+ steps:
32
+ - uses: actions/checkout@v4
33
+
34
+ - name: Setup Node.js
35
+ uses: actions/setup-node@v3
36
+ with:
37
+ node-version: '20'
38
+ cache: 'npm'
39
+ cache-dependency-path: './${{ env.DOCS_PATH }}/package-lock.json'
40
+
41
+ - name: Install dependencies
42
+ run: npm ci
43
+
44
+ - name: Build website
45
+ run: npm run build
46
+
47
+ - name: Upload Build Artifact
48
+ uses: actions/upload-pages-artifact@v3
49
+ with:
50
+ path: ./${{ env.DOCS_PATH }}/build
51
+
52
+ deploy:
53
+ name: Deploy to GitHub Pages
54
+ environment:
55
+ name: github-pages
56
+ url: ${{ steps.deployment.outputs.page_url }}
57
+ runs-on: ubuntu-latest
58
+ needs: build
59
+ permissions:
60
+ pages: write # to deploy to Pages
61
+ id-token: write # to authenticate with GitHub Pages
62
+
63
+ steps:
64
+ - name: Deploy to GitHub Pages
65
+ id: deployment
66
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,20 @@
1
+ # Dependencies
2
+ /node_modules
3
+
4
+ # Production
5
+ /build
6
+
7
+ # Generated files
8
+ .docusaurus
9
+ .cache-loader
10
+
11
+ # Misc
12
+ .DS_Store
13
+ .env.local
14
+ .env.development.local
15
+ .env.test.local
16
+ .env.production.local
17
+
18
+ npm-debug.log*
19
+ yarn-debug.log*
20
+ yarn-error.log*