refactor(web): Serve static assets to //web/homepage
Shuffles around the nginx locations that are served to ensure that all static content will be served from tazj.in/static (including for the blog).
This commit is contained in:
parent
e6002f95cd
commit
39854d71b2
3 changed files with 10 additions and 28 deletions
|
|
@ -6,7 +6,7 @@
|
|||
writeText, writeShellScriptBin, nginx, lib,
|
||||
|
||||
# website content
|
||||
blog
|
||||
blog, website
|
||||
}:
|
||||
|
||||
let
|
||||
|
|
@ -44,15 +44,13 @@ let
|
|||
|
||||
server {
|
||||
listen 8080 default_server;
|
||||
root ${blog.rendered};
|
||||
|
||||
location /static {
|
||||
alias ${blog.static}/;
|
||||
}
|
||||
root ${website};
|
||||
|
||||
${oldRedirects}
|
||||
|
||||
location / {
|
||||
location /blog {
|
||||
alias ${blog.rendered};
|
||||
|
||||
if ($request_uri ~ ^/(.*)\.html$) {
|
||||
return 302 /$1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue