docula 1.14.0 → 2.1.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 +19 -5
- package/dist/docula.d.ts +8 -0
- package/dist/docula.js +527 -50
- package/package.json +22 -21
- package/templates/classic/includes/header.hbs +1 -1
- package/templates/modern/css/styles.css +264 -8
- package/templates/modern/includes/header-bar.hbs +8 -0
- package/templates/modern/includes/header.hbs +1 -1
- package/templates/modern/includes/scripts.hbs +2 -5
- package/templates/modern/includes/search.hbs +46 -0
- package/templates/modern/js/search.js +436 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# Features
|
|
12
12
|
* No configuration required. Just setup the folder structure with a logo, favicon, and css file.
|
|
13
13
|
* Builds a static website that can be hosted anywhere.
|
|
14
|
-
*
|
|
14
|
+
* Built-in, fully client-side search (⌘K / Ctrl K) with a keyboard-navigable modal and deep links to matching headings — no external service required.
|
|
15
15
|
* Support for single page with readme or multiple markdown pages in a docs folder.
|
|
16
16
|
* Full TypeScript support with typed configuration and IDE autocompletion.
|
|
17
17
|
* For more complex projects easily add a `docula.config.ts` (TypeScript) or `docula.config.mjs` (JavaScript) file to customize the build process with lifecycle hooks and `DoculaConsole` logging.
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
- [Standalone Binary](#standalone-binary)
|
|
49
49
|
- [Open Source Examples](#open-source-examples)
|
|
50
50
|
- [Code of Conduct and Contributing](#code-of-conduct-and-contributing)
|
|
51
|
+
- [Security](#security)
|
|
51
52
|
- [License - MIT](#license)
|
|
52
53
|
|
|
53
54
|
# Standalone Binary
|
|
@@ -56,7 +57,7 @@ You can build Docula as a standalone binary that runs without Node.js installed.
|
|
|
56
57
|
|
|
57
58
|
## Building the Binary
|
|
58
59
|
|
|
59
|
-
Requires Node.js >=
|
|
60
|
+
Requires Node.js >= 25.7.0 to build (the resulting binary does not need Node.js to run). The build uses [tsdown's `exe` option](https://tsdown.dev/options/exe), which wraps Node.js's [Single Executable Applications](https://nodejs.org/api/single-executable-applications.html) feature added in Node 25.7.
|
|
60
61
|
|
|
61
62
|
```bash
|
|
62
63
|
pnpm install
|
|
@@ -69,7 +70,7 @@ This produces a platform-specific binary at `dist/docula` (or `dist/docula.exe`
|
|
|
69
70
|
|
|
70
71
|
1. Embeds all built-in templates (modern, classic) into the bundle as base64
|
|
71
72
|
2. Bundles all source code and dependencies into a single CJS file via [tsdown](https://tsdown.dev/)
|
|
72
|
-
3. Uses tsdown's built-in `exe` option to create a Node.js SEA binary
|
|
73
|
+
3. Uses tsdown's built-in `exe` option to create a Node.js SEA binary — blob generation, injection, and (on macOS hosts) ad-hoc code signing are handled automatically
|
|
73
74
|
|
|
74
75
|
## Testing the Binary
|
|
75
76
|
|
|
@@ -91,13 +92,12 @@ After building, test it locally:
|
|
|
91
92
|
|
|
92
93
|
## Cross-Platform Binaries
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
The CI workflow (`.github/workflows/build-binaries.yaml`) builds each platform natively on its own runner. Native builds avoid the cross-compile signing pitfall on Apple Silicon, where unsigned Mach-O binaries are killed on launch.
|
|
95
96
|
|
|
96
97
|
| Platform | Runner | Artifact |
|
|
97
98
|
|---|---|---|
|
|
98
99
|
| Linux x64 | `ubuntu-latest` | `docula-linux-x64` |
|
|
99
100
|
| macOS ARM64 | `macos-latest` | `docula-macos-arm64` |
|
|
100
|
-
| macOS x64 | `macos-13` | `docula-macos-x64` |
|
|
101
101
|
| Windows x64 | `windows-latest` | `docula-windows-x64` |
|
|
102
102
|
|
|
103
103
|
Binaries are uploaded as build artifacts on every run and attached to GitHub releases automatically.
|
|
@@ -113,5 +113,19 @@ See Docula in action with these open source projects that use it for their docum
|
|
|
113
113
|
# Code of Conduct and Contributing
|
|
114
114
|
[Code of Conduct](CODE_OF_CONDUCT.md) and [Contributing](CONTRIBUTING.md) guidelines.
|
|
115
115
|
|
|
116
|
+
# Security
|
|
117
|
+
We take the security of Docula seriously and have multiple layers of protection in place:
|
|
118
|
+
|
|
119
|
+
- **Aikido Security**: Continuous scanning of our codebase, dependencies, and infrastructure for vulnerabilities. Review our public audit report by clicking the badge above.
|
|
120
|
+
- **Pull Request Scans**: Every pull request against `main` is automatically scanned for security issues before merging.
|
|
121
|
+
- **CodeQL Analysis**: GitHub CodeQL static analysis runs on every push and pull request targeting `main`.
|
|
122
|
+
- **npm Package Provenance**: Releases are published with [npm provenance](https://docs.npmjs.com/generating-provenance-statements) for cryptographically verifiable links to source and build.
|
|
123
|
+
|
|
124
|
+
<a href="https://app.aikido.dev/audit-report/external/lZAT2DfBsT11ZQfpYwClKi6s/request" target="_blank" rel="noopener noreferrer">
|
|
125
|
+
<img src="https://app.aikido.dev/assets/badges/full-light-theme.svg" alt="Aikido Security Audit Report" height="40" />
|
|
126
|
+
</a>
|
|
127
|
+
|
|
128
|
+
For full details, see [SECURITY.md](SECURITY.md) or our [Security Guidelines](https://docula.org/docs/project-guidelines/security/).
|
|
129
|
+
|
|
116
130
|
# License
|
|
117
131
|
MIT © [Jared Wray](https://jaredwray.com)
|
package/dist/docula.d.ts
CHANGED
|
@@ -203,6 +203,7 @@ type DoculaData = {
|
|
|
203
203
|
googleTagManager?: string;
|
|
204
204
|
isGtag?: boolean;
|
|
205
205
|
enableLlmsTxt?: boolean;
|
|
206
|
+
enableSearch?: boolean;
|
|
206
207
|
hasFeed?: boolean;
|
|
207
208
|
lastModified?: string;
|
|
208
209
|
homeUrl?: string;
|
|
@@ -215,6 +216,7 @@ type DoculaData = {
|
|
|
215
216
|
changelogUrl: string;
|
|
216
217
|
editPageUrl?: string;
|
|
217
218
|
openGraph?: DoculaOpenGraph;
|
|
219
|
+
faviconUrl?: string;
|
|
218
220
|
};
|
|
219
221
|
type DoculaTemplates = {
|
|
220
222
|
home: string;
|
|
@@ -345,6 +347,11 @@ declare class DoculaOptions {
|
|
|
345
347
|
* When true, generates llms.txt and llms-full.txt files for the built site.
|
|
346
348
|
*/
|
|
347
349
|
enableLlmsTxt: boolean;
|
|
350
|
+
/**
|
|
351
|
+
* When true, generates a search index (search-index.json) and renders the
|
|
352
|
+
* search UI in templates that support it. Set to false to disable search.
|
|
353
|
+
*/
|
|
354
|
+
enableSearch: boolean;
|
|
348
355
|
/**
|
|
349
356
|
* Override the default theme toggle. By default the site follows the system
|
|
350
357
|
* preference. Set to "light" or "dark" to use that theme when no user
|
|
@@ -468,6 +475,7 @@ declare class DoculaBuilder {
|
|
|
468
475
|
buildChangelogFeedJson(data: DoculaData): Promise<void>;
|
|
469
476
|
buildChangelogLatestFeedJson(data: DoculaData): Promise<void>;
|
|
470
477
|
buildLlmsFiles(data: DoculaData): Promise<void>;
|
|
478
|
+
buildSearchIndex(data: DoculaData): Promise<void>;
|
|
471
479
|
resolveOpenGraphData(data: DoculaData, pageUrl: string, pageData?: Partial<DoculaDocument> & {
|
|
472
480
|
previewImage?: string;
|
|
473
481
|
preview?: string;
|