Add snippets.d auto-import for modular config

This commit is contained in:
Azat
2026-02-02 22:20:28 +01:00
parent 4821a20380
commit 79ea29b7c5
3 changed files with 51 additions and 8 deletions

View File

@@ -42,6 +42,17 @@ Create a `Caddyfile` in your skill's directory or set `CADDYFILE_PATH` environme
# }
```
## Auto-Import from Skills
Other skills can drop `.caddy` snippets into `caddy/snippets.d/` and they'll be automatically merged at startup.
Example: If `ttyd` skill is present with `TTYD_DOMAIN=terminal.example.com`, it creates:
```
caddy/snippets.d/ttyd.caddy
```
Caddy's `run.sh` merges all snippets into the config before starting.
## Usage
This skill is typically used as a dependency by other skills that need a web server: