about summary refs log tree commit diff
path: root/ops/modules/www/tvl.fyi.nix
diff options
context:
space:
mode:
Diffstat (limited to 'ops/modules/www/tvl.fyi.nix')
-rw-r--r--ops/modules/www/tvl.fyi.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/ops/modules/www/tvl.fyi.nix b/ops/modules/www/tvl.fyi.nix
index cea29adbe05f..cd7c496a90e0 100644
--- a/ops/modules/www/tvl.fyi.nix
+++ b/ops/modules/www/tvl.fyi.nix
@@ -25,6 +25,14 @@
         location ~* \.(webp|woff2)$ {
           add_header Cache-Control "public, max-age=31536000";
         }
+
+        location /blog {
+          if ($request_uri ~ ^/(.*)\.html$) {
+            return 302 /$1;
+          }
+
+          try_files $uri $uri.html $uri/ =404;
+        }
       '';
     };
   };