-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCaddyfile
More file actions
85 lines (79 loc) · 2.12 KB
/
Caddyfile
File metadata and controls
85 lines (79 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Snippet to allow working with git checkouts of project sites that become
# toplevel directories.
(subproject) {
# Caddy doesn't know this is a directory, so redirect to trailing / as
# would usually happen for them.
redir /{args.0} /{args.0}/ permanent
handle_path /{args.0}/* {
root * {$SITE_DIR:sites}/{args.0}
try_files {path}.html {path}
file_server
}
}
# Set this variable in the environment when running in production.
{$SITE_ADDRESS::2015} {
root * .
import subproject basemap
import subproject cheatsheets
import subproject governance
import subproject matplotblog
import subproject mpl-altair
import subproject mpl-bench
import subproject mpl-third-party
# Place the brochure site at the top level.
import subproject mpl-brochure-site
@brochure file {
root {$SITE_DIR:sites}/mpl-brochure-site
try_files {path}.html {path}
}
rewrite / /mpl-brochure-site/index.html
rewrite @brochure /mpl-brochure-site{http.matchers.file.relative}
route /webhook {
webhook {
repo https://github.com/matplotlib/basemap.git
path {$SITE_DIR:sites}/basemap
branch gh-pages
}
webhook {
repo https://github.com/matplotlib/cheatsheets.git
path {$SITE_DIR:sites}/cheatsheets
branch gh-pages
}
webhook {
repo https://github.com/matplotlib/governance.git
path {$SITE_DIR:sites}/governance
branch gh-pages
}
webhook {
repo https://github.com/matplotlib/matplotblog.git
path {$SITE_DIR:sites}/matplotblog
branch gh-pages
}
webhook {
repo https://github.com/matplotlib/mpl-altair.git
path {$SITE_DIR:sites}/mpl-altair
branch gh-pages
}
webhook {
repo https://github.com/matplotlib/mpl-bench.git
path {$SITE_DIR:sites}/mpl-bench
branch gh-pages
}
webhook {
repo https://github.com/matplotlib/mpl-third-party.git
path {$SITE_DIR:sites}/mpl-third-party
branch gh-pages
}
webhook {
repo https://github.com/matplotlib/mpl-brochure-site.git
path {$SITE_DIR:sites}/mpl-brochure-site
branch gh-pages
}
}
# Finally try any of the versioned docs.
handle {
root * {$SITE_DIR:sites}/matplotlib.github.com
try_files {path}.html {path}
file_server
}
}