docula 1.11.1 → 1.13.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.11.1",
3
+ "version": "1.13.0",
4
4
  "description": "Beautiful Website for Your Projects",
5
5
  "type": "module",
6
6
  "main": "./dist/docula.js",
@@ -64,8 +64,9 @@
64
64
  "@types/update-notifier": "^6.0.8",
65
65
  "@vitest/coverage-v8": "^4.1.0",
66
66
  "dotenv": "^17.3.1",
67
+ "postject": "1.0.0-alpha.6",
67
68
  "rimraf": "^6.1.3",
68
- "tsup": "^8.5.1",
69
+ "tsdown": "^0.21.7",
69
70
  "tsx": "^4.21.0",
70
71
  "typescript": "^5.9.3",
71
72
  "vitest": "^4.1.0"
@@ -77,7 +78,9 @@
77
78
  ],
78
79
  "scripts": {
79
80
  "clean": "rimraf ./dist ./coverage ./node_modules ./package-lock.json ./yarn.lock ./pnpm-lock.yaml ./site/dist",
80
- "build": "pnpm generate-init-file && rimraf ./dist && tsup src/docula.ts --format esm --dts --clean",
81
+ "build": "pnpm generate-init-file && tsdown",
82
+ "build:binary": "pnpm generate-init-file && pnpm generate-embedded-templates && tsdown --config tsdown.config.binary.ts && tsx scripts/build-sea.ts",
83
+ "generate-embedded-templates": "tsx scripts/generate-embedded-templates.ts",
81
84
  "lint": "biome check --write --error-on-warnings",
82
85
  "lint:ci": "biome check --error-on-warnings",
83
86
  "test": "pnpm lint && vitest run --coverage",
@@ -86,7 +89,7 @@
86
89
  "docula:help": "pnpm build && node bin/docula.js help",
87
90
  "generate-init-file": "tsx scripts/generate-init-file.ts",
88
91
  "website:build": "node bin/docula.js build -s ./site -o ./site/dist",
89
- "website:serve": "pnpm build && node bin/docula.js dev -s ./site -p 3333",
92
+ "website:dev": "pnpm build && node bin/docula.js dev -s ./site -p 3333",
90
93
  "website:mapi": "pnpm build && node bin/docula.js dev -s ./test/fixtures/multi-api-site -p 3333",
91
94
  "website:mega": "node bin/docula.js dev -s ./test/fixtures/mega-page-site",
92
95
  "website:mega:custom": "node bin/docula.js serve -s ./test/fixtures/mega-custom-template --watch",
@@ -10,6 +10,7 @@
10
10
  </head>
11
11
 
12
12
  <body>
13
+ {{> body-scripts }}
13
14
  {{#if githubPath}}
14
15
  <a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
15
16
  height="80" viewBox="0 0 250 250" style="color:#fff; position: absolute; top: 0; border: 0; right: 0;"
@@ -8,6 +8,7 @@
8
8
  </head>
9
9
 
10
10
  <body>
11
+ {{> body-scripts }}
11
12
  {{> singlepage/hero }}
12
13
  {{#if githubPath}}
13
14
  <a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
@@ -8,6 +8,7 @@
8
8
  </head>
9
9
 
10
10
  <body>
11
+ {{> body-scripts }}
11
12
  {{> singlepage/hero }}
12
13
  {{#if githubPath}}
13
14
  <a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
@@ -8,6 +8,7 @@
8
8
  </head>
9
9
 
10
10
  <body>
11
+ {{> body-scripts }}
11
12
  {{#if githubPath}}
12
13
  <a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
13
14
  height="80" viewBox="0 0 250 250" style="color:#fff; position: absolute; top: 0; border: 0; right: 0;"
@@ -8,6 +8,7 @@
8
8
  </head>
9
9
 
10
10
  <body>
11
+ {{> body-scripts }}
11
12
  {{#if githubPath}}
12
13
  <a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub"><svg width="80"
13
14
  height="80" viewBox="0 0 250 250" style="color:#fff; position: absolute; top: 0; border: 0; right: 0;"
@@ -0,0 +1,8 @@
1
+ {{#if googleTagManager}}
2
+ {{#unless isGtag}}
3
+ <!-- Google Tag Manager (noscript) -->
4
+ <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{googleTagManager}}"
5
+ height="0" width="0" style="display:none !important;visibility:hidden !important"></iframe></noscript>
6
+ <!-- End Google Tag Manager (noscript) -->
7
+ {{/unless}}
8
+ {{/if}}
@@ -1,3 +1,18 @@
1
+ {{#if googleTagManager}}
2
+ {{#if isGtag}}
3
+ <!-- Google tag (gtag.js) -->
4
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{googleTagManager}}"></script>
5
+ <script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','{{googleTagManager}}');</script>
6
+ {{else}}
7
+ <!-- Google Tag Manager -->
8
+ <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
9
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
10
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
11
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
12
+ })(window,document,'script','dataLayer','{{googleTagManager}}');</script>
13
+ <!-- End Google Tag Manager -->
14
+ {{/if}}
15
+ {{/if}}
1
16
  <meta charset="UTF-8" />
2
17
  <meta name="viewport" content="width=device-width, initial-scale=1" />
3
18
  {{> opengraph }}
@@ -10,6 +10,7 @@
10
10
  </head>
11
11
 
12
12
  <body>
13
+ {{> body-scripts }}
13
14
  {{> header-bar }}
14
15
 
15
16
  {{#if apiSpecs}}
@@ -8,6 +8,7 @@
8
8
  </head>
9
9
 
10
10
  <body>
11
+ {{> body-scripts }}
11
12
  {{> header-bar }}
12
13
  <div class="content">
13
14
  <main class="versions-container">
@@ -8,6 +8,7 @@
8
8
  </head>
9
9
 
10
10
  <body>
11
+ {{> body-scripts }}
11
12
  {{> header-bar }}
12
13
  <div class="content">
13
14
  <main class="versions-container">
@@ -68,12 +68,11 @@ body {
68
68
  gap: 12px;
69
69
  }
70
70
 
71
- .logo-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg); }
71
+ .logo-link { display: flex !important; align-items: center !important; text-decoration: none !important; color: var(--fg) !important; font-size: 18px !important; font-weight: 600 !important; }
72
72
  .logo__img {
73
73
  height: 75px;
74
74
  width: auto;
75
75
  }
76
- .logo__text { font-size: 18px; font-weight: 600; }
77
76
 
78
77
  .theme-button {
79
78
  border: 1px solid transparent;
@@ -773,6 +772,36 @@ pre:hover .copy-code-btn { opacity: 1; }
773
772
  color: #92400e;
774
773
  }
775
774
 
775
+ .changelog-tag-added {
776
+ background-color: rgba(140, 220, 0, 0.15);
777
+ color: #4a7a00;
778
+ }
779
+
780
+ .changelog-tag-improved {
781
+ background-color: rgba(59, 130, 246, 0.15);
782
+ color: #1d4ed8;
783
+ }
784
+
785
+ .changelog-tag-fixed {
786
+ background-color: rgba(245, 158, 11, 0.15);
787
+ color: #b45309;
788
+ }
789
+
790
+ .changelog-tag-removed {
791
+ background-color: rgba(239, 68, 68, 0.15);
792
+ color: #b91c1c;
793
+ }
794
+
795
+ .changelog-tag-deprecated {
796
+ background-color: rgba(156, 163, 175, 0.15);
797
+ color: #4b5563;
798
+ }
799
+
800
+ .changelog-tag-security {
801
+ background-color: rgba(168, 85, 247, 0.15);
802
+ color: #6d28d9;
803
+ }
804
+
776
805
  .changelog-entry-title::after {
777
806
  content: "";
778
807
  position: absolute;
@@ -8,6 +8,7 @@
8
8
  </head>
9
9
 
10
10
  <body>
11
+ {{> body-scripts }}
11
12
  {{> header-bar }}
12
13
  <div class="page-dropdown" id="page-dropdown">
13
14
  <button class="page-dropdown__toggle" id="page-dropdown-toggle">
@@ -9,6 +9,7 @@
9
9
  </head>
10
10
 
11
11
  <body>
12
+ {{> body-scripts }}
12
13
  {{#if githubPath}}
13
14
  <a href="https://github.com/{{ githubPath }}" class="github-corner" aria-label="View source on GitHub">
14
15
  <svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true">
@@ -0,0 +1,8 @@
1
+ {{#if googleTagManager}}
2
+ {{#unless isGtag}}
3
+ <!-- Google Tag Manager (noscript) -->
4
+ <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{googleTagManager}}"
5
+ height="0" width="0" style="display:none !important;visibility:hidden !important"></iframe></noscript>
6
+ <!-- End Google Tag Manager (noscript) -->
7
+ {{/unless}}
8
+ {{/if}}
@@ -6,7 +6,6 @@
6
6
  </button>
7
7
  <a href="{{#if homeUrl}}{{homeUrl}}{{else}}{{baseUrl}}/{{/if}}" class="logo-link">
8
8
  <img alt="{{siteTitle}}" class="logo__img" src="{{baseUrl}}/logo.svg">
9
- <span class="logo__text">{{siteTitle}}</span>
10
9
  </a>
11
10
  <nav class="header-bottom__nav">
12
11
  {{#if hasDocuments}}
@@ -1,3 +1,18 @@
1
+ {{#if googleTagManager}}
2
+ {{#if isGtag}}
3
+ <!-- Google tag (gtag.js) -->
4
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{googleTagManager}}"></script>
5
+ <script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','{{googleTagManager}}');</script>
6
+ {{else}}
7
+ <!-- Google Tag Manager -->
8
+ <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
9
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
10
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
11
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
12
+ })(window,document,'script','dataLayer','{{googleTagManager}}');</script>
13
+ <!-- End Google Tag Manager -->
14
+ {{/if}}
15
+ {{/if}}
1
16
  <meta charset="UTF-8">
2
17
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
3
18
  <meta name="description" content="{{#if description}}{{description}}{{else}}{{siteDescription}}{{/if}}">