@mgks/docmd 0.1.4 → 0.2.1

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 (52) hide show
  1. package/README.md +2 -4
  2. package/assets/css/welcome.css +5 -377
  3. package/assets/images/preview-dark-1.webp +0 -0
  4. package/assets/images/preview-dark-2.webp +0 -0
  5. package/assets/images/preview-dark-3.webp +0 -0
  6. package/assets/images/preview-light-1.webp +0 -0
  7. package/assets/images/preview-light-2.webp +0 -0
  8. package/assets/images/preview-light-3.webp +0 -0
  9. package/config.js +40 -6
  10. package/docs/configuration.md +82 -7
  11. package/docs/content/containers/buttons.md +88 -0
  12. package/docs/content/containers/callouts.md +154 -0
  13. package/docs/content/containers/cards.md +93 -0
  14. package/docs/content/containers/index.md +35 -0
  15. package/docs/content/containers/nested-containers.md +329 -0
  16. package/docs/content/containers/steps.md +175 -0
  17. package/docs/content/containers/tabs.md +228 -0
  18. package/docs/content/custom-containers.md +19 -124
  19. package/docs/content/frontmatter.md +2 -2
  20. package/docs/content/no-style-example.md +2 -0
  21. package/docs/content/no-style-pages.md +52 -28
  22. package/docs/index.md +55 -27
  23. package/docs/plugins/seo.md +80 -31
  24. package/docs/theming/available-themes.md +17 -2
  25. package/docs/theming/light-dark-mode.md +12 -3
  26. package/package.json +21 -9
  27. package/src/assets/css/docmd-main.css +5 -806
  28. package/src/assets/css/docmd-theme-retro.css +9 -0
  29. package/src/assets/css/docmd-theme-ruby.css +7 -604
  30. package/src/assets/css/docmd-theme-sky.css +7 -649
  31. package/src/assets/js/docmd-image-lightbox.js +4 -2
  32. package/src/assets/js/docmd-main.js +157 -0
  33. package/src/commands/build.js +62 -120
  34. package/src/commands/dev.js +2 -1
  35. package/src/commands/init.js +23 -1
  36. package/src/core/config-loader.js +2 -0
  37. package/src/core/file-processor.js +669 -373
  38. package/src/core/html-generator.js +49 -40
  39. package/src/core/icon-renderer.js +3 -2
  40. package/src/plugins/analytics.js +5 -1
  41. package/src/plugins/seo.js +114 -62
  42. package/src/plugins/sitemap.js +6 -0
  43. package/src/templates/layout.ejs +40 -8
  44. package/src/templates/no-style.ejs +23 -6
  45. package/src/templates/partials/theme-init.js +26 -0
  46. package/assets/images/preview-dark-1.png +0 -0
  47. package/assets/images/preview-dark-2.png +0 -0
  48. package/assets/images/preview-dark-3.png +0 -0
  49. package/assets/images/preview-light-1.png +0 -0
  50. package/assets/images/preview-light-2.png +0 -0
  51. package/assets/images/preview-light-3.png +0 -0
  52. package/src/assets/js/docmd-theme-toggle.js +0 -59
