Skip to content

Redirect old top-level files to versioned docs #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Replace deprecated Caddyfile syntax
This warns for every call to the `subproject` snippet.
  • Loading branch information
QuLogic committed Oct 9, 2024
commit 8193faece17e935f228dc40f6b3e6dfcf22d82fc
6 changes: 3 additions & 3 deletions templates/Caddyfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
(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
redir /{args[0]} /{args[0]}/ permanent

handle_path /{args.0}/* {
root * {{ caddy.site_dir }}/{args.0}
handle_path /{args[0]}/* {
root * {{ caddy.site_dir }}/{args[0]}
try_files {path}.html {path}
file_server {
hide .git
Expand Down