@mgks/docmd 0.1.4 → 0.2.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 (43) hide show
  1. package/README.md +2 -4
  2. package/assets/css/welcome.css +62 -374
  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 +31 -2
  10. package/docs/configuration.md +72 -3
  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/frontmatter.md +2 -2
  19. package/docs/index.md +6 -9
  20. package/docs/plugins/seo.md +2 -0
  21. package/docs/theming/available-themes.md +17 -2
  22. package/docs/theming/light-dark-mode.md +12 -3
  23. package/package.json +9 -3
  24. package/src/assets/css/docmd-main.css +934 -573
  25. package/src/assets/css/docmd-theme-retro.css +812 -0
  26. package/src/assets/css/docmd-theme-ruby.css +26 -13
  27. package/src/assets/css/docmd-theme-sky.css +606 -605
  28. package/src/assets/js/docmd-image-lightbox.js +1 -3
  29. package/src/assets/js/docmd-main.js +97 -0
  30. package/src/commands/build.js +1 -1
  31. package/src/commands/init.js +19 -1
  32. package/src/core/file-processor.js +626 -363
  33. package/src/core/html-generator.js +20 -30
  34. package/src/plugins/seo.js +4 -0
  35. package/src/templates/layout.ejs +33 -7
  36. package/assets/images/preview-dark-1.png +0 -0
  37. package/assets/images/preview-dark-2.png +0 -0
  38. package/assets/images/preview-dark-3.png +0 -0
  39. package/assets/images/preview-light-1.png +0 -0
  40. package/assets/images/preview-light-2.png +0 -0
  41. package/assets/images/preview-light-3.png +0 -0
  42. package/docs/content/custom-containers.md +0 -129
  43. package/src/assets/js/docmd-theme-toggle.js +0 -59
