docula 1.7.0 → 1.9.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/dist/docula.d.ts +209 -171
- package/dist/docula.js +3230 -2446
- package/package.json +13 -9
- package/templates/classic/api.hbs +1 -0
- package/templates/classic/changelog-entry.hbs +1 -0
- package/templates/classic/changelog.hbs +1 -0
- package/templates/classic/css/multipage.css +18 -0
- package/templates/classic/docs.hbs +1 -0
- package/templates/classic/home.hbs +1 -0
- package/templates/classic/includes/header.hbs +1 -0
- package/templates/classic/includes/multipage/doc.hbs +6 -0
- package/templates/classic/includes/opengraph.hbs +18 -0
- package/templates/modern/api.hbs +1 -0
- package/templates/modern/changelog-entry.hbs +1 -0
- package/templates/modern/changelog.hbs +1 -0
- package/templates/modern/css/styles.css +17 -0
- package/templates/modern/docs.hbs +1 -0
- package/templates/modern/home.hbs +1 -0
- package/templates/modern/includes/doc.hbs +6 -0
- package/templates/modern/includes/header.hbs +4 -1
- package/templates/modern/includes/opengraph.hbs +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docula",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Beautiful Website for Your Projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/docula.js",
|
|
@@ -40,31 +40,35 @@
|
|
|
40
40
|
"docula": "./bin/docula.js"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@
|
|
43
|
+
"@ai-sdk/anthropic": "^3.0.63",
|
|
44
|
+
"@ai-sdk/google": "^3.0.52",
|
|
45
|
+
"@ai-sdk/openai": "^3.0.47",
|
|
46
|
+
"@cacheable/net": "^2.0.6",
|
|
47
|
+
"ai": "^6.0.134",
|
|
44
48
|
"colorette": "^2.0.20",
|
|
45
|
-
"ecto": "^4.8.
|
|
49
|
+
"ecto": "^4.8.3",
|
|
46
50
|
"feed": "^5.2.0",
|
|
47
51
|
"hashery": "^1.5.0",
|
|
48
52
|
"jiti": "^2.6.1",
|
|
49
|
-
"serve-handler": "^6.1.
|
|
53
|
+
"serve-handler": "^6.1.7",
|
|
50
54
|
"update-notifier": "^7.3.1",
|
|
51
|
-
"writr": "^
|
|
55
|
+
"writr": "^6.0.1"
|
|
52
56
|
},
|
|
53
57
|
"devDependencies": {
|
|
54
|
-
"@biomejs/biome": "^2.4.
|
|
58
|
+
"@biomejs/biome": "^2.4.7",
|
|
55
59
|
"@playwright/test": "^1.58.2",
|
|
56
60
|
"@types/express": "^5.0.6",
|
|
57
61
|
"@types/js-yaml": "^4.0.9",
|
|
58
|
-
"@types/node": "^25.
|
|
62
|
+
"@types/node": "^25.5.0",
|
|
59
63
|
"@types/serve-handler": "^6.1.4",
|
|
60
64
|
"@types/update-notifier": "^6.0.8",
|
|
61
|
-
"@vitest/coverage-v8": "^4.0
|
|
65
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
62
66
|
"dotenv": "^17.3.1",
|
|
63
67
|
"rimraf": "^6.1.3",
|
|
64
68
|
"tsup": "^8.5.1",
|
|
65
69
|
"tsx": "^4.21.0",
|
|
66
70
|
"typescript": "^5.9.3",
|
|
67
|
-
"vitest": "^4.0
|
|
71
|
+
"vitest": "^4.1.0"
|
|
68
72
|
},
|
|
69
73
|
"files": [
|
|
70
74
|
"dist",
|
|
@@ -74,6 +74,24 @@
|
|
|
74
74
|
font-size: 0.875em;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
/* Edit page link */
|
|
78
|
+
.edit-page-link {
|
|
79
|
+
display: inline-flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: 0.375rem;
|
|
82
|
+
margin-top: 2rem;
|
|
83
|
+
padding-top: 0.75rem;
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
color: var(--color-secondary);
|
|
86
|
+
text-decoration: none;
|
|
87
|
+
border-top: 1px solid var(--border);
|
|
88
|
+
width: 100%;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.edit-page-link:hover {
|
|
92
|
+
color: var(--color-primary);
|
|
93
|
+
}
|
|
94
|
+
|
|
77
95
|
/* Docs */
|
|
78
96
|
.nav {
|
|
79
97
|
padding-left: 1rem;
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
<article class="content">
|
|
4
4
|
<h1>{{title}}</h1>
|
|
5
5
|
{{generatedHtml}}
|
|
6
|
+
{{#if editPageDocUrl}}
|
|
7
|
+
<a class="edit-page-link" href="{{editPageDocUrl}}" target="_blank" rel="noopener noreferrer">
|
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>
|
|
9
|
+
Edit this page
|
|
10
|
+
</a>
|
|
11
|
+
{{/if}}
|
|
6
12
|
</article>
|
|
7
13
|
<div class="fixed-toc-container">
|
|
8
14
|
<div class="toc fixed-toc" id="fixed-toc">
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{{#if ogTitle}}
|
|
2
|
+
<meta property="og:title" content="{{ogTitle}}" />
|
|
3
|
+
<meta property="og:description" content="{{ogDescription}}" />
|
|
4
|
+
{{#if ogImage}}
|
|
5
|
+
<meta property="og:image" content="{{ogImage}}" />
|
|
6
|
+
{{/if}}
|
|
7
|
+
{{#if ogUrl}}
|
|
8
|
+
<meta property="og:url" content="{{ogUrl}}" />
|
|
9
|
+
{{/if}}
|
|
10
|
+
<meta property="og:type" content="{{ogType}}" />
|
|
11
|
+
<meta property="og:site_name" content="{{ogSiteName}}" />
|
|
12
|
+
<meta name="twitter:card" content="{{ogTwitterCard}}" />
|
|
13
|
+
<meta name="twitter:title" content="{{ogTitle}}" />
|
|
14
|
+
<meta name="twitter:description" content="{{ogDescription}}" />
|
|
15
|
+
{{#if ogImage}}
|
|
16
|
+
<meta name="twitter:image" content="{{ogImage}}" />
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{/if}}
|
package/templates/modern/api.hbs
CHANGED
|
@@ -362,6 +362,23 @@ body {
|
|
|
362
362
|
.article__main th, .article__main td, .release-body th, .release-body td, .changelog-entry-body th, .changelog-entry-body td, .home-content th, .home-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
|
|
363
363
|
.article__main th, .release-body th, .changelog-entry-body th, .home-content th { font-weight: 600; background: var(--pre-bg); }
|
|
364
364
|
|
|
365
|
+
.article__edit-link {
|
|
366
|
+
display: inline-flex;
|
|
367
|
+
align-items: center;
|
|
368
|
+
gap: 6px;
|
|
369
|
+
margin-top: 30px;
|
|
370
|
+
padding: 8px 0;
|
|
371
|
+
font-size: 14px;
|
|
372
|
+
color: var(--muted);
|
|
373
|
+
text-decoration: none;
|
|
374
|
+
border-top: 1px solid var(--border);
|
|
375
|
+
width: 100%;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.article__edit-link:hover {
|
|
379
|
+
color: var(--link);
|
|
380
|
+
}
|
|
381
|
+
|
|
365
382
|
.article__section {
|
|
366
383
|
& * {
|
|
367
384
|
margin-bottom: 15px;
|
|
@@ -15,4 +15,10 @@
|
|
|
15
15
|
</ul>
|
|
16
16
|
</aside>
|
|
17
17
|
</div>
|
|
18
|
+
{{#if editPageDocUrl}}
|
|
19
|
+
<a class="article__edit-link" href="{{editPageDocUrl}}" target="_blank" rel="noopener noreferrer">
|
|
20
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>
|
|
21
|
+
Edit this page
|
|
22
|
+
</a>
|
|
23
|
+
{{/if}}
|
|
18
24
|
</article>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<meta charset="UTF-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3
|
-
<meta name="description" content="{{siteDescription}}">
|
|
3
|
+
<meta name="description" content="{{#if description}}{{description}}{{else}}{{siteDescription}}{{/if}}">
|
|
4
|
+
{{#if keywords}}<meta name="keywords" content="{{#each keywords}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}">
|
|
5
|
+
{{/if}}
|
|
6
|
+
{{> opengraph }}
|
|
4
7
|
<link rel="stylesheet" href="{{baseUrl}}/css/variables.css">
|
|
5
8
|
<link rel="stylesheet" href="{{baseUrl}}/css/styles.css">
|
|
6
9
|
<link rel="stylesheet" href="{{baseUrl}}/css/highlight/styles/base16/docula.css">
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{{#if ogTitle}}
|
|
2
|
+
<meta property="og:title" content="{{ogTitle}}" />
|
|
3
|
+
<meta property="og:description" content="{{ogDescription}}" />
|
|
4
|
+
{{#if ogImage}}
|
|
5
|
+
<meta property="og:image" content="{{ogImage}}" />
|
|
6
|
+
{{/if}}
|
|
7
|
+
{{#if ogUrl}}
|
|
8
|
+
<meta property="og:url" content="{{ogUrl}}" />
|
|
9
|
+
{{/if}}
|
|
10
|
+
<meta property="og:type" content="{{ogType}}" />
|
|
11
|
+
<meta property="og:site_name" content="{{ogSiteName}}" />
|
|
12
|
+
<meta name="twitter:card" content="{{ogTwitterCard}}" />
|
|
13
|
+
<meta name="twitter:title" content="{{ogTitle}}" />
|
|
14
|
+
<meta name="twitter:description" content="{{ogDescription}}" />
|
|
15
|
+
{{#if ogImage}}
|
|
16
|
+
<meta name="twitter:image" content="{{ogImage}}" />
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{/if}}
|