File tree 3 files changed +22
-4
lines changed
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 6
6
redir /{args.0} /{args.0} / permanent
7
7
8
8
handle_path /{args.0} /* {
9
- root * {args.0}
9
+ root * {$SITE_DIR:sites}/ { args.0}
10
10
file_server
11
11
}
12
12
}
26
26
# Place the brochure site at the top level.
27
27
import subproject mpl-brochure-site
28
28
@brochure file {
29
- root mpl-brochure-site
30
- try_files {path}
29
+ root {$SITE_DIR:sites}/mpl-brochure-site
31
30
}
32
31
rewrite / /mpl-brochure-site/index.html
33
32
rewrite @brochure /mpl-brochure-site {http.matchers.file.relative}
34
33
35
34
# Finally try any of the versioned docs.
36
35
handle {
37
- root * matpl otlib.github.com
36
+ root * {$SITE_DIR:sites} / matplotlib.github.com
38
37
file_server
39
38
}
40
39
}
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