package/README.md CHANGED
@@ -70,7 +70,7 @@ Contributions are welcome! Please check our [contributing guidelines](https://do
70
70
 
71
71
  ## License
72
72
 
73
- `docmd` is licensed under the [MIT License](LICENSE).
73
+ `docmd` is licensed under the [MIT License](https://github.com/mgks/docmd/blob/main/LICENSE).
74
74
 
75
75
  ## Support the Project
76
76
 
@@ -80,6 +80,4 @@ If you find `docmd` useful, please consider:
80
80
  - Sharing it with others who might benefit
81
81
  - Reporting issues or submitting pull requests
82
82
 
83
- **[GitHub Sponsors](https://github.com/sponsors/mgks): Become a monthly or one-time GitHub sponsor to support docmd & other projects developed by [me](https://mgks.dev).**
84
-
85
- <br /><img src="https://forthebadge.com/images/badges/built-with-love.svg" alt="Built with Love">
83
+ **[GitHub Sponsors](https://github.com/sponsors/mgks): Become a monthly or one-time GitHub sponsor to support docmd & other projects developed by [me](https://mgks.dev).**
@@ -1,378 +1,66 @@
1
- :root {
2
- --primary-color: #047bf1;
3
- --primary-hover: #026ed9;
4
- --text-color: #333;
5
- --text-light: #666;
6
- --bg-color: #fff;
7
- --bg-secondary: #f8f9fa;
8
- --border-color: #eaeaea;
9
- --shadow-color: rgba(0, 0, 0, 0.08);
10
- --container-padding: 5rem;
11
- }
12
-
13
- @media (prefers-color-scheme: dark) {
14
- :root {
15
- --primary-color: #047bf1;
16
- --primary-hover: #026ed9;
17
- --text-color: #e0e0e0;
18
- --text-light: #aaa;
19
- --bg-color: #121212;
20
- --bg-secondary: #1e1e1e;
21
- --border-color: #333;
22
- --shadow-color: rgba(0, 0, 0, 0.3);
23
- }
24
- }
25
-
26
- [data-theme="light"] {
27
- --primary-color: #047bf1;
28
- --primary-hover: #026ed9;
29
- --text-color: #333;
30
- --text-light: #666;
31
- --bg-color: #fff;
32
- --bg-secondary: #f8f9fa;
33
- --border-color: #eaeaea;
34
- --shadow-color: rgba(0, 0, 0, 0.35);
35
-
1
+ :root{--primary-color:#047bf1;--primary-hover:#026ed9;--text-color:#333;--text-light:#666;--bg-color:#fff;--bg-secondary:#f8f9fa;--border-color:#eaeaea;--shadow-color:#00000014;--container-padding:5rem}
2
+ @media (prefers-color-scheme: dark) {
3
+ :root{--primary-color:#047bf1;--primary-hover:#026ed9;--text-color:#e0e0e0;--text-light:#aaa;--bg-color:#121212;--bg-secondary:#1e1e1e;--border-color:#333;--shadow-color:#0000004d}
36
4
  }
37
-
38
- [data-theme="dark"] {
39
- --primary-color: #1955b6;
40
- --primary-hover: #084dbd;
41
- --text-color: #e0e0e0;
42
- --text-light: #aaa;
43
- --bg-color: #121212;
44
- --bg-secondary: #1e1e1e;
45
- --border-color: #333;
46
- --shadow-color: rgba(0, 0, 0, 0.87);
47
-
5
+ [data-theme="light"]{--primary-color:#047bf1;--primary-hover:#026ed9;--text-color:#333;--text-light:#666;--bg-color:#fff;--bg-secondary:#f8f9fa;--border-color:#eaeaea;--shadow-color:#00000059}
6
+ [data-theme="dark"]{--primary-color:#1955b6;--primary-hover:#084dbd;--text-color:#e0e0e0;--text-light:#aaa;--bg-color:#121212;--bg-secondary:#1e1e1e;--border-color:#333;--shadow-color:#000000de}
7
+ *{margin:0;padding:0;box-sizing:border-box}
8
+ body{font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;line-height:1.5;color:var(--text-color);background-color:var(--bg-color);height:100vh;display:flex;overflow:hidden}
9
+ .landing-container{display:flex;width:100%;height:100%;padding:0 var(--container-padding);max-width:1600px;margin:0 auto}
10
+ .content-side{flex:1;padding:3rem 2rem 3rem 0;display:flex;flex-direction:column;justify-content:center}
11
+ .preview-side{flex:1;display:flex;align-items:center;justify-content:flex-start;position:relative;overflow:visible}
12
+ .header-top{position:absolute;top:2rem;right:3rem;z-index:100}
13
+ .theme-toggle{background:var(--bg-secondary);border:1px solid var(--border-color);color:var(--text-color);width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}
14
+ .theme-toggle:hover{background:var(--border-color)}
15
+ .logo{margin-bottom:1.5rem;display:flex;align-items:center}
16
+ .logo svg{height:48px;width:auto}
17
+ .logo-text{font-family:'PT Mono',monospace;font-weight:700;font-size:2em;margin-left:.25em}
18
+ h1{font-size:3rem;font-weight:700;margin-bottom:1rem;letter-spacing:-.02em}
19
+ .tagline{font-size:1.25rem;color:var(--text-light);margin-bottom:2rem;font-weight:400}
20
+ .features{display:grid;grid-template-columns:repeat(2,1fr);gap:1.5rem;margin-bottom:2rem}
21
+ .feature{display:flex;align-items:flex-start;gap:.75rem}
22
+ .feature-icon{background-color:var(--primary-color);color:#fff;width:32px;height:32px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
23
+ .feature-text{font-size:.9rem}
24
+ .feature-text strong{display:block;margin-bottom:.25rem}
25
+ .buttons{display:flex;gap:1rem;margin-bottom:2rem}
26
+ .btn{display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border-radius:8px;font-weight:600;font-size:1rem;text-decoration:none;transition:all .2s ease}
27
+ .btn-primary{background-color:var(--primary-color);color:#fff;border:none}
28
+ .btn-primary:hover{background-color:var(--primary-hover)}
29
+ .btn-secondary{background-color:var(--bg-secondary);color:var(--text-color);border:1px solid var(--border-color)}
30
+ .btn-secondary:hover{background-color:var(--border-color)}
31
+ .social-links{display:flex;gap:1rem;padding:0 .25em}
32
+ .social-link{color:var(--text-light);transition:color .2s ease}
33
+ .social-link:hover{color:var(--primary-color)}
34
+ .preview-stack{position:relative;width:100%;height:400px;transform:translateX(15%);perspective:1000px}
35
+ .preview-image{position:absolute;width:100%;max-width:700px;height:400px;border-radius:20px;box-shadow:0 25px 50px -12px var(--shadow-color);transition:all .3s ease;overflow:hidden}
36
+ .preview-image img{width:100%;height:100%;object-fit:cover;object-position:left top;border-radius:8px;pointer-events:none}
37
+ .preview-image.top{z-index:3;transform:rotate(3deg) translateY(-10%) translateX(7%)}
38
+ .preview-image.middle{z-index:2;transform:rotate(-3deg) translateY(1%) translateX(-2%)}
39
+ .preview-image.bottom{z-index:1;transform:rotate(-8deg) translateY(10%) translateX(-10%)}
40
+ body[data-theme="light"] .preview-image .light-img{display:block}
41
+ body[data-theme="light"] .preview-image .dark-img{display:none}
42
+ body[data-theme="dark"] .preview-image .light-img{display:none}
43
+ body[data-theme="dark"] .preview-image .dark-img{display:block}
44
+ @media (max-width: 1400px) {
45
+ :root{--container-padding:3rem}
46
+ .preview-stack{transform:translateX(15%)}
48
47
  }
49
-
50
- * {
51
- margin: 0;
52
- padding: 0;
53
- box-sizing: border-box;
54
- }
55
-
56
- body {
57
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
58
- line-height: 1.5;
59
- color: var(--text-color);
60
- background-color: var(--bg-color);
61
- height: 100vh;
62
- display: flex;
63
- overflow: hidden;
64
- }
65
-
66
- .landing-container {
67
- display: flex;
68
- width: 100%;
69
- height: 100%;
70
- padding: 0 var(--container-padding);
71
- max-width: 1600px;
72
- margin: 0 auto;
73
- }
74
-
75
- .content-side {
76
- flex: 1;
77
- padding: 3rem 2rem 3rem 0;
78
- display: flex;
79
- flex-direction: column;
80
- justify-content: center;
81
-
48
+ @media (max-width: 1200px) {
49
+ :root{--container-padding:2rem}
50
+ .preview-side{display:none}
51
+ .content-side{max-width:100%;padding:3rem 0}
52
+ .header-top{right:2rem}
82
53
  }
83
-
84
- .preview-side {
85
- flex: 1;
86
- display: flex;
87
- align-items: center;
88
- justify-content: flex-start;
89
- position: relative;
90
- overflow: visible;
91
- }
92
-
93
- .header-top {
94
- position: absolute;
95
- top: 2rem;
96
- right: 3rem;
97
- z-index: 100;
98
-
54
+ @media (max-width: 768px) {
55
+ :root{--container-padding:1.5rem}
56
+ body{overflow:auto}
57
+ .content-side{padding:2rem 0}
58
+ h1{font-size:2.5rem}
59
+ .features{grid-template-columns:1fr}
60
+ .buttons{flex-direction:column}
61
+ .header-top{padding:1rem 0;text-align:center;right:1rem}
62
+ h1{font-size:2.5rem}
63
+ .tagline{font-size:1em;font-weight:500}
64
+ .landing-container{padding:1rem;flex-direction:column}
99
65
  }
100
-
101
- .theme-toggle {
102
- background: var(--bg-secondary);
103
- border: 1px solid var(--border-color);
104
- color: var(--text-color);
105
- width: 40px;
106
- height: 40px;
107
- border-radius: 50%;
108
- display: flex;
109
- align-items: center;
110
- justify-content: center;
111
- cursor: pointer;
112
- transition: all 0.2s ease;
113
- }
114
-
115
- .theme-toggle:hover {
116
- background: var(--border-color);
117
- }
118
-
119
- .logo {
120
- margin-bottom: 1.5rem;
121
- display: flex;
122
- align-items: center;
123
- }
124
-
125
- .logo svg {
126
- height: 48px;
127
- width: auto;
128
- }
129
-
130
- .logo-text {
131
- font-family: 'PT Mono', monospace;
132
- font-weight: 700;
133
- font-size: 2em;
134
- margin-left: .25em;
135
-
136
- }
137
-
138
- h1 {
139
- font-size: 3rem;
140
- font-weight: 700;
141
- margin-bottom: 1rem;
142
- letter-spacing: -0.02em;
143
- }
144
-
145
- .tagline {
146
- font-size: 1.25rem;
147
- color: var(--text-light);
148
- margin-bottom: 2rem;
149
- font-weight: 400;
150
- }
151
-
152
- .features {
153
- display: grid;
154
- grid-template-columns: repeat(2, 1fr);
155
- gap: 1.5rem;
156
- margin-bottom: 2rem;
157
- }
158
-
159
- .feature {
160
- display: flex;
161
- align-items: flex-start;
162
- gap: 0.75rem;
163
- }
164
-
165
- .feature-icon {
166
- background-color: var(--primary-color);
167
- color: white;
168
- width: 32px;
169
- height: 32px;
170
- border-radius: 6px;
171
- display: flex;
172
- align-items: center;
173
- justify-content: center;
174
- flex-shrink: 0;
175
- }
176
-
177
- .feature-text {
178
- font-size: 0.9rem;
179
- }
180
-
181
- .feature-text strong {
182
- display: block;
183
- margin-bottom: 0.25rem;
184
- }
185
-
186
- .buttons {
187
- display: flex;
188
- gap: 1rem;
189
- margin-bottom: 2rem;
190
- }
191
-
192
- .btn {
193
- display: inline-flex;
194
- align-items: center;
195
- gap: 0.5rem;
196
- padding: 0.75rem 1.5rem;
197
- border-radius: 8px;
198
- font-weight: 600;
199
- font-size: 1rem;
200
- text-decoration: none;
201
- transition: all 0.2s ease;
202
- }
203
-
204
- .btn-primary {
205
- background-color: var(--primary-color);
206
- color: white;
207
- border: none;
208
- }
209
-
210
- .btn-primary:hover {
211
- background-color: var(--primary-hover);
212
- }
213
-
214
- .btn-secondary {
215
- background-color: var(--bg-secondary);
216
- color: var(--text-color);
217
- border: 1px solid var(--border-color);
218
- }
219
-
220
- .btn-secondary:hover {
221
- background-color: var(--border-color);
222
- }
223
-
224
- .social-links {
225
- display: flex;
226
- gap: 1rem;
227
- padding: 0 .25em;
228
-
229
- }
230
-
231
- .social-link {
232
- color: var(--text-light);
233
- transition: color 0.2s ease;
234
- }
235
-
236
- .social-link:hover {
237
- color: var(--primary-color);
238
- }
239
-
240
- .preview-stack {
241
- position: relative;
242
- width: 100%;
243
- height: 400px;
244
- transform: translateX(15%);
245
- perspective: 1000px;
246
-
247
- }
248
-
249
- .preview-image {
250
- position: absolute;
251
- width: 100%;
252
- max-width: 700px;
253
- height: 400px;
254
- border-radius: 20px;
255
- box-shadow: 0 25px 50px -12px var(--shadow-color);
256
- transition: all 0.3s ease;
257
- overflow: hidden;
258
-
259
- }
260
-
261
- .preview-image img {
262
- width: 100%;
263
- height: 100%;
264
- object-fit: cover;
265
- object-position: left top;
266
- border-radius: 8px;
267
- pointer-events: none;
268
- }
269
-
270
- .preview-image.top {
271
- z-index: 3;
272
- transform: rotate(3deg) translateY(-10%) translateX(7%);
273
-
274
- }
275
-
276
- .preview-image.middle {
277
- z-index: 2;
278
- transform: rotate(-3deg) translateY(1%) translateX(-2%);
279
-
280
- }
281
-
282
- .preview-image.bottom {
283
- z-index: 1;
284
- transform: rotate(-8deg) translateY(10%) translateX(-10%);
285
-
286
- }
287
-
288
- body[data-theme="light"] .preview-image .light-img {
289
- display: block;
290
- }
291
-
292
- body[data-theme="light"] .preview-image .dark-img {
293
- display: none;
294
- }
295
-
296
- body[data-theme="dark"] .preview-image .light-img {
297
- display: none;
298
-
299
- }
300
-
301
- body[data-theme="dark"] .preview-image .dark-img {
302
- display: block;
303
- }
304
-
305
- @media (max-width: 1400px) {
306
- :root {
307
- --container-padding: 3rem;
308
- }
309
-
310
- .preview-stack {
311
- transform: translateX(15%);
312
- }
313
- }
314
-
315
- @media (max-width: 1200px) {
316
- :root {
317
- --container-padding: 2rem;
318
- }
319
-
320
- .preview-side {
321
- display: none;
322
- }
323
-
324
- .content-side {
325
- max-width: 100%;
326
- padding: 3rem 0;
327
- }
328
-
329
- .header-top {
330
- right: 2rem;
331
- }
332
- }
333
-
334
- @media (max-width: 768px) {
335
- :root {
336
- --container-padding: 1.5rem;
337
- }
338
- body {
339
- overflow: auto;
340
- }
341
-
342
- .content-side {
343
- padding: 2rem 0;
344
- }
345
-
346
- h1 {
347
- font-size: 2.5rem;
348
- }
349
-
350
- .features {
351
- grid-template-columns: 1fr;
352
- }
353
-
354
- .buttons {
355
- flex-direction: column;
356
- }
357
-
358
- .header-top {
359
- padding: 1rem 0;
360
- text-align: center;
361
- right: 1rem;
362
- }
363
- h1 {
364
- font-size: 2.5rem;
365
- }
366
- .tagline{
367
- font-size: 1em;
368
- font-weight: 500;
369
- }
370
- .landing-container {
371
- padding: 1rem;
372
- flex-direction: column;
373
- }
374
- }
375
- .social-links .lucide-heart-handshake {
376
- color: rgb(205, 39, 39);
377
-
378
- }
66
+ .social-links .lucide-heart-handshake{color:#cd2727}
package/config.js CHANGED
@@ -18,15 +18,21 @@ module.exports = {
18
18
  srcDir: 'docs', // Source directory for Markdown files
19
19
  outputDir: 'site', // Directory for generated static site
20
20
 
21
+ // Sidebar Configuration
22
+ sidebar: {
23
+ collapsible: true, // or false to disable
24
+ defaultCollapsed: false, // or true to start collapsed
25
+ },
26
+
21
27
  // Theme Configuration
22
28
  theme: {
23
29
  name: 'sky', // Themes: 'default', 'sky'
24
30
  defaultMode: 'light', // Initial color mode: 'light' or 'dark'
25
31
  enableModeToggle: true, // Show UI button to toggle light/dark modes
32
+ positionMode: 'top', // 'top' or 'bottom' for the theme toggle
26
33
  customCss: [ // Array of paths to custom CSS files
27
34
  // '/assets/css/custom.css', // Custom TOC styles
28
35
  ],
29
- // options: { /* Future: theme-specific options */ }
30
36
  },
31
37
 
32
38
  // Custom JavaScript Files
@@ -34,6 +40,9 @@ module.exports = {
34
40
  '/assets/js/docmd-image-lightbox.js', // Image lightbox functionality
35
41
  ],
36
42
 
43
+ // Content Processing
44
+ autoTitleFromH1: true, // Set to true to automatically use the first H1 as page title
45
+
37
46
  // Plugins Configuration (Object format)
38
47
  // Plugins are configured here. docmd will look for these keys.
39
48
  plugins: {
@@ -79,6 +88,7 @@ module.exports = {
79
88
  navigation: [
80
89
  { title: 'Welcome', path: '/', icon: 'feather' },
81
90
  { title: 'Overview', path: '/overview', icon: 'home' },
91
+ // { title: 'Support the Project', path: 'https://github.com/sponsors/mgks', icon: 'heart', external: true },
82
92
  {
83
93
  title: 'Getting Started',
84
94
  icon: 'rocket',
@@ -96,7 +106,19 @@ module.exports = {
96
106
  { title: 'Frontmatter', path: '/content/frontmatter', icon: 'file-text' },
97
107
  { title: 'Markdown Syntax', path: '/content/markdown-syntax', icon: 'code-2' },
98
108
  { title: 'Images', path: '/content/images', icon: 'image' },
99
- { title: 'Custom Containers', path: '/content/custom-containers', icon: 'box' },
109
+ {
110
+ title: 'Custom Containers',
111
+ path: '/content/containers/',
112
+ icon: 'box',
113
+ children: [
114
+ { title: 'Callouts', path: '/content/containers/callouts', icon: 'megaphone' },
115
+ { title: 'Cards', path: '/content/containers/cards', icon: 'panel-top' },
116
+ { title: 'Steps', path: '/content/containers/steps', icon: 'list-ordered' },
117
+ { title: 'Tabs', path: '/content/containers/tabs', icon: 'columns-3' },
118
+ { title: 'Buttons', path: '/content/containers/buttons', icon: 'mouse-pointer-click' },
119
+ { title: 'Nested Containers', path: '/content/containers/nested-containers', icon: 'folder-tree' },
120
+ ]
121
+ },
100
122
  { title: 'No-Style Pages', path: '/content/no-style-pages', icon: 'layout' },
101
123
  { title: 'No-Style Example', path: '/content/no-style-example', icon: 'sparkles' },
102
124
  ],
@@ -132,6 +154,13 @@ module.exports = {
132
154
  { title: 'Issues', path: 'https://github.com/mgks/docmd/issues', icon: 'badge-alert', external: true }
133
155
  ],
134
156
 
157
+ // Sponsor Ribbon Configuration
158
+ sponsor: {
159
+ enabled: true, // Enable/disable the sponsor ribbon
160
+ title: 'Support docmd', // Text to display on the ribbon
161
+ link: 'https://github.com/sponsors/mgks', // URL for the sponsor link
162
+ },
163
+
135
164
  // Footer Configuration
136
165
  // Markdown is supported here.
137
166
  footer: '© ' + new Date().getFullYear() + ' Project docmd.',
@@ -23,10 +23,16 @@ module.exports = {
23
23
  srcDir: 'docs',
24
24
  outputDir: 'site',
25
25
 
26
+ sidebar: {
27
+ collapsible: true,
28
+ defaultCollapsed: false,
29
+ },
30
+
26
31
  theme: {
27
- name: 'sky', // Name of the built-in theme to use (e.g., 'sky', 'default')
28
- defaultMode: 'light', // 'light' or 'dark'
29
- enableModeToggle: true, // Show UI button to toggle light/dark modes
32
+ name: 'sky',
33
+ defaultMode: 'light',
34
+ enableModeToggle: true,
35
+ positionMode: 'bottom', // 'top' or 'bottom'
30
36
  customCss: [ // Array of paths to your custom CSS files
31
37
  // '/css/override-styles.css', // Paths are relative to the outputDir root
32
38
  ],
@@ -37,6 +43,14 @@ module.exports = {
37
43
  // '/js/extra-functionality.js', // Loaded at the end of the body
38
44
  ],
39
45
 
46
+ autoTitleFromH1: true,
47
+
48
+ sponsor: {
49
+ enabled: true,
50
+ title: 'Sponsor the Project',
51
+ link: 'https://github.com/sponsors/mgks',
52
+ },
53
+
40
54
  plugins: {
41
55
  // SEO Plugin Configuration
42
56
  seo: {
@@ -110,6 +124,37 @@ module.exports = {
110
124
  * **Default:** `'site'`
111
125
  * **Description:** Directory where the static site will be generated.
112
126
 
127
+ ### `autoTitleFromH1`
128
+ * **Type:** `Boolean`
129
+ * **Default:** `true`
130
+ * **Description:** If `true`, `docmd` will automatically use the content of the first H1 tag (`# Title`) as the page title if no `title` is specified in the frontmatter. If set to `false` and a page has no `title` in its frontmatter, the page header will be hidden.
131
+ * **Example:**
132
+ ```javascript
133
+ // With autoTitleFromH1: true (default)
134
+ // Markdown file with: # My Page Title
135
+ // Will automatically set the page title to "My Page Title"
136
+
137
+ // With autoTitleFromH1: false
138
+ // You must explicitly set title in frontmatter:
139
+ // ---
140
+ // title: "My Page Title"
141
+ // ---
142
+ ```
143
+
144
+ ## `sidebar` (Object)
145
+
146
+ Configures the behavior of the sidebar.
147
+
148
+ ### `sidebar.collapsible`
149
+ * **Type:** `Boolean`
150
+ * **Default:** `false`
151
+ * **Description:** If `true`, a toggle button is added to the header, allowing users to show or hide the sidebar. The user's preference is saved in `localStorage`.
152
+
153
+ ### `sidebar.defaultCollapsed`
154
+ * **Type:** `Boolean`
155
+ * **Default:** `false`
156
+ * **Description:** If `sidebar.collapsible` is `true`, this option sets the default state of the sidebar to collapsed. A user's saved preference will override this.
157
+
113
158
  ## `theme` (Object)
114
159
 
115
160
  Configures the visual theme of your site.
@@ -131,6 +176,13 @@ Configures the visual theme of your site.
131
176
  * **Default:** `true` (assuming it's now a core feature)
132
177
  * **Description:** If `true`, a UI toggle button will be displayed allowing users to switch between light and dark modes. Their preference is typically saved in `localStorage`.
133
178
 
179
+ ### `theme.positionMode`
180
+ * **Type:** `String`
181
+ * **Default:** `'bottom'`
182
+ * **Values:** `'top'` or `'bottom'`
183
+ * **Description:** Sets the position of the light/dark mode toggle button. `'top'` places it in the page header (top right), while `'bottom'` places it at the bottom of the sidebar.
184
+ * **Example:** `positionMode: 'top'` - Useful for sites where you want the theme toggle to be more prominent and easily accessible.
185
+
134
186
  ### `theme.customCss`
135
187
  * **Type:** `Array` of `String`
136
188
  * **Default:** `[]` (empty array)
@@ -172,6 +224,23 @@ Configures the visual theme of your site.
172
224
  ## `footer` (String, Optional)
173
225
  * **Description:** Custom footer text (Markdown supported).
174
226
 
227
+ ## `sponsor` (Object, Optional)
228
+ * **Type:** `Object`
229
+ * **Description:** Configures a sponsor ribbon that appears in the bottom-right corner of every page.
230
+ * **Properties:**
231
+ * `enabled` (Boolean, Optional): Whether to show the sponsor ribbon. Defaults to `true` if the sponsor object is provided.
232
+ * `title` (String, Optional): Text to display on the ribbon. Defaults to `'Sponsor the Project'`.
233
+ * `link` (String, Required if enabled): URL for the sponsor link. Should open in a new tab.
234
+ * **Example:**
235
+ ```javascript
236
+ sponsor: {
237
+ enabled: true,
238
+ title: 'Sponsor the Project',
239
+ link: 'https://github.com/sponsors/mgks'
240
+ }
241
+ ```
242
+ * **Note:** The ribbon is positioned fixed in the bottom-right corner and includes a heart icon with a subtle animation.
243
+
175
244
  ## `favicon` (String, Optional)
176
245
  * **Description:** Path to your favicon file, relative to `outputDir` root.
177
246