@@ -0,0 +1,175 @@
1
+ ---
2
+ title: "Steps Container"
3
+ description: "Create step-by-step instructions and tutorials with the steps container."
4
+ ---
5
+
6
+ # Steps Container
7
+
8
+ The steps container allows you to create clear, sequential instructions and tutorials. It automatically numbers your steps and provides a clean, organized layout.
9
+
10
+ ## Basic Usage
11
+
12
+ **Code:**
13
+
14
+ ```markdown
15
+ ::: steps
16
+
17
+ 1. **Create a new project**
18
+ Initialize your project with the necessary configuration files.
19
+
20
+ 2. **Install dependencies**
21
+ Run the package manager to install required libraries.
22
+
23
+ 3. **Start development**
24
+ Begin coding your application with the setup complete.
25
+
26
+ ::: button Learn_More #customization color:green
27
+
28
+ :::
29
+ ```
30
+
31
+ **Rendered Preview:**
32
+
33
+ ::: steps
34
+
35
+ 1. **Create a new project**
36
+ Initialize your project with the necessary configuration files.
37
+
38
+ 2. **Install dependencies**
39
+ Run the package manager to install required libraries.
40
+
41
+ 3. **Start development**
42
+ Begin coding your application with the setup complete.
43
+
44
+ ::: button Learn_More #customization color:green
45
+
46
+ :::
47
+
48
+ ## Steps with Nested Containers
49
+
50
+ You can include cards, callouts, and buttons inside steps for richer content:
51
+
52
+ **Code:**
53
+
54
+ ```markdown
55
+ ::: steps
56
+
57
+ 1. **Plan Your Project**
58
+ Define the scope and requirements for your application.
59
+
60
+ ::: callout info Planning Tip
61
+ Consider creating user stories to better understand your requirements.
62
+ :::
63
+
64
+ 2. **Setup Development Environment**
65
+ Configure your local development tools and workspace.
66
+
67
+ ::: card Environment Checklist
68
+ - Install code editor (VS Code recommended)
69
+ - Setup version control (Git)
70
+ - Install Node.js and npm
71
+ - Configure linting and formatting tools
72
+ :::
73
+
74
+ 3. **Initialize Project**
75
+ Create the project structure and configuration files.
76
+
77
+ ::: button Create_Project external:https://github.com/new color:blue
78
+
79
+ 4. **Start Coding**
80
+ Begin implementing your application features.
81
+
82
+ ::: callout success Ready to Code
83
+ Your development environment is now ready! Happy coding!
84
+ :::
85
+
86
+ :::
87
+ ```
88
+
89
+ **Rendered Preview:**
90
+
91
+ ::: steps
92
+
93
+ 1. **Plan Your Project**
94
+ Define the scope and requirements for your application.
95
+
96
+ ::: callout info Planning Tip
97
+ Consider creating user stories to better understand your requirements.
98
+ :::
99
+
100
+ 2. **Setup Development Environment**
101
+ Configure your local development tools and workspace.
102
+
103
+ ::: card Environment Checklist
104
+ - Install code editor (VS Code recommended)
105
+ - Setup version control (Git)
106
+ - Install Node.js and npm
107
+ - Configure linting and formatting tools
108
+ :::
109
+
110
+ 3. **Initialize Project**
111
+ Create the project structure and configuration files.
112
+
113
+ ::: button Create_Project external:https://github.com/new color:blue
114
+
115
+ 4. **Start Coding**
116
+ Begin implementing your application features.
117
+
118
+ ::: callout success Ready to Code
119
+ Your development environment is now ready! Happy coding!
120
+ :::
121
+
122
+ :::
123
+
124
+ ## Steps and Tabs Compatibility
125
+
126
+ ::: callout error Important Limitation
127
+ **Steps and tabs containers are incompatible** - they cannot be nested within each other due to markdown parsing conflicts. Use them as separate sections instead.
128
+
129
+ **Supported in steps:** Cards, callouts, buttons
130
+ **Not supported:** Tabs containers
131
+ :::
132
+
133
+ **Code:**
134
+
135
+ ```markdown
136
+ ## Installation Steps
137
+
138
+ ::: steps
139
+
140
+ 1. **Choose Your Platform**
141
+ Select the appropriate installation method for your operating system.
142
+
143
+ 2. **Download the Installer**
144
+ Get the latest version from the downloads section.
145
+
146
+ 3. **Run Installation**
147
+ Follow the setup wizard to complete installation.
148
+
149
+ :::
150
+
151
+ ## Platform-Specific Instructions
152
+
153
+ ::: tabs
154
+ == tab "Windows"
155
+ Download the `.exe` installer and run as administrator.
156
+
157
+ ::: button Learn_More #customization
158
+
159
+ == tab "macOS"
160
+ Download the `.dmg` file and drag to Applications folder.
161
+
162
+ ::: button Learn_More #customization
163
+
164
+ :::
165
+ ```
166
+
167
+ ## Customization
168
+
169
+ Steps containers automatically apply consistent styling and numbering. The container handles:
170
+
171
+ - **Automatic numbering** - Steps are numbered sequentially
172
+ - **Consistent spacing** - Proper spacing between steps
173
+ - **Responsive design** - Works on all screen sizes
174
+ - **Theme integration** - Matches your site's theme
175
+ - **Smart list handling** - Only step items get special styling, nested lists remain normal
@@ -0,0 +1,228 @@
1
+ ---
2
+ title: "Tabs Container"
3
+ description: "Create tabbed content sections with the tabs container for organizing related information."
4
+ ---
5
+
6
+ # Tabs Container
7
+
8
+ The tabs container allows you to organize content into multiple tabbed sections, making it easy to present related information in a clean, organized way.
9
+
10
+ ## Basic Usage
11
+
12
+ ```markdown
13
+ ::: tabs
14
+
15
+ == tab "First Tab"
16
+ Content for the first tab goes here.
17
+
18
+ == tab "Second Tab"
19
+ Content for the second tab goes here.
20
+
21
+ == tab "Third Tab"
22
+ Content for the third tab goes here.
23
+
24
+ :::
25
+ ```
26
+
27
+ ::: tabs
28
+
29
+ == tab "First Tab"
30
+ Content for the first tab goes here.
31
+
32
+ == tab "Second Tab"
33
+ Content for the second tab goes here.
34
+
35
+ == tab "Third Tab"
36
+ Content for the third tab goes here.
37
+
38
+ :::
39
+
40
+ ## Tabs with Nested Content
41
+
42
+ ### Tabs with Buttons
43
+
44
+ ```markdown
45
+ ::: tabs
46
+
47
+ == tab "Download"
48
+ Get the latest version of our application.
49
+
50
+ ::: button Download_Here external:https://github.com/mgks/docmd/releases
51
+ ::: button Learn_More #advanced-tabs
52
+ ::: button NPM_Package external:https://www.npmjs.com/package/@mgks/docmd
53
+
54
+ == tab "Documentation"
55
+ Read our comprehensive documentation.
56
+
57
+ ::: button View_Getting_Started #basic-usage
58
+ ::: button API_Reference external:https://github.com/mgks/docmd/wiki
59
+ ::: button View_Examples #advanced-tabs
60
+
61
+ :::
62
+ ```
63
+
64
+ ::: tabs
65
+
66
+ == tab "Download"
67
+ Get the latest version of our application.
68
+
69
+ ::: button Download_Here external:https://github.com/mgks/docmd/releases
70
+ ::: button Learn_More #advanced-tabs
71
+ ::: button NPM_Package external:https://www.npmjs.com/package/@mgks/docmd
72
+
73
+ == tab "Documentation"
74
+ Read our comprehensive documentation.
75
+
76
+ ::: button View_Getting_Started #basic-usage
77
+ ::: button API_Reference external:https://github.com/mgks/docmd/wiki
78
+ ::: button View_Examples #advanced-tabs
79
+
80
+ :::
81
+
82
+ ### Tabs with Callouts
83
+
84
+ ```markdown
85
+ ::: tabs
86
+
87
+ == tab "Getting Started"
88
+ Welcome to our platform!
89
+
90
+ ::: callout info Welcome
91
+ This is your first time here. Let's get you started!
92
+ :::
93
+
94
+ ::: callout tip Pro Tip
95
+ Check out our quick start guide for the fastest setup.
96
+ :::
97
+
98
+ == tab "Advanced Features"
99
+ Explore advanced functionality.
100
+
101
+ ::: callout warning Important
102
+ Some features require additional configuration.
103
+ :::
104
+
105
+ ::: callout success Ready
106
+ You're all set to explore advanced features!
107
+ :::
108
+
109
+ :::
110
+ ```
111
+
112
+ ::: tabs
113
+
114
+ == tab "Getting Started"
115
+ Welcome to our platform!
116
+
117
+ ::: callout info Welcome
118
+ This is your first time here. Let's get you started!
119
+ :::
120
+
121
+ ::: callout tip Pro Tip
122
+ Check out our quick start guide for the fastest setup.
123
+ :::
124
+
125
+ == tab "Advanced Features"
126
+ Explore advanced functionality.
127
+
128
+ ::: callout warning Important
129
+ Some features require additional configuration.
130
+ :::
131
+
132
+ ::: callout success Ready
133
+ You're all set to explore advanced features!
134
+ :::
135
+
136
+ :::
137
+
138
+ ## Complex Nested Structure
139
+
140
+ ````bash
141
+ ::: tabs
142
+
143
+ == tab "Nested Card Example"
144
+ ::: card Installation Guide
145
+
146
+ **Download**
147
+ Get the latest version for your platform.
148
+
149
+ ::: button Get_Latest external:https://github.com/mgks/docmd/releases
150
+
151
+ **Install**
152
+ Run the installer and follow the prompts.
153
+
154
+ ```bash
155
+ install docmd
156
+ ```
157
+
158
+ :::
159
+
160
+ == tab "Callout Example"
161
+
162
+ **Configure**
163
+ Set up your preferences.
164
+
165
+ ::: callout warning Configuration
166
+ Don't forget to configure your settings!
167
+ :::
168
+
169
+ :::
170
+ ````
171
+
172
+ ::: tabs
173
+
174
+ == tab "Nested Card Example"
175
+ ::: card Installation Guide
176
+
177
+ **Download**
178
+ Get the latest version for your platform.
179
+
180
+ ::: button Get_Latest external:https://github.com/mgks/docmd/releases
181
+
182
+ **Install**
183
+ Run the installer and follow the prompts.
184
+
185
+ ```bash
186
+ install docmd
187
+ ```
188
+
189
+ :::
190
+
191
+ == tab "Callout Example"
192
+
193
+ **Configure**
194
+ Set up your preferences.
195
+
196
+ ::: callout warning Configuration
197
+ Don't forget to configure your settings!
198
+ :::
199
+
200
+ :::
201
+
202
+ ## Customization
203
+
204
+ Tabs containers automatically handle:
205
+
206
+ - **Responsive design** - Works on all screen sizes
207
+ - **Theme integration** - Matches your site's theme
208
+ - **Accessibility** - Proper ARIA labels and keyboard navigation
209
+ - **Smooth transitions** - Elegant tab switching animations
210
+
211
+ ## Best Practices
212
+
213
+ 1. **Clear Labels** - Use descriptive tab names
214
+ 2. **Consistent Content** - Keep similar content types in each tab
215
+ 3. **Logical Order** - Arrange tabs in a logical sequence
216
+ 4. **Not Too Many** - Limit to 5-7 tabs for best usability
217
+ 5. **Mobile Friendly** - Consider mobile users when organizing content
218
+
219
+ ## Nesting Limitations
220
+
221
+ ::: callout error Important Limitation
222
+ **Steps containers cannot be used inside tabs** due to parsing conflicts. If you need step-by-step instructions within tabs, use regular numbered lists or consider restructuring your content.
223
+ :::
224
+
225
+ - **Tabs cannot contain tabs** - This prevents infinite recursion
226
+ - **Steps inside tabs not supported** - Use regular ordered lists instead
227
+ - **Maximum depth** - While technically unlimited, keep it under 7 levels for readability
228
+ - **Performance** - Very deep nesting may impact rendering performance
@@ -1,129 +1,24 @@
1
1
  ---
