From 10554447ea9d81c6bcbaea6844c1eeaf94a5ddda Mon Sep 17 00:00:00 2001 From: Vaishnav88sk Date: Thu, 9 Apr 2026 13:46:26 +0530 Subject: [PATCH] feat: add netlify.toml for PR deploy previews Signed-off-by: Vaishnav88sk --- netlify.toml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..bca5d213 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,47 @@ +[build] + publishDir = "public" + +[build.environment] + HUGO_VERSION = "0.123.0" + NODE_VERSION = "20" + +[[redirects]] + from = "/docs/*" + to = "/documentation/:splat" + status = 301 + +[[redirects]] + from = "/blog/*" + to = "/blog/:splat" + status = 301 + +[[headers]] + for = "/*" + [headers.values] + X-Frame-Options = "DENY" + X-Content-Type-Options = "nosniff" + Referrer-Policy = "strict-origin-when-cross-origin" + +[[headers]] + for = "*.js" + [headers.values] + Cache-Control = "public, max-age=31536000" + +[[headers]] + for = "*.css" + [headers.values] + Cache-Control = "public, max-age=31536000" + +[[headers]] + for = "*.png" + [headers.values] + Cache-Control = "public, max-age=2592000" + +[context.production.environment] + HUGO_ENV = "production" + +[context.deploy-preview.environment] + HUGO_ENV = "preview" + +[context.branch-deploy.environment] + HUGO_ENV = "staging"