feat(host/luna): strip .html extension for blog

This commit is contained in:
Price Hiller 2024-07-26 12:08:18 -05:00
parent 717dea38bb
commit f497d0dfe2
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -22,6 +22,12 @@
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
root = inputs.blog.packages.${pkgs.system}.default; root = inputs.blog.packages.${pkgs.system}.default;
locations."/".extraConfig = ''
if ($request_uri ~ ^/(.*)\.html(\?|$)) {
return 302 /$1;
}
try_files $uri $uri.html $uri/ =404;
'';
locations."/".index = "home.html"; locations."/".index = "home.html";
}; };
} }