feat: allow having nice links without .html
All checks were successful
Build_Deploy / linter (push) Successful in 6s
Build_Deploy / build (push) Successful in 3m46s
Build_Deploy / deploy_dns (push) Successful in 44s
Build_Deploy / deploy_active (active) (push) Successful in 50s
Build_Deploy / deploy_active (active-core) (push) Successful in 1m25s
Build_Deploy / deploy_active (active-ext) (push) Successful in 30s
All checks were successful
Build_Deploy / linter (push) Successful in 6s
Build_Deploy / build (push) Successful in 3m46s
Build_Deploy / deploy_dns (push) Successful in 44s
Build_Deploy / deploy_active (active) (push) Successful in 50s
Build_Deploy / deploy_active (active-core) (push) Successful in 1m25s
Build_Deploy / deploy_active (active-ext) (push) Successful in 30s
This commit is contained in:
parent
692ed8e3f0
commit
2d95094fbd
1 changed files with 9 additions and 0 deletions
|
@ -41,6 +41,15 @@ in {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = "skynet";
|
useACMEHost = "skynet";
|
||||||
root = "${inputs.skynet_website_renew.defaultPackage."x86_64-linux"}/wiki";
|
root = "${inputs.skynet_website_renew.defaultPackage."x86_64-linux"}/wiki";
|
||||||
|
# https://stackoverflow.com/a/38238001/11964934
|
||||||
|
extraConfig = ''
|
||||||
|
location / {
|
||||||
|
if ($request_uri ~ ^/(.*)\.html) {
|
||||||
|
return 302 /$1;
|
||||||
|
}
|
||||||
|
try_files $uri $uri.html $uri/ =404;
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# redirect old links to the new wiki
|
# redirect old links to the new wiki
|
||||||
|
|
Loading…
Reference in a new issue