docula 0.20.0 → 0.30.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/package.json +22 -32
- package/template/docs.hbs +47 -2
- package/template/includes/singlepage/content.hbs +1 -1
- package/template/index.hbs +61 -15
- package/template/releases.hbs +66 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docula",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "Beautiful Website for Your Projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/docula.js",
|
|
@@ -17,6 +17,20 @@
|
|
|
17
17
|
"node": ">=20"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
|
+
"scripts": {
|
|
21
|
+
"clean": "rimraf ./dist ./coverage ./node_modules ./package-lock.json ./yarn.lock ./pnpm-lock.yaml ./site/README.md ./site/dist",
|
|
22
|
+
"build": "pnpm generate-init-file && rimraf ./dist && tsup src/docula.ts --format esm --dts --clean",
|
|
23
|
+
"lint": "biome check --write --error-on-warnings",
|
|
24
|
+
"lint:ci": "biome check --error-on-warnings",
|
|
25
|
+
"test": "pnpm lint && vitest run --coverage",
|
|
26
|
+
"test:ci": "pnpm lint:ci && vitest run --coverage",
|
|
27
|
+
"generate-init-file": "tsx scripts/generate-init-file.ts",
|
|
28
|
+
"website:build": "rimraf ./site/README.md && node bin/docula.mjs build -s ./site -o ./site/dist",
|
|
29
|
+
"website:serve": "rimraf ./site/README.md && node bin/docula.mjs serve -s ./site -o ./site/dist",
|
|
30
|
+
"website:build:mega": "rimraf ./test/fixtures/mega-page-site/dist && node bin/docula.mjs build -s ./test/fixtures/mega-page-site",
|
|
31
|
+
"website:serve:mega": "rimraf ./test/fixtures/mega-page-site/dist && node bin/docula.mjs serve -s ./test/fixtures/mega-page-site",
|
|
32
|
+
"prepare": "pnpm build"
|
|
33
|
+
},
|
|
20
34
|
"keywords": [
|
|
21
35
|
"static-site-generator",
|
|
22
36
|
"static-site",
|
|
@@ -33,60 +47,36 @@
|
|
|
33
47
|
"markdown",
|
|
34
48
|
"handlebars"
|
|
35
49
|
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"clean": "rimraf ./dist ./coverage ./node_modules ./package-lock.json ./yarn.lock ./pnpm-lock.yaml ./site/README.md ./site/dist",
|
|
38
|
-
"build": "pnpm generate-init-file && rimraf ./dist && tsup src/docula.ts --format esm --dts --clean",
|
|
39
|
-
"lint": "biome check --write",
|
|
40
|
-
"test": "pnpm lint && vitest run --coverage",
|
|
41
|
-
"test:ci": "biome check && vitest run --coverage",
|
|
42
|
-
"generate-init-file": "tsx scripts/generate-init-file.ts",
|
|
43
|
-
"website:build": "rimraf ./site/README.md && node bin/docula.mjs build -s ./site -o ./site/dist",
|
|
44
|
-
"website:serve": "rimraf ./site/README.md && node bin/docula.mjs serve -s ./site -o ./site/dist",
|
|
45
|
-
"website:serve:mega": "rimraf ./test/fixtures/mega-page-site/dist && node bin/docula.mjs serve -s ./test/fixtures/mega-page-site",
|
|
46
|
-
"prepare": "pnpm build"
|
|
47
|
-
},
|
|
48
50
|
"bin": {
|
|
49
51
|
"docula": "./bin/docula.mjs"
|
|
50
52
|
},
|
|
51
53
|
"dependencies": {
|
|
52
|
-
"axios": "^1.
|
|
54
|
+
"axios": "^1.12.2",
|
|
53
55
|
"cheerio": "^1.1.2",
|
|
54
|
-
"ecto": "^4.
|
|
56
|
+
"ecto": "^4.5.1",
|
|
55
57
|
"feed": "^5.1.0",
|
|
56
58
|
"he": "^1.2.0",
|
|
57
59
|
"serve-handler": "^6.1.6",
|
|
58
60
|
"update-notifier": "^7.3.1",
|
|
59
|
-
"writr": "^4.
|
|
61
|
+
"writr": "^4.5.0"
|
|
60
62
|
},
|
|
61
63
|
"devDependencies": {
|
|
62
|
-
"@biomejs/biome": "^2.2.
|
|
64
|
+
"@biomejs/biome": "^2.2.4",
|
|
63
65
|
"@types/express": "^5.0.3",
|
|
64
66
|
"@types/he": "^1.2.3",
|
|
65
67
|
"@types/js-yaml": "^4.0.9",
|
|
66
|
-
"@types/node": "^24.
|
|
68
|
+
"@types/node": "^24.5.2",
|
|
67
69
|
"@types/serve-handler": "^6.1.4",
|
|
68
70
|
"@types/update-notifier": "^6.0.8",
|
|
69
71
|
"@vitest/coverage-v8": "^3.2.4",
|
|
70
|
-
"dotenv": "^17.2.
|
|
72
|
+
"dotenv": "^17.2.2",
|
|
71
73
|
"rimraf": "^6.0.1",
|
|
72
74
|
"tsup": "^8.5.0",
|
|
73
|
-
"tsx": "^4.20.
|
|
75
|
+
"tsx": "^4.20.5",
|
|
74
76
|
"typescript": "^5.9.2",
|
|
75
77
|
"vitest": "^3.2.4",
|
|
76
78
|
"webpack": "^5.101.3"
|
|
77
79
|
},
|
|
78
|
-
"xo": {
|
|
79
|
-
"rules": {
|
|
80
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
|
81
|
-
"@typescript-eslint/no-unsafe-assignment": "off"
|
|
82
|
-
},
|
|
83
|
-
"ignores": [
|
|
84
|
-
"docula.config.*",
|
|
85
|
-
"vitest.config.*",
|
|
86
|
-
"bin/docula.js",
|
|
87
|
-
"docula.d.ts"
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
80
|
"files": [
|
|
91
81
|
"dist",
|
|
92
82
|
"template",
|
package/template/docs.hbs
CHANGED
|
@@ -1,16 +1,60 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
+
|
|
3
4
|
<head>
|
|
4
5
|
{{> header }}
|
|
5
6
|
<title>{{siteTitle}} - {{title}} </title>
|
|
6
7
|
</head>
|
|
7
8
|
|
|
8
9
|
<body>
|
|
9
|
-
<a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
|
|
10
|
+
<a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
|
|
11
|
+
height="80" viewBox="0 0 250 250" style="color:#fff; position: absolute; top: 0; border: 0; right: 0;"
|
|
12
|
+
aria-hidden="true">
|
|
13
|
+
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
|
14
|
+
<path
|
|
15
|
+
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"
|
|
16
|
+
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
|
|
17
|
+
<path
|
|
18
|
+
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"
|
|
19
|
+
fill="currentColor" class="octo-body"></path>
|
|
20
|
+
</svg></a>
|
|
21
|
+
<style>
|
|
22
|
+
.github-corner:hover .octo-arm {
|
|
23
|
+
animation: octocat-wave 560ms ease-in-out
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes octocat-wave {
|
|
27
|
+
|
|
28
|
+
0%,
|
|
29
|
+
100% {
|
|
30
|
+
transform: rotate(0)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
20%,
|
|
34
|
+
60% {
|
|
35
|
+
transform: rotate(-25deg)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
40%,
|
|
39
|
+
80% {
|
|
40
|
+
transform: rotate(10deg)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (max-width:500px) {
|
|
45
|
+
.github-corner:hover .octo-arm {
|
|
46
|
+
animation: none
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.github-corner .octo-arm {
|
|
50
|
+
animation: octocat-wave 560ms ease-in-out
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
10
54
|
<main class="layout">
|
|
11
55
|
{{> multipage/header }}
|
|
12
56
|
{{> multipage/sidebar }}
|
|
13
|
-
{{> multipage/doc }}
|
|
57
|
+
{{> multipage/doc }}
|
|
14
58
|
</main>
|
|
15
59
|
{{> footer}}
|
|
16
60
|
|
|
@@ -18,4 +62,5 @@
|
|
|
18
62
|
{{> multipage/scripts }}
|
|
19
63
|
|
|
20
64
|
</body>
|
|
65
|
+
|
|
21
66
|
</html>
|
package/template/index.hbs
CHANGED
|
@@ -1,26 +1,72 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
</
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{{
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
{{> header }}
|
|
6
|
+
<title>{{ siteTitle }}</title>
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<body>
|
|
10
|
+
<a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
|
|
11
|
+
height="80" viewBox="0 0 250 250" style="color:#fff; position: absolute; top: 0; border: 0; right: 0;"
|
|
12
|
+
aria-hidden="true">
|
|
13
|
+
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
|
14
|
+
<path
|
|
15
|
+
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"
|
|
16
|
+
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
|
|
17
|
+
<path
|
|
18
|
+
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"
|
|
19
|
+
fill="currentColor" class="octo-body"></path>
|
|
20
|
+
</svg></a>
|
|
21
|
+
<style>
|
|
22
|
+
.github-corner:hover .octo-arm {
|
|
23
|
+
animation: octocat-wave 560ms ease-in-out
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes octocat-wave {
|
|
27
|
+
|
|
28
|
+
0%,
|
|
29
|
+
100% {
|
|
30
|
+
transform: rotate(0)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
20%,
|
|
34
|
+
60% {
|
|
35
|
+
transform: rotate(-25deg)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
40%,
|
|
39
|
+
80% {
|
|
40
|
+
transform: rotate(10deg)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (max-width:500px) {
|
|
45
|
+
.github-corner:hover .octo-arm {
|
|
46
|
+
animation: none
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.github-corner .octo-arm {
|
|
50
|
+
animation: octocat-wave 560ms ease-in-out
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
54
|
+
{{#if content}}
|
|
55
|
+
{{> singlepage/hero }}
|
|
56
|
+
{{> singlepage/content }}
|
|
57
|
+
{{else}}
|
|
13
58
|
<main class="home">
|
|
14
59
|
{{> multipage/hero }}
|
|
15
|
-
{{> multipage/home }}
|
|
60
|
+
{{> multipage/home }}
|
|
16
61
|
</main>
|
|
17
|
-
{{/if}}
|
|
62
|
+
{{/if}}
|
|
18
63
|
|
|
19
64
|
{{> footer}}
|
|
20
65
|
{{> scripts }}
|
|
21
66
|
|
|
22
67
|
{{#unless content}}
|
|
23
|
-
|
|
68
|
+
{{> multipage/scripts }}
|
|
24
69
|
{{/unless}}
|
|
25
|
-
|
|
26
|
-
|
|
70
|
+
</body>
|
|
71
|
+
|
|
72
|
+
</html>
|
package/template/releases.hbs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
+
|
|
3
4
|
<head>
|
|
4
5
|
{{> header }}
|
|
5
6
|
<title>{{siteTitle}} Releases</title>
|
|
@@ -7,34 +8,73 @@
|
|
|
7
8
|
|
|
8
9
|
<body>
|
|
9
10
|
{{> singlepage/hero }}
|
|
10
|
-
<a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
|
|
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>
|
|
11
55
|
<main class="versions-container">
|
|
12
56
|
<div class="versions-content">
|
|
13
57
|
<h2 class="home-title">Releases</h2>
|
|
14
58
|
{{#if github}}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{{
|
|
33
|
-
{{/if}}
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
{{/each}}
|
|
37
|
-
{{/if}}
|
|
59
|
+
{{#if github.releases}}
|
|
60
|
+
{{#each github.releases as |release|}}
|
|
61
|
+
<div class="release">
|
|
62
|
+
<div class="release-header">
|
|
63
|
+
<a class="release-title" href="{{release.html_url}}" target="_blank"
|
|
64
|
+
rel="noopener noreferrer">{{release.name}}</a>
|
|
65
|
+
<span class="release-date">{{#moment
|
|
66
|
+
release.published_at "MMMM DD, YYYY"
|
|
67
|
+
}}{{/moment}}
|
|
68
|
+
</span>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="release-body">
|
|
71
|
+
{{#if release.body}}
|
|
72
|
+
{{#markdown}}{{release.body}}{{/markdown}}
|
|
73
|
+
{{/if}}
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
{{/each}}
|
|
77
|
+
{{/if}}
|
|
38
78
|
{{/if}}
|
|
39
79
|
</div>
|
|
40
80
|
</main>
|
|
@@ -42,4 +82,5 @@
|
|
|
42
82
|
|
|
43
83
|
{{> scripts }}
|
|
44
84
|
</body>
|
|
45
|
-
|
|
85
|
+
|
|
86
|
+
</html>
|