2
2
  title: "Custom Containers"
3
3
  description: "Enhance your documentation with special components like callouts, cards, and steps using docmd's custom container syntax."
4
+ noStyle: true
5
+ components:
6
+ meta: false
7
+ favicon: true
8
+ css: false
9
+ theme: false
10
+ scripts: false
11
+ customHead: |
12
+ <script>
13
+ window.location.href = "https://docmd.mgks.dev/content/containers/";
14
+ document.addEventListener("DOMContentLoaded", function () {
15
+ window.location.href = "https://docmd.mgks.dev/content/containers/";
16
+ });
17
+ </script>
18
+ bodyClass: "no-style-example"
4
19
  ---
5
20
 
6
- # Custom Containers
7
-
8
- `docmd` provides a simple syntax for adding richer, pre-styled components to your Markdown content using "custom containers." These are powered by the `markdown-it-container` plugin.
9
-
10
- The general syntax is:
11
-
12
- ```
13
- ::: containerName [optionalTitleOrType]
14
- Content for the container goes here.
15
- It can span **multiple lines** and include other *Markdown* elements.
16
- :::
17
- ```
18
-
19
- ## Callouts
20
-
21
- Callouts are useful for highlighting important information, warnings, tips, or notes.
22
-
23
- **Syntax:**
24
- ```
25
- ::: callout type
26
- Content of the callout.
27
- :::
28
- ```
29
- * `type`: Can be `info`, `warning`, `tip`, or `danger`.
30
-
31
- **Examples:**
32
-
33
- ::: callout info
34
- This is an informational message. It's good for general notes or neutral supplementary details.
35
- :::
36
-
37
- ::: callout warning
38
- **Watch out!** This indicates something that requires caution or might lead to unexpected results if ignored.
39
- :::
40
-
41
- ::: callout tip
42
- Here's a helpful tip or a best practice suggestion to improve a process or understanding.
43
- :::
44
-
45
- ::: callout danger
46
- **Critical!** This highlights a potential risk, a destructive action, or something that must be avoided.
47
- :::
48
-
49
- ## Cards
50
-
51
- Cards provide a visually distinct block for grouping related content, often with a title.
52
-
53
- **Syntax:**
54
- ```
55
- ::: card Optional Card Title
56
- The main body content of the card.
57
- Supports **Markdown** formatting.
58
- - List item 1
59
- - List item 2
60
- :::
61
- ```
62
- * `Optional Card Title`: If provided after `card`, it becomes the title of the card.
63
-
64
- **Example:**
65
-
66
- ::: card My Feature Overview
67
- This card describes an amazing feature.
68
- * It's easy to use.
69
- * It solves a common problem.
70
-
71
- Learn more by reading the full guide.
72
- :::
73
-
74
- ::: card
75
- This is a card without an explicit title. The content starts directly.
76
- Ideal for small, self-contained snippets.
77
- :::
78
-
79
- ## Steps
80
-
81
- The "steps" container is designed for presenting a sequence of actions or instructions, often in a numbered or ordered fashion.
82
-
83
- **Syntax:**
84
-
85
- ```
86
- ::: steps
87
- > 1. **First Step Title:**
88
- > Description of the first step.
89
-
90
- > 2. **Second Step Title:**
91
- > Description of the second step.
92
-
93
- > *. **Using Asterisk:**
94
- > Alternative numbering style.
95
-
96
- > **No Number:**
97
- > Without a number.
98
- :::
99
- ```
100
-
101
- **How it works:**
102
-
103
- The steps container uses blockquotes (`>`) to define individual steps. Start each step with a number or asterisk followed by a period, then the step title in bold. The content after the title becomes the step content.
104
-
105
- **Example:**
106
-
107
- ::: steps
108
- > 1. **Install Dependencies:**
109
- > First, make sure you have Node.js and npm installed. Then, run:
110
- >
111
- > ```bash
112
- > npm install my-package
113
- > ```
114
-
115
- > 2. **Configure the Settings:**
116
- > Open the `config.json` file and update the `apiKey` with your credentials.
117
-
118
- > 3. **Run the Application:**
119
- > Start the application using:
120
- >
121
- > ```bash
122
- > npm start
123
- > ```
124
- >
125
- > You should see "Application started successfully!" in your console.
126
- :::
127
- :::
128
-
129
- These custom containers allow you to create more engaging and structured documentation without needing to write custom HTML or CSS for common patterns. Experiment with them to see how they can improve your content's clarity and visual appeal.
21
+ <div class="container">
22
+ Redirecting...<br/>
23
+ /custom-containers have moved to /containers now <a href="https://docmd.mgks.dev/content/containers/">Visit New Custom Containers Page</a>
24
+ </div>
@@ -50,6 +50,7 @@ Examples of custom fields you *might* add (these are not built-in features):
50
50
  * `order`: 2 (For custom sorting of pages within a section, if you implement logic for it)
