diff --git a/iles.config.ts b/iles.config.ts index 21cbe586..277ef9c2 100644 --- a/iles.config.ts +++ b/iles.config.ts @@ -92,7 +92,7 @@ export default defineConfig({ }, turbo: false, // turbo messes up posthog's pageview tracking vite: { - mode: process.env["ENV"] === "production" ? "production" : "development", + mode, server: { port: 3000, open: true, diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..09f68be3 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,93 @@ +[build] +command = "pnpm run build" +publish = "dist" + +[context.production] +environment = { ENV = "production" } + +[[redirects]] +from = "/quick-start" +to = "/start.html" +status = 301 + +[[redirects]] +from = "/quickstart" +to = "/start.html" +status = 301 + +[[redirects]] +from = "/get-started" +to = "/start.html" +status = 301 + +[[redirects]] +from = "/getting-started" +to = "/start.html" +status = 301 + +[[redirects]] +from = "/start/nix-build-nixpkgs" +to = "/start/nix-build#nixpkgs" +status = 301 + +[[redirects]] +from = "/start/nix-build-flake" +to = "/start/nix-build#flake" +status = 301 + +[[redirects]] +from = "/start/dev-shell-flake" +to = "/start/nix-develop#flake" +status = 301 + +# Domain redirects +[[redirects]] +from = "https://www.nix-lang.org/*" +to = "https://zero-to-nix.com/:splat" +status = 301 + + +[[redirects]] +from = "https://www.nixlang.org/*" +to = "https://zero-to-nix.com/:splat" +status = 301 + +[[redirects]] +from = "https://www.zero-to-nixos.com/*" +to = "https://zero-to-nix.com/:splat" +status = 301 + +[[redirects]] +from = "https://www.02nix.com/*" +to = "https://zero-to-nix.com/:splat" +status = 301 + +[[redirects]] +from = "https://www.zero2nix.com/*" +to = "https://zero-to-nix.com/:splat" +status = 301 + +[[redirects]] +from = "https://www.zerotonix.com/*" +to = "https://zero-to-nix.com/:splat" +status = 301 + +[[redirects]] +from = "https://www.0tonix.com/*" +to = "https://zero-to-nix.com/:splat" +status = 301 + +[[redirects]] +from = "https://www.zerotoonix.com/*" +to = "https://zero-to-nix.com/:splat" +status = 301 + +[[redirects]] +from = "https://www.zerotwonix.com/*" +to = "https://zero-to-nix.com/:splat" +status = 301 + +[[redirects]] +from = "https://www.z2n.dev/*" +to = "https://zero-to-nix.com/:splat" +status = 301 diff --git a/vercel.json b/vercel.json deleted file mode 100644 index 733ce223..00000000 --- a/vercel.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "buildCommand": "ENV=production pnpm run build", - "cleanUrls": true, - "devCommand": "pnpm run dev", - "framework": null, - "installCommand": "pnpm install", - "outputDirectory": "dist", - "public": true, - "trailingSlash": false, - "redirects": [ - { "source": "/quick-start", "destination": "/start.html" }, - { "source": "/quickstart", "destination": "/start.html" }, - { "source": "/get-started", "destination": "/start.html" }, - { "source": "/getting-started", "destination": "/start.html" }, - { - "source": "/start/nix-build-nixpkgs", - "destination": "/start/nix-build#nixpkgs" - }, - { - "source": "/start/nix-build-flake", - "destination": "/start/nix-build#flake" - }, - { - "source": "/start/dev-shell-flake", - "destination": "/start/nix-develop#flake" - } - ] -}