all repos — website @ 4c80a0b2acb578e5a8bfe311591a85ac19527220

My website

Use netlify for redirects
Alan Pearce alan@alanpearce.eu
Fri, 19 Apr 2024 22:51:03 +0200
commit

4c80a0b2acb578e5a8bfe311591a85ac19527220

parent

0d1de2258553f16c9cd492f02f591c4d5457f958

3 files changed, 18 insertions(+), 0 deletions(-)

jump to
M .gitignore.gitignore
@@ -173,3 +173,6 @@ /.compressstamp /.formatstamp
 /server
 /result
+
+# Local Netlify folder
+.netlify
M flake.nixflake.nix
@@ -36,6 +36,7 @@ gotools                 go-tools
                 gomod2nix.packages.${system}.default
                 gci
+                netlify-cli
                 flyctl
               ]
               ++ (import ./nix/scripts.nix {
A netlify/netlify.toml
@@ -0,0 +1,14 @@+[build]
+  base = "netlify"
+  publish = "."
+
+[[redirects]]
+  from = "*"
+  to = "https://alanpearce.eu/:splat"
+  status = 301
+  force = true
+
+[[headers]]
+  for = "/*"
+  [headers.values]
+    cache-control = "max-age=86400"