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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docula",
3
- "version": "1.7.0",
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
- "@cacheable/net": "^2.0.5",
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.2",
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.6",
53
+ "serve-handler": "^6.1.7",
50
54
  "update-notifier": "^7.3.1",
51
- "writr": "^5.0.3"
55
+ "writr": "^6.0.1"
52
56
  },
53
57
  "devDependencies": {
54
- "@biomejs/biome": "^2.4.2",
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.2.3",
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.18",
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.18"
71
+ "vitest": "^4.1.0"
68
72
  },
69
73
  "files": [
70
74
  "dist",
@@ -6,6 +6,7 @@
6
6
  <link rel="stylesheet" href="/css/api.css" />
7
7
  <title>API Reference - {{ siteTitle }}</title>
8
8
  <meta name="description" content="API Reference for {{ siteTitle }}" />
9
+ {{{jsonLd}}}
9
10
  </head>
10
11
 
11
12
  <body>
@@ -4,6 +4,7 @@
4
4
  <head>
5
5
  {{> header }}
6
6
  <title>{{siteTitle}} - {{title}}</title>
7
+ {{{jsonLd}}}
7
8
  </head>
8
9
 
9
10
  <body>
@@ -4,6 +4,7 @@
4
4
  <head>
5
5
  {{> header }}
6
6
  <title>{{siteTitle}} Changelog</title>
7
+ {{{jsonLd}}}
7
8
  </head>
8
9
 
9
10
  <body>
@@ -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;
@@ -4,6 +4,7 @@
4
4
  <head>
5
5
  {{> header }}
6
6
  <title>{{siteTitle}} - {{title}} </title>
7
+ {{{jsonLd}}}
7
8
  </head>
8
9
 
9
10
  <body>
@@ -4,6 +4,7 @@
4
4
  <head>
5
5
  {{> header }}
6
6
  <title>{{ siteTitle }}</title>
7
+ {{{jsonLd}}}
7
8
  </head>
8
9
 
9
10
  <body>
@@ -1,5 +1,6 @@
1
1
  <meta charset="UTF-8" />
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1" />
3
+ {{> opengraph }}
3
4
  <link rel="stylesheet" href="/css/variables.css" />
4
5
 
5
6
  <link rel="stylesheet" href="/css/base.css" />
@@ -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}}
@@ -6,6 +6,7 @@
6
6
  <link rel="stylesheet" href="{{baseUrl}}/css/api.css">
7
7
  <title>API Reference - {{ siteTitle }}</title>
8
8
  <meta name="description" content="API Reference for {{ siteTitle }}" />
9
+ {{{jsonLd}}}
9
10
  </head>
10
11
 
11
12
  <body>
@@ -4,6 +4,7 @@
4
4
  <head>
5
5
  {{> header }}
6
6
  <title>{{siteTitle}} - {{title}}</title>
7
+ {{{jsonLd}}}
7
8
  </head>
8
9
 
9
10
  <body>
@@ -4,6 +4,7 @@
4
4
  <head>
5
5
  {{> header }}
6
6
  <title>{{siteTitle}} Changelog</title>
7
+ {{{jsonLd}}}
7
8
  </head>
8
9
 
9
10
  <body>
@@ -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;
@@ -4,6 +4,7 @@
4
4
  <head>
5
5
  {{> header }}
6
6
  <title>{{siteTitle}} - {{title}}</title>
7
+ {{{jsonLd}}}
7
8
  </head>
8
9
 
9
10
  <body>
@@ -5,6 +5,7 @@
5
5
  {{> header }}
6
6
  <link rel="stylesheet" href="{{baseUrl}}/css/home.css">
7
7
  <title>{{ siteTitle }}</title>
8
+ {{{jsonLd}}}
8
9
  </head>
9
10
 
10
11
  <body>
@@ -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}}