docula 0.31.2 → 0.41.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.
@@ -193,6 +193,140 @@ hr {
193
193
  text-decoration: underline;
194
194
  }
195
195
 
196
+ /* Changelog */
197
+ .changelog-entry {
198
+ overflow: hidden;
199
+ width: 100%;
200
+ line-break: anywhere;
201
+ margin-top: 2rem;
202
+ padding-bottom: 2rem;
203
+ border-bottom: 1px solid var(--border);
204
+ color: var(--color-text);
205
+ }
206
+
207
+ .changelog-entry:last-child {
208
+ border-bottom: none;
209
+ }
210
+
211
+ .changelog-entry-header {
212
+ display: flex;
213
+ align-items: center;
214
+ gap: 0.75rem;
215
+ margin-bottom: 0.5rem;
216
+ flex-wrap: wrap;
217
+ }
218
+
219
+ .changelog-entry-title {
220
+ font-size: 1.375rem;
221
+ color: var(--color-primary);
222
+ font-weight: 700;
223
+ transition: color .3s;
224
+ }
225
+
226
+ a.changelog-entry-title:hover {
227
+ color: var(--color-secondary-dark);
228
+ }
229
+
230
+ h1.changelog-entry-title {
231
+ font-size: 1.875rem;
232
+ margin: 0;
233
+ }
234
+
235
+ .changelog-entry-date {
236
+ font-size: 0.75rem;
237
+ display: block;
238
+ margin-bottom: 1rem;
239
+ }
240
+
241
+ .changelog-tag {
242
+ display: inline-block;
243
+ padding: 0.2rem 0.6rem;
244
+ border-radius: 1rem;
245
+ font-size: 0.7rem;
246
+ font-weight: 600;
247
+ text-transform: uppercase;
248
+ letter-spacing: 0.025em;
249
+ }
250
+
251
+ .changelog-tag-added {
252
+ background-color: rgba(140, 220, 0, 0.15);
253
+ color: #4a7a00;
254
+ }
255
+
256
+ .changelog-tag-improved {
257
+ background-color: rgba(59, 130, 246, 0.15);
258
+ color: #1d4ed8;
259
+ }
260
+
261
+ .changelog-tag-fixed {
262
+ background-color: rgba(245, 158, 11, 0.15);
263
+ color: #b45309;
264
+ }
265
+
266
+ .changelog-tag-removed {
267
+ background-color: rgba(239, 68, 68, 0.15);
268
+ color: #b91c1c;
269
+ }
270
+
271
+ .changelog-tag-deprecated {
272
+ background-color: rgba(156, 163, 175, 0.15);
273
+ color: #4b5563;
274
+ }
275
+
276
+ .changelog-tag-security {
277
+ background-color: rgba(168, 85, 247, 0.15);
278
+ color: #6d28d9;
279
+ }
280
+
281
+ .changelog-entry-body p {
282
+ margin: 0.5rem 0;
283
+ }
284
+
285
+ .changelog-entry-body pre {
286
+ margin-bottom: 2rem;
287
+ }
288
+
289
+ .changelog-entry-body h1 {
290
+ font-size: 1.375rem;
291
+ margin-bottom: 1rem;
292
+ }
293
+
294
+ .changelog-entry-body h2 {
295
+ font-size: 1.125rem;
296
+ margin-top: 1.75rem;
297
+ margin-bottom: 1rem;
298
+ }
299
+
300
+ .changelog-entry-body ul {
301
+ padding-left: 1rem;
302
+ }
303
+
304
+ .changelog-entry-body ul > li {
305
+ margin-bottom: 0.75rem;
306
+ }
307
+
308
+ .changelog-entry-body ul > li a {
309
+ text-decoration: underline;
310
+ }
311
+
312
+ .changelog-entry-nav {
313
+ margin-bottom: 1.5rem;
314
+ }
315
+
316
+ .changelog-entry-nav a {
317
+ color: var(--color-primary);
318
+ font-size: 0.875rem;
319
+ transition: color .3s;
320
+ }
321
+
322
+ .changelog-entry-nav a:hover {
323
+ color: var(--color-secondary-dark);
324
+ }
325
+
326
+ .changelog-entry-single {
327
+ border-bottom: none;
328
+ }
329
+
196
330
  .github-corner {
197
331
  fill: var(--color-primary) !important;
198
332
  }
