Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01bba94

Browse files
committed
Rewrite foo as foo.html if possible
This seems to happen on GitHub Pages, and we have some links that point to pages in that manner.
1 parent 7d6eb50 commit 01bba94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Caddyfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
handle_path /{args.0}/* {
99
root * {$SITE_DIR:sites}/{args.0}
10+
try_files {path}.html {path}
1011
file_server
1112
}
1213
}
@@ -27,13 +28,15 @@
2728
import subproject mpl-brochure-site
2829
@brochure file {
2930
root {$SITE_DIR:sites}/mpl-brochure-site
31+
try_files {path}.html {path}
3032
}
3133
rewrite / /mpl-brochure-site/index.html
3234
rewrite @brochure /mpl-brochure-site{http.matchers.file.relative}
3335

3436
# Finally try any of the versioned docs.
3537
handle {
3638
root * {$SITE_DIR:sites}/matplotlib.github.com
39+
try_files {path}.html {path}
3740
file_server
3841
}
3942
}

0 commit comments

Comments
 (0)