From ae7a59fbb4241983beefce8cde46320baf02c464 Mon Sep 17 00:00:00 2001
From: Daniel Holbach <daniel@weave.works>
Date: Tue, 27 Apr 2021 12:17:49 +0200
Subject: [PATCH] try out redirects file

Signed-off-by: Daniel Holbach <daniel@weave.works>
---
 _redirects   | 17 +++++++++++++++++
 netlify.toml |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 _redirects

diff --git a/_redirects b/_redirects
new file mode 100644
index 00000000..833b0fc8
--- /dev/null
+++ b/_redirects
@@ -0,0 +1,17 @@
+# individual rules
+/core-concepts          https://fluxcd.io/docs/concepts                     301!
+/contributing           https://fluxcd.io/contributing                      301!
+
+# refer to https://github.com/fluxcd/flux2/discussions/367
+/dev-guides/*           https://fluxcd.io/docs/gitops-toolkit/:splat        301!
+
+
+# this is how things looked in the navbar anyway..?
+/guides/faq-migration                   https://fluxcd.io/docs/migration/faq-migration                  301!
+/guides/flux-v1-automation-migration    https://fluxcd.io/docs/migration/flux-v1-automation-migration   301!
+/guides/flux-v1-migration               https://fluxcd.io/docs/migration/flux-v1-migration              301!
+/guides/helm-operator-migration         https://fluxcd.io/docs/migration/helm-operator-migration        301!
+
+
+# catch all
+/*                      https://fluxcd.io/docs/:splat                       301!
diff --git a/netlify.toml b/netlify.toml
index b4626e52..9aa13a33 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -1,3 +1,3 @@
 [build]
-  command = "./copy-docs-assets.sh && mkdocs build"
+  command = "./copy-docs-assets.sh && mkdocs build && cp _redirects site/"
   publish = "site"
-- 
GitLab