-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathREADME.md.in
More file actions
91 lines (64 loc) · 3 KB
/
README.md.in
File metadata and controls
91 lines (64 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
A fully incremental static site generator.
## Philosophy
**Dev mode = Production mode.** Unlike other static site generators that take shortcuts
in development (skipping minification, using original asset paths, etc.), dodeca serves
exactly what you'll get in production: cache-busted URLs, minified HTML, subsetted fonts,
responsive images—the works. Even font subsetting runs in dev!
This is possible because dodeca uses picante for incremental computation. Every
transformation is a cached query. Change a file and only the affected queries re-run.
First page load builds what's needed; subsequent requests are instant.
**Custom template engine.** Dodeca includes its own Jinja-like template engine. This gives
you the power of a real language (conditionals, loops, variable interpolation) without
the complexity of learning a new syntax. The engine includes rich diagnostics with
line/column information for template errors.
**Plugin architecture.** Dodeca's plugin system (via the `plugcard` crate) allows extending
the build pipeline without modifying the core. Image optimization, CSS processing, syntax
highlighting, and more can be plugged in independently.
## Getting Started
Install dodeca:
The recommended way to install dodeca is the install script, which fetches prebuilt binaries from object storage. Releases ship the `ddc` binary plus a set of helper binaries (`ddc-cell-*`) used for things like image processing, Sass, search indexing, etc.
```bash
curl --proto '=https' --tlsv1.2 -LsSf https://bearcove-dist.s3.fr-par.scw.cloud/dodeca/install.sh | sh
```
Supported by the installer:
- macOS (Apple Silicon / `arm64`)
- Linux (`x86_64`)
After that, you can create a new site:
```bash
ddc init my-site
cd my-site
ddc serve
```
This starts a development server at `http://localhost:8080` with live reload.
## Key Features
- **Incremental builds**: Only affected files are re-processed on changes
- **Cache-busted URLs**: Assets get unique names based on content hash
- **Image optimization**: Built-in image processing with responsive variants
- **Font subsetting**: Automatically subset fonts to used characters
- **HTML minification**: Minify HTML in production builds
- **Template engine**: Powerful, easy-to-learn Jinja-like templates
- **Code execution**: Execute code samples and capture output
- **Link checking**: Verify all links in your site
- **Extensible**: Plugin system for custom transformations
## Structure
The dodeca workspace includes:
- **dodeca**: Main SSG binary (`ddc` CLI)
- **gingembre**: Template engine with rich diagnostics
- **plugcard**: Plugin system for extending the build pipeline
- **dodeca-\***: Individual plugins for various transformations
- **livereload-client**: WASM client for live reload in development
## Development
Build everything:
```bash
cargo xtask build
```
Run tests:
```bash
cargo test --workspace
```
Build the documentation:
```bash
cargo doc --workspace --no-deps --open
```
## Contributing
Contributions are welcome! Please open issues and pull requests on GitHub.