@@ -378,6 +512,9 @@ footer img {
378
512
  .release {
379
513
  margin-bottom: 4rem;
380
514
  }
515
+ .changelog-entry {
516
+ margin-bottom: 2rem;
517
+ }
381
518
  .versions-container {
382
519
  margin-bottom: 4.5rem;
383
520
  }
@@ -417,6 +554,9 @@ footer img {
417
554
  .content h1 {
418
555
  font-size: 1.9rem;
419
556
  }
557
+ h1.changelog-entry-title {
558
+ font-size: 2.25rem;
559
+ }
420
560
  .content > ul, .content > ol {
421
561
  padding-left: 2rem;
422
562
  }
@@ -25,6 +25,48 @@
25
25
  font-weight: 600;
26
26
  }
27
27
 
28
+ /* Announcement */
29
+ .announcement {
30
+ max-width: 90%;
31
+ margin: 0 auto 2rem;
32
+ padding: 1rem 1.5rem;
33
+ background-color: var(--sidebar-background);
34
+ border: 1px solid var(--border);
35
+ border-left: 4px solid var(--color-secondary);
36
+ border-radius: 0.5rem;
37
+ text-align: left;
38
+ }
39
+
40
+ .announcement p {
41
+ margin: 0;
42
+ line-height: 1.6;
43
+ }
44
+
45
+ .announcement p + p {
46
+ margin-top: 0.5rem;
47
+ }
48
+
49
+ .announcement a {
50
+ color: var(--color-primary);
51
+ text-decoration: underline;
52
+ font-weight: 500;
53
+ }
54
+
55
+ .announcement a:hover {
56
+ color: var(--color-secondary-dark);
57
+ }
58
+
59
+ .announcement strong {
60
+ color: var(--color-secondary-dark);
61
+ }
62
+
63
+ .announcement code {
64
+ background-color: var(--code);
65
+ padding: 0.125rem 0.375rem;
66
+ border-radius: 0.25rem;
67
+ font-size: 0.875em;
68
+ }
69
+
28
70
  /* Docs */
29
71
  .nav {
30
72
  padding-left: 1rem;
@@ -199,10 +241,6 @@ details > summary {
199
241
  margin-right: 2rem
200
242
  }
201
243
 
202
- .main-toc {
203
- padding-bottom: 1.5rem;
204
- }
205
-
206
244
  .toc {
207
245
  font-size: 0.875rem;
208
246
  }
@@ -245,18 +283,6 @@ details > summary {
245
283
  text-decoration: none;
246
284
  }
247
285
 
248
- .main-toc ul > li > a::after {
249
- position: absolute;
250
- right: 0;
251
- content: '';
252
- display: inline-block;
253
- width: 0.25rem;
254
- height: 0.25rem;
255
- border-right: 1px solid var(--color-primary);
256
- border-bottom: 1px solid var(--color-primary);
257
- transform: rotate(-45deg);
258
- }
259
-
260
286
  .fixed-toc {
261
287
  display: none;
262
288
  position: fixed;
@@ -2,16 +2,22 @@
2
2
  <div class="main-content">
3
3
  <article class="content">
4
4
  <h1>{{title}}</h1>
5
- <div class="toc main-toc">
6
- {{tableOfContents}}
7
- </div>
8
5
  {{generatedHtml}}
9
6
  </article>
10
7
  <div class="fixed-toc-container">
11
8
  <div class="toc fixed-toc" id="fixed-toc">
12
- {{tableOfContents}}
13
9
  </div>
14
10
  </div>
15
11
  </div>
16
12
 
17
- </div>
13
+ </div>
14
+ <script>
15
+ const tocHeading = document.getElementById('table-of-contents');
16
+ if (tocHeading) {
17
+ const tocList = tocHeading.nextElementSibling;
18
+ const fixedToc = document.getElementById('fixed-toc');
19
+ if (tocList && tocList.tagName === 'UL' && fixedToc) {
20
+ fixedToc.innerHTML = tocList.outerHTML;
21
+ }
22
+ }
23
+ </script>
@@ -3,5 +3,10 @@
3
3
  <div class="hero-container">
4
4
  <h1>{{ siteDescription }}</h1>
5
5
  </div>
6
+ {{#if announcement}}
7
+ <div class="announcement">
8
+ {{{announcement}}}
9
+ </div>
10
+ {{/if}}
6
11
  <a href="/docs" class="home-docs-button">Documentation</a>
7
12
  </section>
@@ -1,3 +1,8 @@
1
1
  <header class="home-hero">
2
2
  <img src="/logo.svg" alt="logo" />
3
+ {{#if announcement}}
4
+ <div class="announcement">
5
+ {{{announcement}}}
6
+ </div>
7
+ {{/if}}
3
8
  </header>
package/dist/docula.d.ts DELETED
@@ -1,130 +0,0 @@
1
- import http from 'node:http';
2
- export { Writr } from 'writr';
3
-
4
- type DoculaSection = {
5
- name: string;
6
- order?: number;
7
- path: string;
8
- children?: DoculaSection[];
9
- };
10
-
11
- declare class DoculaOptions {
12
- /**
13
- * Path to the template directory
14
- */
15
- templatePath: string;
16
- /**
17
- * Path to the output directory
18
- */
19
- outputPath: string;
20
- /**
21
- * Path to the site directory
22
- */
23
- sitePath: string;
24
- /**
25
- * Path to the github repository
26
- */
27
- githubPath: string;
28
- /**
29
- * Site title
30
- */
31
- siteTitle: string;
32
- /**
33
- * Site description
34
- */
35
- siteDescription: string;
36
- /**
37
- * Site URL
38
- */
39
- siteUrl: string;
40
- /**
41
- * Port to run the server
42
- */
43
- port: number;
44
- /**
45
- * Single page website
46
- */
47
- singlePage: boolean;
48
- /**
49
- * Sections
50
- */
51
- sections?: DoculaSection[];
52
- constructor(options?: Record<string, unknown>);
53
- parseOptions(options: Record<string, any>): void;
54
- }
55
-
56
- declare class Docula {
57
- private _options;
58
- private readonly _console;
59
- private _configFileModule;
60
- private _server;
61
- /**
62
- * Initialize the Docula class
63
- * @param {DoculaOptions} options
64
- * @returns {void}
65
- * @constructor
66
- */
67
- constructor(options?: DoculaOptions);
68
- /**
69
- * Get the options
70
- * @returns {DoculaOptions}
71
- */
72
- get options(): DoculaOptions;
73
- /**
74
- * Set the options
75
- * @param {DoculaOptions} value
76
- */
77
- set options(value: DoculaOptions);
78
- /**
79
- * The http server used to serve the site
80
- * @returns {http.Server | undefined}
81
- */
82
- get server(): http.Server | undefined;
83
- /**
84
- * The config file module. This is the module that is loaded from the docula.config.mjs file
85
- * @returns {any}
86
- */
87
- get configFileModule(): any;
88
- /**
89
- * Check for updates
90
- * @returns {void}
91
- */
92
- checkForUpdates(): void;
93
- /**
94
- * Is the execution process that runs the docula command
95
- * @param {NodeJS.Process} process
96
- * @returns {Promise<void>}
97
- */
98
- execute(process: NodeJS.Process): Promise<void>;
99
- /**
100
- * Checks if the site is a single page website
101
- * @param {string} sitePath
102
- * @returns {boolean}
103
- */
104
- isSinglePageWebsite(sitePath: string): boolean;
105
- /**
106
- * Generate the init files
107
- * @param {string} sitePath
108
- * @returns {void}
109
- */
110
- generateInit(sitePath: string): void;
111
- /**
112
- * Get the version of the package
113
- * @returns {string}
114
- */
115
- getVersion(): string;
116
- /**
117
- * Load the config file
118
- * @param {string} sitePath
119
- * @returns {Promise<void>}
120
- */
121
- loadConfigFile(sitePath: string): Promise<void>;
122
- /**
123
- * Serve the site based on the options (port and output path)
124
- * @param {DoculaOptions} options
125
- * @returns {Promise<void>}
126
- */
127
- serve(options: DoculaOptions): Promise<http.Server>;
128
- }
129
-
130
- export { Docula as default };