docula 0.40.0 → 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.
- package/README.md +89 -0
- package/package.json +12 -11
- package/template/api.hbs +28 -0
- package/template/changelog-entry.hbs +79 -0
- package/template/changelog.hbs +81 -0
- package/template/css/base.css +140 -0
- package/template/css/multipage.css +0 -16
- package/template/includes/multipage/doc.hbs +11 -5
- package/dist/docula.d.ts +0 -132
- package/dist/docula.js +0 -1048
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
- [Building Multiple Pages](#building-multiple-pages)
|
|
18
18
|
- [Public Folder](#public-folder)
|
|
19
19
|
- [Announcements](#announcements)
|
|
20
|
+
- [Changelog](#changelog)
|
|
20
21
|
- [Alert, Info, Warn Styling](#alert-info-warn-styling)
|
|
21
22
|
- [Using a Github Token](#using-a-github-token)
|
|
22
23
|
- [Helpers](#helpers)
|
|
@@ -272,6 +273,94 @@ You can customize the appearance by overriding the `.announcement` class in your
|
|
|
272
273
|
|
|
273
274
|
Simply delete the `announcement.md` file when you no longer need the announcement. The home page will automatically return to its normal layout.
|
|
274
275
|
|
|
276
|
+
# Changelog
|
|
277
|
+
|
|
278
|
+
Docula can generate a changelog section for your site from markdown files. This is useful for documenting release notes, updates, and changes to your project in a structured, browsable format.
|
|
279
|
+
|
|
280
|
+
## Setup
|
|
281
|
+
|
|
282
|
+
Create a `changelog` folder inside your site directory and add markdown (`.md` or `.mdx`) files for each entry:
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
site
|
|
286
|
+
├───changelog
|
|
287
|
+
│ ├───2025-01-15-initial-release.md
|
|
288
|
+
│ ├───2025-02-01-new-features.md
|
|
289
|
+
│ └───2025-03-10-bug-fixes.md
|
|
290
|
+
├───logo.svg
|
|
291
|
+
├───favicon.ico
|
|
292
|
+
└───docula.config.mjs
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Entry Format
|
|
296
|
+
|
|
297
|
+
Each changelog entry is a markdown file with front matter:
|
|
298
|
+
|
|
299
|
+
```md
|
|
300
|
+
---
|
|
301
|
+
title: "Initial Release"
|
|
302
|
+
date: 2025-01-15
|
|
303
|
+
tag: "Release"
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
We're excited to announce the initial release! Here's what's included:
|
|
307
|
+
|
|
308
|
+
- Feature A
|
|
309
|
+
- Feature B
|
|
310
|
+
- Bug fix C
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Front Matter Fields
|
|
314
|
+
|
|
315
|
+
| Field | Required | Description |
|
|
316
|
+
|-------|----------|-------------|
|
|
317
|
+
| `title` | No | Display title for the entry. Defaults to the filename if not provided. |
|
|
318
|
+
| `date` | Yes | Date of the entry (`YYYY-MM-DD`). Used for sorting (newest first). |
|
|
319
|
+
| `tag` | No | A label displayed as a badge (e.g., `Release`, `Bug Fix`, `Feature`). Gets a CSS class based on its value for styling. |
|
|
320
|
+
|
|
321
|
+
## File Naming
|
|
322
|
+
|
|
323
|
+
Files can optionally be prefixed with a date in `YYYY-MM-DD-` format. The date prefix is stripped to create the URL slug:
|
|
324
|
+
|
|
325
|
+
- `2025-01-15-initial-release.md` → `/changelog/initial-release/`
|
|
326
|
+
- `new-features.md` → `/changelog/new-features/`
|
|
327
|
+
|
|
328
|
+
## Generated Pages
|
|
329
|
+
|
|
330
|
+
When changelog entries are found, Docula generates:
|
|
331
|
+
|
|
332
|
+
- **Changelog listing page** at `/changelog/` — shows all entries sorted by date (newest first) with titles, dates, tags, and content
|
|
333
|
+
- **Individual entry pages** at `/changelog/{slug}/` — a dedicated page for each entry with a back link to the listing
|
|
334
|
+
|
|
335
|
+
Changelog URLs are also automatically added to the generated `sitemap.xml`.
|
|
336
|
+
|
|
337
|
+
## Styling
|
|
338
|
+
|
|
339
|
+
Tags receive a CSS class based on their value (e.g., a tag of `"Bug Fix"` gets the class `changelog-tag-bug-fix`). You can style tags and other changelog elements by overriding these classes in your `variables.css`:
|
|
340
|
+
|
|
341
|
+
```css
|
|
342
|
+
.changelog-entry {
|
|
343
|
+
border-bottom: 1px solid var(--border);
|
|
344
|
+
padding: 1.5rem 0;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.changelog-tag {
|
|
348
|
+
font-size: 0.75rem;
|
|
349
|
+
padding: 0.2rem 0.5rem;
|
|
350
|
+
border-radius: 4px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.changelog-tag-release {
|
|
354
|
+
background-color: #d4edda;
|
|
355
|
+
color: #155724;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.changelog-tag-bug-fix {
|
|
359
|
+
background-color: #f8d7da;
|
|
360
|
+
color: #721c24;
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
275
364
|
# Alert, Info, Warn Styling
|
|
276
365
|
|
|
277
366
|
Docula uses Writr's GitHub-flavored Markdown plugins, including GitHub-style blockquote alerts. Use the alert syntax directly in Markdown:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docula",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Beautiful Website for Your Projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/docula.js",
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"website:serve": "rimraf ./site/README.md && node bin/docula.mjs serve -s ./site -o ./site/dist",
|
|
30
30
|
"website:build:mega": "rimraf ./test/fixtures/mega-page-site/dist && node bin/docula.mjs build -s ./test/fixtures/mega-page-site",
|
|
31
31
|
"website:serve:mega": "rimraf ./test/fixtures/mega-page-site/dist && node bin/docula.mjs serve -s ./test/fixtures/mega-page-site",
|
|
32
|
+
"website:build:changelog": "rimraf ./test/fixtures/changelog-site/dist && node bin/docula.mjs build -s ./test/fixtures/changelog-site",
|
|
33
|
+
"website:serve:changelog": "rimraf ./test/fixtures/changelog-site/dist && node bin/docula.mjs serve -s ./test/fixtures/changelog-site",
|
|
32
34
|
"prepare": "pnpm build"
|
|
33
35
|
},
|
|
34
36
|
"keywords": [
|
|
@@ -51,31 +53,30 @@
|
|
|
51
53
|
"docula": "./bin/docula.mjs"
|
|
52
54
|
},
|
|
53
55
|
"dependencies": {
|
|
54
|
-
"@cacheable/net": "^2.0.
|
|
55
|
-
"
|
|
56
|
-
"ecto": "^4.7.1",
|
|
56
|
+
"@cacheable/net": "^2.0.5",
|
|
57
|
+
"ecto": "^4.8.2",
|
|
57
58
|
"feed": "^5.2.0",
|
|
58
59
|
"he": "^1.2.0",
|
|
59
60
|
"jiti": "^2.6.1",
|
|
60
61
|
"serve-handler": "^6.1.6",
|
|
61
62
|
"update-notifier": "^7.3.1",
|
|
62
|
-
"writr": "^5.0.
|
|
63
|
+
"writr": "^5.0.3"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
|
-
"@biomejs/biome": "^2.
|
|
66
|
+
"@biomejs/biome": "^2.4.2",
|
|
66
67
|
"@types/express": "^5.0.6",
|
|
67
68
|
"@types/he": "^1.2.3",
|
|
68
69
|
"@types/js-yaml": "^4.0.9",
|
|
69
|
-
"@types/node": "^25.
|
|
70
|
+
"@types/node": "^25.2.3",
|
|
70
71
|
"@types/serve-handler": "^6.1.4",
|
|
71
72
|
"@types/update-notifier": "^6.0.8",
|
|
72
|
-
"@vitest/coverage-v8": "^4.0.
|
|
73
|
-
"dotenv": "^17.
|
|
74
|
-
"rimraf": "^6.1.
|
|
73
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
74
|
+
"dotenv": "^17.3.1",
|
|
75
|
+
"rimraf": "^6.1.3",
|
|
75
76
|
"tsup": "^8.5.1",
|
|
76
77
|
"tsx": "^4.21.0",
|
|
77
78
|
"typescript": "^5.9.3",
|
|
78
|
-
"vitest": "^4.0.
|
|
79
|
+
"vitest": "^4.0.18"
|
|
79
80
|
},
|
|
80
81
|
"files": [
|
|
81
82
|
"dist",
|
package/template/api.hbs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
{{> header }}
|
|
6
|
+
<title>API Documentation - {{ siteTitle }}</title>
|
|
7
|
+
<meta name="description" content="API Documentation for {{ siteTitle }}" />
|
|
8
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docutopia/react/dist/browser/docutopia.css" />
|
|
9
|
+
<style>
|
|
10
|
+
body {
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
</head>
|
|
16
|
+
|
|
17
|
+
<body>
|
|
18
|
+
<div id="docs" style="height: 100vh;"></div>
|
|
19
|
+
|
|
20
|
+
<script src="https://cdn.jsdelivr.net/npm/@docutopia/react/dist/browser/docutopia.js"></script>
|
|
21
|
+
<script>
|
|
22
|
+
Docutopia.render('docs', {
|
|
23
|
+
specUrl: '{{ specUrl }}',
|
|
24
|
+
});
|
|
25
|
+
</script>
|
|
26
|
+
</body>
|
|
27
|
+
|
|
28
|
+
</html>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
{{> header }}
|
|
6
|
+
<title>{{siteTitle}} - {{title}}</title>
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<body>
|
|
10
|
+
{{> singlepage/hero }}
|
|
11
|
+
<a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
|
|
12
|
+
height="80" viewBox="0 0 250 250" style="color:#fff; position: absolute; top: 0; border: 0; right: 0;"
|
|
13
|
+
aria-hidden="true">
|
|
14
|
+
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
|
15
|
+
<path
|
|
16
|
+
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
|
|
17
|
+
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
|
|
18
|
+
<path
|
|
19
|
+
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
|
|
20
|
+
fill="currentColor" class="octo-body"></path>
|
|
21
|
+
</svg></a>
|
|
22
|
+
<style>
|
|
23
|
+
.github-corner:hover .octo-arm {
|
|
24
|
+
animation: octocat-wave 560ms ease-in-out
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes octocat-wave {
|
|
28
|
+
|
|
29
|
+
0%,
|
|
30
|
+
100% {
|
|
31
|
+
transform: rotate(0)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
20%,
|
|
35
|
+
60% {
|
|
36
|
+
transform: rotate(-25deg)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
40%,
|
|
40
|
+
80% {
|
|
41
|
+
transform: rotate(10deg)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media (max-width:500px) {
|
|
46
|
+
.github-corner:hover .octo-arm {
|
|
47
|
+
animation: none
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.github-corner .octo-arm {
|
|
51
|
+
animation: octocat-wave 560ms ease-in-out
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
55
|
+
<main class="versions-container">
|
|
56
|
+
<div class="versions-content">
|
|
57
|
+
<div class="changelog-entry-nav">
|
|
58
|
+
<a href="/changelog/">← Back to Changelog</a>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="changelog-entry changelog-entry-single">
|
|
61
|
+
<div class="changelog-entry-header">
|
|
62
|
+
<h1 class="changelog-entry-title">{{title}}</h1>
|
|
63
|
+
{{#if tag}}
|
|
64
|
+
<span class="changelog-tag changelog-tag-{{tagClass}}">{{tag}}</span>
|
|
65
|
+
{{/if}}
|
|
66
|
+
</div>
|
|
67
|
+
<span class="changelog-entry-date">{{formattedDate}}</span>
|
|
68
|
+
<div class="changelog-entry-body">
|
|
69
|
+
{{{generatedHtml}}}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</main>
|
|
74
|
+
{{> footer}}
|
|
75
|
+
|
|
76
|
+
{{> scripts }}
|
|
77
|
+
</body>
|
|
78
|
+
|
|
79
|
+
</html>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
{{> header }}
|
|
6
|
+
<title>{{siteTitle}} Changelog</title>
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<body>
|
|
10
|
+
{{> singlepage/hero }}
|
|
11
|
+
<a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
|
|
12
|
+
height="80" viewBox="0 0 250 250" style="color:#fff; position: absolute; top: 0; border: 0; right: 0;"
|
|
13
|
+
aria-hidden="true">
|
|
14
|
+
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
|
15
|
+
<path
|
|
16
|
+
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
|
|
17
|
+
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
|
|
18
|
+
<path
|
|
19
|
+
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
|
|
20
|
+
fill="currentColor" class="octo-body"></path>
|
|
21
|
+
</svg></a>
|
|
22
|
+
<style>
|
|
23
|
+
.github-corner:hover .octo-arm {
|
|
24
|
+
animation: octocat-wave 560ms ease-in-out
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes octocat-wave {
|
|
28
|
+
|
|
29
|
+
0%,
|
|
30
|
+
100% {
|
|
31
|
+
transform: rotate(0)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
20%,
|
|
35
|
+
60% {
|
|
36
|
+
transform: rotate(-25deg)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
40%,
|
|
40
|
+
80% {
|
|
41
|
+
transform: rotate(10deg)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media (max-width:500px) {
|
|
46
|
+
.github-corner:hover .octo-arm {
|
|
47
|
+
animation: none
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.github-corner .octo-arm {
|
|
51
|
+
animation: octocat-wave 560ms ease-in-out
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
55
|
+
<main class="versions-container">
|
|
56
|
+
<div class="versions-content">
|
|
57
|
+
<h2 class="home-title">Changelog</h2>
|
|
58
|
+
{{#if entries}}
|
|
59
|
+
{{#each entries as |entry|}}
|
|
60
|
+
<div class="changelog-entry">
|
|
61
|
+
<div class="changelog-entry-header">
|
|
62
|
+
<a class="changelog-entry-title" href="/changelog/{{entry.slug}}/">{{entry.title}}</a>
|
|
63
|
+
{{#if entry.tag}}
|
|
64
|
+
<span class="changelog-tag changelog-tag-{{entry.tagClass}}">{{entry.tag}}</span>
|
|
65
|
+
{{/if}}
|
|
66
|
+
</div>
|
|
67
|
+
<span class="changelog-entry-date">{{entry.formattedDate}}</span>
|
|
68
|
+
<div class="changelog-entry-body">
|
|
69
|
+
{{{entry.generatedHtml}}}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
{{/each}}
|
|
73
|
+
{{/if}}
|
|
74
|
+
</div>
|
|
75
|
+
</main>
|
|
76
|
+
{{> footer}}
|
|
77
|
+
|
|
78
|
+
{{> scripts }}
|
|
79
|
+
</body>
|
|
80
|
+
|
|
81
|
+
</html>
|
package/template/css/base.css
CHANGED
|
@@ -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
|
}
|
|
@@ -241,10 +241,6 @@ details > summary {
|
|
|
241
241
|
margin-right: 2rem
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
.main-toc {
|
|
245
|
-
padding-bottom: 1.5rem;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
244
|
.toc {
|
|
249
245
|
font-size: 0.875rem;
|
|
250
246
|
}
|
|
@@ -287,18 +283,6 @@ details > summary {
|
|
|
287
283
|
text-decoration: none;
|
|
288
284
|
}
|
|
289
285
|
|
|
290
|
-
.main-toc ul > li > a::after {
|
|
291
|
-
position: absolute;
|
|
292
|
-
right: 0;
|
|
293
|
-
content: '';
|
|
294
|
-
display: inline-block;
|
|
295
|
-
width: 0.25rem;
|
|
296
|
-
height: 0.25rem;
|
|
297
|
-
border-right: 1px solid var(--color-primary);
|
|
298
|
-
border-bottom: 1px solid var(--color-primary);
|
|
299
|
-
transform: rotate(-45deg);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
286
|
.fixed-toc {
|
|
303
287
|
display: none;
|
|
304
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>
|
package/dist/docula.d.ts
DELETED
|
@@ -1,132 +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.ts or 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
|
-
* @param {boolean} typescript - If true, generates docula.config.ts instead of docula.config.mjs
|
|
109
|
-
* @returns {void}
|
|
110
|
-
*/
|
|
111
|
-
generateInit(sitePath: string, typescript?: boolean): void;
|
|
112
|
-
/**
|
|
113
|
-
* Get the version of the package
|
|
114
|
-
* @returns {string}
|
|
115
|
-
*/
|
|
116
|
-
getVersion(): string;
|
|
117
|
-
/**
|
|
118
|
-
* Load the config file. Supports both .mjs and .ts config files.
|
|
119
|
-
* Priority: docula.config.ts > docula.config.mjs
|
|
120
|
-
* @param {string} sitePath
|
|
121
|
-
* @returns {Promise<void>}
|
|
122
|
-
*/
|
|
123
|
-
loadConfigFile(sitePath: string): Promise<void>;
|
|
124
|
-
/**
|
|
125
|
-
* Serve the site based on the options (port and output path)
|
|
126
|
-
* @param {DoculaOptions} options
|
|
127
|
-
* @returns {Promise<void>}
|
|
128
|
-
*/
|
|
129
|
-
serve(options: DoculaOptions): Promise<http.Server>;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export { Docula as default };
|