From 22efc737f91cf053ba643a548cf817150fdf5fd2 Mon Sep 17 00:00:00 2001 From: Kanishk Sahni Date: Fri, 22 May 2026 18:25:37 -0400 Subject: [PATCH] redirect legacy docs.flox.dev to flox.dev/docs The new Mintlify docs live at flox.dev/docs. Point this legacy MkDocs site there with permanent (301) redirects instead of serving stale content. - Path-preserving /docs/* -> flox.dev/docs/:splat (93/99 legacy URLs resolve 1:1 on the new site). - Explicit mappings for two pages renamed/removed in the migration: flox-build-update-catalogs -> flox-build, nix-builds.toml -> manifest.toml. - Everything else -> the docs home. Co-Authored-By: Claude Opus 4.7 --- netlify.toml | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index 49a1382a..b866c180 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,38 @@ +# This site (docs.flox.dev) is the legacy MkDocs docs. +# It now redirects to the new Mintlify docs at flox.dev/docs. +# +# Netlify matches `from` paths trailing-slash-insensitively, so these +# rules cover both `/path` and `/path/`. More specific rules must come +# first (first match wins). + +# --- Pages renamed/removed in the migration: map to their closest home --- + +[[redirects]] + from = "/docs/man/flox-build-update-catalogs" + to = "https://flox.dev/docs/man/flox-build" + status = 301 + force = true + +[[redirects]] + from = "/docs/man/nix-builds.toml" + to = "https://flox.dev/docs/man/manifest.toml" + status = 301 + force = true + +# --- Path-preserving redirect for everything else under /docs/ --- +# 93 of 99 legacy URLs resolve 1:1 on the new site (the rest are former +# MkDocs include/snippet partials that were never real pages). + +[[redirects]] + from = "/docs/*" + to = "https://flox.dev/docs/:splat" + status = 301 + force = true + +# --- Anything outside /docs/ -> the new docs home --- + [[redirects]] from = "/*" - to = "/docs/" - status = 302 - force = false + to = "https://flox.dev/docs" + status = 301 + force = true