File tree 2 files changed +25
-21
lines changed
2 files changed +25
-21
lines changed Original file line number Diff line number Diff line change 8
8
site_dir : " /usr/share/caddy"
9
9
tls_config : " tls /etc/caddy/tls/cert.pem /etc/caddy/tls/privkey.pem"
10
10
repos :
11
- - mpl-brochure-site
12
- - matplotlib.github.com
13
- - basemap
14
- - cheatsheets
15
- - cycler
16
- - devdocs
17
- - governance
18
- - ipympl
19
- - matplotblog
20
- - mpl-bench
21
- - mpl-gui
22
- - mpl-sphinx-theme
23
- - mpl-third-party
24
- - pytest-mpl
25
- - data-prototype
11
+ mpl-brochure-site :
12
+ matplotlib.github.com :
13
+ basemap :
14
+ cheatsheets :
15
+ cycler :
16
+ devdocs :
17
+ governance :
18
+ ipympl :
19
+ matplotblog :
20
+ mpl-bench :
21
+ mpl-gui :
22
+ mpl-sphinx-theme :
23
+ mpl-third-party : thirdpartypackages
24
+ pytest-mpl :
25
+ data-prototype :
26
26
vars_files :
27
27
- files/webhook_vars.yml
28
28
tasks :
162
162
mode : 0755
163
163
owner : caddy
164
164
group : caddy
165
- loop : " {{ repos }}"
165
+ loop : " {{ repos.keys() }}"
166
166
167
167
- name : Clone Git repositories
168
168
become : true
174
174
{{
175
175
(item == 'matplotlib.github.com') | ternary('main', 'gh-pages')
176
176
}}
177
- loop : " {{ repos }}"
177
+ loop : " {{ repos.keys() }}"
178
178
179
179
# Caddy server setup
180
180
# ##################
Original file line number Diff line number Diff line change 3
3
(subproject) {
4
4
# Caddy doesn't know this is a directory, so redirect to trailing / as
5
5
# would usually happen for them.
6
- redir /{args[0 ]} /{args[0 ]}/ permanent
6
+ redir /{args[1 ]} /{args[1 ]}/ permanent
7
7
8
- handle_path /{args[0 ]}/* {
8
+ handle_path /{args[1 ]}/* {
9
9
root * {{ caddy.site_dir }}/{args[0]}
10
10
try_files {path}.html {path}
11
11
file_server {
@@ -70,8 +70,8 @@ http://{{ caddy.addresses.main }}, http://{{ ansible_fqdn }} {
70
70
71
71
root * {{ caddy.site_dir }}
72
72
73
- {% for site in repos %}
74
- import subproject {{ site }}
73
+ {% for site , path in repos . items () %}
74
+ import subproject {{ site }} {{ path | default(site, true) }}
75
75
{% endfor %}
76
76
77
77
# Hide mpl-altair until the site is fixed.
@@ -96,6 +96,10 @@ http://{{ caddy.addresses.main }}, http://{{ ansible_fqdn }} {
96
96
}
97
97
}
98
98
99
+ # Redirect the repo-named third-party packages path to the more-generic path.
100
+ redir /3pp /thirdpartypackages/
101
+ redir /mpl-third-party/* /thirdpartypackages/{path}
102
+
99
103
# Place the brochure site at the top level.
100
104
@brochure file {
101
105
root {{ caddy.site_dir }}/mpl-brochure-site
You can’t perform that action at this time.
0 commit comments