From af1d9102b981474b514b941feb8657401349bbdf Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Tue, 27 Apr 2021 14:48:18 +0200 Subject: [PATCH] explain where docs are keep netlify config for now (disabled in the app), but only make it ship the _redirects file add rule for 'install.sh' move _redirects file into docs/ directory document redirects and Netlify Signed-off-by: Daniel Holbach --- copy-docs-assets.sh | 56 ----------------------------------- docs/README.md | 17 +++++++++++ _redirects => docs/_redirects | 1 + netlify.toml | 2 +- requirements.txt | 2 -- runtime.txt | 1 - 6 files changed, 19 insertions(+), 60 deletions(-) delete mode 100755 copy-docs-assets.sh create mode 100644 docs/README.md rename _redirects => docs/_redirects (91%) delete mode 100644 requirements.txt delete mode 100644 runtime.txt diff --git a/copy-docs-assets.sh b/copy-docs-assets.sh deleted file mode 100755 index e8fcfc39..00000000 --- a/copy-docs-assets.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -controller_version() { -sed -n "s/.*$1\/releases\/download\/\(.*\)\/.*/\1/p;n" "manifests/bases/$1/kustomization.yaml" -} - -{ -# source-controller CRDs -SOURCE_VER=$(controller_version source-controller) -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/source-controller/$SOURCE_VER/docs/api/source.md" > docs/components/source/api.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/source-controller/$SOURCE_VER/docs/spec/v1beta1/gitrepositories.md" > docs/components/source/gitrepositories.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/source-controller/$SOURCE_VER/docs/spec/v1beta1/helmrepositories.md" > docs/components/source/helmrepositories.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/source-controller/$SOURCE_VER/docs/spec/v1beta1/helmcharts.md" > docs/components/source/helmcharts.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/source-controller/$SOURCE_VER/docs/spec/v1beta1/buckets.md" > docs/components/source/buckets.md -} - -{ -# kustomize-controller CRDs -KUSTOMIZE_VER=$(controller_version kustomize-controller) -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/kustomize-controller/$KUSTOMIZE_VER/docs/api/kustomize.md" > docs/components/kustomize/api.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/kustomize-controller/$KUSTOMIZE_VER/docs/spec/v1beta1/kustomization.md" > docs/components/kustomize/kustomization.md -} - -{ -# helm-controller CRDs -HELM_VER=$(controller_version helm-controller) -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/helm-controller/$HELM_VER/docs/api/helmrelease.md" > docs/components/helm/api.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/helm-controller/$HELM_VER/docs/spec/v2beta1/helmreleases.md" > docs/components/helm/helmreleases.md -} - -{ -# notification-controller CRDs -NOTIFICATION_VER=$(controller_version notification-controller) -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/notification-controller/$NOTIFICATION_VER/docs/api/notification.md" > docs/components/notification/api.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/notification-controller/$NOTIFICATION_VER/docs/spec/v1beta1/event.md" > docs/components/notification/event.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/notification-controller/$NOTIFICATION_VER/docs/spec/v1beta1/alert.md" > docs/components/notification/alert.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/notification-controller/$NOTIFICATION_VER/docs/spec/v1beta1/provider.md" > docs/components/notification/provider.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/notification-controller/$NOTIFICATION_VER/docs/spec/v1beta1/receiver.md" > docs/components/notification/receiver.md -} - -{ -# image-*-controller CRDs; these use the same API group -IMG_REFL_VER=$(controller_version image-reflector-controller) -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/image-reflector-controller/$IMG_REFL_VER/docs/api/image-reflector.md" > docs/components/image/reflector-api.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/image-reflector-controller/$IMG_REFL_VER/docs/spec/v1alpha2/imagerepositories.md" > docs/components/image/imagerepositories.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/image-reflector-controller/$IMG_REFL_VER/docs/spec/v1alpha2/imagepolicies.md" > docs/components/image/imagepolicies.md - -IMG_AUTO_VER=$(controller_version image-automation-controller) -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/image-automation-controller/$IMG_AUTO_VER/docs/api/image-automation.md" > docs/components/image/automation-api.md -curl -# -Lf "https://raw.githubusercontent.com/fluxcd/image-automation-controller/$IMG_AUTO_VER/docs/spec/v1alpha2/imageupdateautomations.md" > docs/components/image/imageupdateautomations.md -} - -{ -# install script -cp install/flux.sh docs/install.sh -} diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..5b1ab70e --- /dev/null +++ b/docs/README.md @@ -0,0 +1,17 @@ +# Flux v2 Documentation + +The documentation for `flux2` has moved to this repository: . + +[The Website's README](https://github.com/fluxcd/website/#readme) has information on how to + +- modify and extend documentation +- run the site locally +- publish changes + +and where all the individual pieces of content come from. + +It will be easier for us to maintain a coherent web presences (and merge all of Flux documentation) in one central repository. This was partly discussed in . + +## toolkit.fluxcd.io + +For historical reasons we are keeping a `_redirects` file in this directory. It defines how redirects from the old site `toolkit.fluxcd.io` to our new website work. Changes to this file need to be merged and a manual build triggered in the Netlify App. diff --git a/_redirects b/docs/_redirects similarity index 91% rename from _redirects rename to docs/_redirects index 833b0fc8..4b23c408 100644 --- a/_redirects +++ b/docs/_redirects @@ -1,6 +1,7 @@ # individual rules /core-concepts https://fluxcd.io/docs/concepts 301! /contributing https://fluxcd.io/contributing 301! +/install.sh https://fluxcd.io/install.sh 301! # refer to https://github.com/fluxcd/flux2/discussions/367 /dev-guides/* https://fluxcd.io/docs/gitops-toolkit/:splat 301! diff --git a/netlify.toml b/netlify.toml index 9aa13a33..3a9c12c6 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,3 @@ [build] - command = "./copy-docs-assets.sh && mkdocs build && cp _redirects site/" + command = "mkdir -p site && cp docs/_redirects site/" publish = "site" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 483fb318..00000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -mkdocs==1.1.2 -mkdocs-material==7.1.3 diff --git a/runtime.txt b/runtime.txt deleted file mode 100644 index 475ba515..00000000 --- a/runtime.txt +++ /dev/null @@ -1 +0,0 @@ -3.7