Commit Graph

4 Commits

Author SHA1 Message Date
fab
58919dc6ae docs: publish the docs tree as a VitePress site on GitHub Pages (#124)
Renders the existing docs/ tree as a searchable site. The Markdown stays the
source of truth and stays readable on GitHub; this adds a rendering layer.

Local MiniSearch, bundled Inter fonts and inline icon data URIs, so the
published site makes no third-party requests -- consistent with #98.

The build surfaced four latent problems in the existing docs: 88 links
pointing outside docs/, a link to the repo root in testing.md, literal
{{ }} in the SSTI section of attacks.md being parsed as Vue interpolation,
and 13 unhighlighted Caddyfile blocks.

docs/README.md becomes docs/index.md, since VitePress maps both to the same
route; GitHub no longer renders a landing page when browsing docs/.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 12:50:57 +02:00
Fabrizio Salmi
69bf6d0ef1 docs: rewrite README and docs for 1:1 accuracy with codebase, bump to v0.3.1
Full rewrite of README.md, MODULE.md, caddyfile.example, and docs/ to
match the actual code in caddywaf.go, handler.go, config.go, rules.go,
ratelimiter.go, blacklist.go, geoip.go, request.go, and types.go.

Notable corrections:
- docs/configuration.md now lists every directive recognised by the
  Caddyfile parser (directiveHandlers in config.go) and separates
  JSON-only fields (MaxRequestBodySize, GeoIPFailOpen,
  Tor.CustomTORExitNodeURL).
- docs/rules.md documents the JSON tag mismatch on Rule.Action: the
  struct tag is "mode" while the bundled rule files commonly use
  "action".
- docs/ratelimit.md corrects the match_all_paths semantics to match
  ratelimiter.go (true rate-limits all paths; false + non-empty paths
  rate-limits only matching paths; false + empty paths is a no-op).
- docs/dynamicupdates.md adds a reload matrix distinguishing what
  fsnotify reloads from what requires caddy reload.
- docs/metrics.md aligns the JSON schema with handleMetricsRequest and
  notes that all counters are process-local.
- docs/prometheus.md uses Gauge.set instead of Counter.inc to match the
  process-local monotonic counter semantics.
- caddyfile.example no longer references inexistent directives
  (country_block, custom_response block form).

Also adds the missing CHANGELOG entry for v0.3.0 (duplicate response
headers fix and CIDR support in IP blacklist) and removes emoji from
all user-facing documentation.
2026-04-26 23:38:39 +02:00
fabriziosalmi
21427cd555 docs updated. 2025-01-19 18:58:27 +01:00
fabriziosalmi
91911c06d9 docs initial moving 2025-01-19 10:58:39 +01:00