File tree Expand file tree Collapse file tree 2 files changed +25
-21
lines changed Expand file tree Collapse file tree 2 files changed +25
-21
lines changed Original file line number Diff line number Diff line change 88 site_dir : " /usr/share/caddy"
99 tls_config : " tls /etc/caddy/tls/cert.pem /etc/caddy/tls/privkey.pem"
1010 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 :
2626 vars_files :
2727 - files/webhook_vars.yml
2828 tasks :
162162 mode : 0755
163163 owner : caddy
164164 group : caddy
165- loop : " {{ repos }}"
165+ loop : " {{ repos.keys() }}"
166166
167167 - name : Clone Git repositories
168168 become : true
174174 {{
175175 (item == 'matplotlib.github.com') | ternary('main', 'gh-pages')
176176 }}
177- loop : " {{ repos }}"
177+ loop : " {{ repos.keys() }}"
178178
179179 # Caddy server setup
180180 # ##################
Original file line number Diff line number Diff line change 33(subproject) {
44 # Caddy doesn't know this is a directory, so redirect to trailing / as
55 # would usually happen for them.
6- redir /{args[0 ]} /{args[0 ]}/ permanent
6+ redir /{args[1 ]} /{args[1 ]}/ permanent
77
8- handle_path /{args[0 ]}/* {
8+ handle_path /{args[1 ]}/* {
99 root * {{ caddy.site_dir }}/{args[0]}
1010 try_files {path}.html {path}
1111 file_server {
@@ -70,8 +70,8 @@ http://{{ caddy.addresses.main }}, http://{{ ansible_fqdn }} {
7070
7171 root * {{ caddy.site_dir }}
7272
73- {% for site in repos %}
74- import subproject {{ site }}
73+ {% for site , path in repos . items () %}
74+ import subproject {{ site }} {{ path | default(site, true) }}
7575{% endfor %}
7676
7777 # Hide mpl-altair until the site is fixed.
@@ -96,6 +96,10 @@ http://{{ caddy.addresses.main }}, http://{{ ansible_fqdn }} {
9696 }
9797 }
9898
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+
99103 # Place the brochure site at the top level.
100104 @brochure file {
101105 root {{ caddy.site_dir }}/mpl-brochure-site
You can’t perform that action at this time.
0 commit comments