51
51
  * `draft`: true (To mark a page as a draft, if you implement logic to exclude drafts from builds)
52
52
  * `tags`: ["tag1", "tag2"]
53
+ * `permalink`: "https://example.com/your-canonical-url/" (Sets the canonical URL for SEO purposes)
53
54
 
54
55
  ## Example Usage
55
56
 
@@ -72,5 +73,4 @@ In this example:
72
73
  * The `<meta name="description">` will be set.
73
74
  * The `order: 1` field is available if you later want to sort "guides" pages by this value.
74
75
 
75
- Using frontmatter consistently ensures your pages are well-defined, SEO-friendly, and integrate smoothly with `docmd`'s navigation and theming systems.
76
- ```
76
+ Using frontmatter consistently ensures your pages are well-defined, SEO-friendly, and integrate smoothly with `docmd`'s navigation and theming systems.
@@ -8,6 +8,8 @@ components:
8
8
  css: true
9
9
  theme: true
10
10
  scripts: true
11
+ mainScripts: true
12
+ copyCode: true
11
13
  customHead: |
12
14
  <style>
13
15
  body {
@@ -17,7 +17,9 @@ docmd offers a "no-style" page format that gives you maximum flexibility to crea
17
17
 
18
18
  To create a no-style page, add `noStyle: true` to your page's frontmatter. This tells docmd to use a special template that only includes the components you explicitly request.
19
19
 
20
- By default, a no-style page will render just your content with minimal HTML structure. You can then selectively enable specific components via the `components` object in frontmatter.
20
+ By default, a no-style page will render just your content with minimal HTML structure. **All components are disabled by default** and must be explicitly enabled via the `components` object in frontmatter.
21
+
22
+ > **Note:** This behavior changed in v0.2.0. Previously, some components were enabled by default and had to be disabled. Now all components are opt-in only.
21
23
 
22
24
  ## HTML Support
23
25
 
@@ -36,7 +38,7 @@ description: "Welcome to my project"
36
38
  noStyle: true
37
39
  components:
38
40
  meta: true # Include meta tags, title, description
39
- css: false # Don't include default CSS
41
+ # css: false # Not needed - CSS is disabled by default
40
42
  ---
41
43
 
42
44
  <div style="text-align: center; padding: 50px;">
@@ -48,32 +50,35 @@ components:
48
50
 
49
51
  ## Available Components
50
52
 
51
- You can control exactly which components are included in your page by setting them to `true` or `false` in the `components` object:
52
-
53
- | Component | Description | Default |
54
- |-----------|-------------|---------|
55
- | `meta` | Meta tags, title, description | `true` |
56
- | `siteTitle` | Include site title after page title | `true` |
57
- | `favicon` | Include favicon | `true` |
58
- | `css` | Include main CSS | `false` |
59
- | `highlight` | Include syntax highlighting CSS | `false` |
60
- | `theme` | Include theme-specific CSS | `false` |
61
- | `customCss` | Include custom CSS files from config | `false` |
62
- | `pluginStyles` | Include plugin-specific CSS | `false` |
63
- | `pluginHeadScripts` | Include plugin scripts in head | `false` |
64
- | `layout` | Use main content layout (`true`, `'full'`, or `false`) | `false` |
65
- | `sidebar` | Include sidebar | `false` |
66
- | `header` | Include page header | `false` |
67
- | `pageTitle` | Include page title in header | `false` |
68
- | `footer` | Include page footer | `false` |
69
- | `branding` | Include docmd branding in footer | `false` |
70
- | `logo` | Include logo in sidebar | `false` |
71
- | `navigation` | Include navigation in sidebar | `false` |
72
- | `themeToggle` | Include theme toggle button | `false` |
73
- | `toc` | Include table of contents | `false` |
74
- | `scripts` | Include all scripts | `false` |
75
- | `customJs` | Include custom JS files from config | `false` |
76
- | `pluginBodyScripts` | Include plugin scripts at end of body | `false` |
53
+ You can control exactly which components are included in your page by setting them to `true` in the `components` object. **All components are disabled by default** and must be explicitly enabled:
54
+
55
+ | Component | Description | Required Setting |
56
+ |-----------|-------------|------------------|
57
+ | `meta` | Meta tags, title, description | `meta: true` |
58
+ | `siteTitle` | Include site title after page title | `siteTitle: true` |
59
+ | `favicon` | Include favicon | `favicon: true` |
60
+ | `css` | Include main CSS | `css: true` |
61
+ | `highlight` | Include syntax highlighting CSS | `highlight: true` |
62
+ | `theme` | Include theme-specific CSS | `theme: true` |
63
+ | `themeMode` | Include theme mode toggle functionality | `themeMode: true` |
64
+ | `customCss` | Include custom CSS files from config | `customCss: true` |
65
+ | `pluginStyles` | Include plugin-specific CSS | `pluginStyles: true` |
66
+ | `pluginHeadScripts` | Include plugin scripts in head | `pluginHeadScripts: true` |
67
+ | `layout` | Use main content layout (`true`, `'full'`, or `false`) | `layout: true` or `layout: 'full'` |
68
+ | `sidebar` | Include sidebar | `sidebar: true` |
69
+ | `header` | Include page header | `header: true` |
70
+ | `pageTitle` | Include page title in header | `pageTitle: true` |
71
+ | `footer` | Include page footer | `footer: true` |
72
+ | `branding` | Include docmd branding in footer | `branding: true` |
73
+ | `logo` | Include logo in sidebar | `logo: true` |
74
+ | `navigation` | Include navigation in sidebar | `navigation: true` |
75
+ | `themeToggle` | Include theme toggle button | `themeToggle: true` |
76
+ | `toc` | Include table of contents | `toc: true` |
77
+ | `scripts` | Enable script loading (required for other script components) | `scripts: true` |
78
+ | `mainScripts` | Include main JavaScript (copy code, theme toggle, etc.) | `mainScripts: true` |
79
+ | `lightbox` | Include image lightbox functionality | `lightbox: true` |
80
+ | `customJs` | Include custom JS files from config | `customJs: true` |
81
+ | `pluginBodyScripts` | Include plugin scripts at end of body | `pluginBodyScripts: true` |
77
82
 
78
83
  ## Layout Options
79
84
 
@@ -83,6 +88,22 @@ The `components.layout` property has three possible values:
83
88
  - `true`: Use the main content layout with optional header and footer
84
89
  - `'full'`: Same as `true`, a full layout with content area
85
90
 
91
+ ## Script Components
92
+
93
+ Script components work in a hierarchical manner:
94
+
95
+ 1. **`scripts: true`** - Enables script loading (required for all other script components)
96
+ 2. **`mainScripts: true`** - Includes main JavaScript functionality (copy code, theme toggle, etc.)
97
+ 3. **`lightbox: true`** - Includes image lightbox functionality (requires `mainScripts: true`)
98
+
99
+ **Example:**
100
+ ```yaml
101
+ components:
102
+ scripts: true # Enable script loading
103
+ mainScripts: true # Include main JavaScript
104
+ lightbox: true # Include lightbox (requires mainScripts)
105
+ ```
106
+
86
107
  ## Sidebar Option
87
108
 
88
109
  If you set `components.sidebar: true`, the sidebar will be included with optional logo, navigation, and theme toggle button.
@@ -124,12 +145,15 @@ components:
124
145
  favicon: true
125
146
  css: true
126
147
  theme: true
148
+ themeMode: true
127
149
  layout: true
128
150
  header: true
129
151
  pageTitle: true
130
152
  footer: true
131
153
  branding: true
132
154
  scripts: true
155
+ mainScripts: true
156
+ lightbox: true
133
157
  customHead: |
134
158
  <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
135
159
  <style>