docs: update README.md with new content
This commit is contained in:
parent
c1fefcc766
commit
467092db1f
11 changed files with 133 additions and 60 deletions
|
|
@ -40,3 +40,47 @@ Hourly JSON can sit next to the HTML once the timer is installed on koopa
|
|||
|
||||
Hourly builder belongs in **kal** (this tree). Do **not** put
|
||||
`scripts/branch-status-hourly.py` back into tdpd.
|
||||
|
||||
## Sticky cascade bar
|
||||
|
||||
Stock Caddy `templates` renders `{% include "_cascade/bar.html" . %}` on each
|
||||
HTML page. The include path has no leading slash. The dot passes the request,
|
||||
so `.Req.URL.Path` marks the active link with `class="is-active"` and
|
||||
`aria-current="page"`. Delimiters are `{%` `%}`, so a later `{{ }}` in real
|
||||
dossier HTML stays literal.
|
||||
|
||||
The bar lists cascade `/` plus the five branch paths. Seeded tips match
|
||||
`branch-status.json`. `/_cascade/bar.js` refreshes `[data-tip]` from that JSON
|
||||
(`cache: no-store`). CSS is `/_cascade/bar.css` (`position: sticky`).
|
||||
|
||||
Enable templates before rsync. A page without the include does not grow the
|
||||
bar. `{%` without the templates directive is shown as raw text.
|
||||
|
||||
Templates apply is **host-local on koopa** (`~/bin/apply-dossiers-ngi-templates.sh`),
|
||||
not tracked in this repo. It edits `~/koopa-caddy/Caddyfile` only (this host;
|
||||
keeps `header Alt-Svc "clear"` and any `basic_auth`; leaves `.2` / `.3`
|
||||
untouched). Then reload with the usual home→`/etc` helper:
|
||||
|
||||
```bash
|
||||
bash ~/bin/apply-dossiers-ngi-templates.sh
|
||||
sudo ~/bin/caddy-apply
|
||||
```
|
||||
|
||||
The stanza body for hand-check / re-seed lives in
|
||||
`scripts/dossiers-ngi/caddy-dossiers-ngi.snippet`.
|
||||
`scripts/caddy/caddy-apply.sh --snippet` leaves an existing block unchanged.
|
||||
Leave `scripts/caddy/apply-goa-wdGet-full-replace.sh` and
|
||||
`scripts/caddy/apply-dossiers-ngi-basicauth.sh` unused. No response-body
|
||||
replace plugin.
|
||||
|
||||
After validate and reload succeed, rsync from the laptop (Freigabe):
|
||||
|
||||
```bash
|
||||
rsync -avz --delete --exclude .DS_Store \
|
||||
"$HOME/git/admin-logs/local/koopa-admin-log/sites/dossiers.ngi.hacktivism.ch/" \
|
||||
hernani@koopa:/var/www/monitoring-sites/dossiers.ngi.hacktivism.ch/
|
||||
```
|
||||
|
||||
`--delete` removes `_cascade/` on the server when the source tree is an older
|
||||
copy. The bar does not finish the dossier site. This section does not install
|
||||
the hourly timer.
|
||||
|
|
|
|||
19
scripts/dossiers-ngi/caddy-dossiers-ngi.snippet
Normal file
19
scripts/dossiers-ngi/caddy-dossiers-ngi.snippet
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Stanza body for dossiers.ngi.hacktivism.ch only (hand-check / re-seed).
|
||||
# Templates apply is host-local on koopa (not in this repo):
|
||||
# bash ~/bin/apply-dossiers-ngi-templates.sh
|
||||
# sudo ~/bin/caddy-apply
|
||||
#
|
||||
# Keep the existing line: header Alt-Svc "clear"
|
||||
# Keep any existing basic_auth in that same block.
|
||||
# scripts/caddy/caddy-apply.sh --snippet reports an existing block and
|
||||
# does not merge these lines. Leave that script unused for this change.
|
||||
# Leave scripts/caddy/apply-goa-wdGet-full-replace.sh unused.
|
||||
# Leave scripts/caddy/apply-dossiers-ngi-basicauth.sh unused.
|
||||
# Stock Caddy templates only. No replace-response plugin.
|
||||
#
|
||||
# Tab-indented lines inserted after header Alt-Svc:
|
||||
|
||||
templates {
|
||||
mime text/html
|
||||
between "{%" "%}"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue