File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed
Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1+ /sites /
Original file line number Diff line number Diff line change 66 redir /{args.0} /{args.0} / permanent
77
88 handle_path /{args.0} /* {
9- root * {args.0}
9+ root * {$SITE_DIR:sites}/ { args.0}
1010 file_server
1111 }
1212}
2626 # Place the brochure site at the top level.
2727 import subproject mpl-brochure-site
2828 @brochure file {
29- root mpl-brochure-site
30- try_files {path}
29+ root {$SITE_DIR:sites}/mpl-brochure-site
3130 }
3231 rewrite / /mpl-brochure-site/index.html
3332 rewrite @brochure /mpl-brochure-site {http.matchers.file.relative}
3433
3534 # Finally try any of the versioned docs.
3635 handle {
37- root * matpl otlib.github.com
36+ root * {$SITE_DIR:sites} / matplotlib.github.com
3837 file_server
3938 }
4039}
Original file line number Diff line number Diff line change 1+ RUNTIME ?= podman
2+ CADDY_VERSION ?= 2.4.6
3+
4+ serve :
5+ mkdir -p sites
6+ $(RUNTIME ) run --rm -it \
7+ -v $$ PWD/sites:/srv:Z \
8+ -v $$ PWD/Caddyfile:/etc/caddy/Caddyfile:ro,Z \
9+ -e SITE_DIR=/srv \
10+ -p 2015:2015 \
11+ docker.io/library/caddy:$(CADDY_VERSION ) \
12+ caddy run --config /etc/caddy/Caddyfile --watch
13+
14+ fmt :
15+ $(RUNTIME ) run --rm -it \
16+ -v $$ PWD/Caddyfile:/etc/caddy/Caddyfile:Z \
17+ docker.io/library/caddy:$(CADDY_VERSION ) \
18+ caddy fmt --overwrite /etc/caddy/Caddyfile
You can’t perform that action at this time.
0 commit comments