From 5775eb084857d732bdab6c87c240204d5f4c6cd9 Mon Sep 17 00:00:00 2001 From: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> Date: Wed, 11 Sep 2024 20:58:54 -0700 Subject: [PATCH] Block web crawlers on `v1.5-branch` (#3858) * Block web crawlers on `v1.5-branch` Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * Enable archived version header Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * Fix archived version warning Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * Backport changes from #3863 Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * Remove `Archive: ` version dropdown prefix Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * Align OWNERS to `master` branch Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> * Improve archived_version banner Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> --------- Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> --- OWNERS | 20 ++++------------- config.toml | 18 ++++++--------- layouts/partials/head.html | 8 ++----- layouts/partials/version-banner.html | 33 ++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 33 deletions(-) create mode 100644 layouts/partials/version-banner.html diff --git a/OWNERS b/OWNERS index e0c1baa310..dad6adc133 100644 --- a/OWNERS +++ b/OWNERS @@ -1,19 +1,7 @@ approvers: - - animeshsingh - - Bobgy - - chensun + - andreyvelich - james-jwu - - knkski - - shannonbradshaw - - zijianjoy -reviewers: - - 8bitmp3 - - aronchick - - berndverst - - dansanche - - dsdinter - - Jeffwan - - jinchihe - - nickchase - - pdmack + - jbottum + - johnugeorge - terrytangyuan + - zijianjoy \ No newline at end of file diff --git a/config.toml b/config.toml index 13e7933984..90a491098c 100644 --- a/config.toml +++ b/config.toml @@ -98,30 +98,30 @@ disableKinds = ["taxonomy", "taxonomyTerm"] gcs_engine_id = "007239566369470735695:624rglujm-w" # Text label for the version menu in the top bar of the website. - version_menu = "Kubeflow Version" + version_menu = "v1.5" # The major.minor version tag for the version of the docs represented in this # branch of the repository. Used in the "version-banner" partial to display a # version number for this doc set. - version = "master" + version = "v1.5" # Flag used in the "version-banner" partial to decide whether to display a # banner on every page indicating that this is an archived version of the docs. - archived_version = false + archived_version = true # A link to latest version of the docs. Used in the "version-banner" partial to # point people to the main doc site. - url_latest_version = "https://kubeflow.org/docs/" + url_latest_version = "https://www.kubeflow.org/docs/" # A variable used in various docs to determine URLs for config files etc. # To find occurrences, search the repo for 'params "githubbranch"'. - githubbranch = "master" + githubbranch = "v1.5-branch" # These entries appear in the drop-down menu at the top of the website. [[params.versions]] - version = "master" + version = "Latest" githubbranch = "master" - url = "https://master.kubeflow.org" + url = "https://www.kubeflow.org" [[params.versions]] version = "v1.5" githubbranch = "v1.5-branch" @@ -166,10 +166,6 @@ disableKinds = ["taxonomy", "taxonomyTerm"] version = "v0.3" githubbranch = "v0.3-branch" url = "https://v0-3.kubeflow.org" - [[params.versions]] - version = "v0.2" - githubbranch = "v0.2-branch" - url = "https://v0-2.kubeflow.org" # User interface configuration [params.ui] diff --git a/layouts/partials/head.html b/layouts/partials/head.html index f5de0ca6df..a3c8183d14 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -5,12 +5,8 @@ {{ end -}} -{{ $outputFormat := partial "outputformat.html" . -}} -{{ if and hugo.IsProduction (ne $outputFormat "print") -}} - -{{ else -}} - -{{ end -}} + + {{ partial "seo_schema" . }} diff --git a/layouts/partials/version-banner.html b/layouts/partials/version-banner.html new file mode 100644 index 0000000000..641e73fdc8 --- /dev/null +++ b/layouts/partials/version-banner.html @@ -0,0 +1,33 @@ + +{{- $latest_version_url := .Site.Params.url_latest_version }} +{{- $current_version := replace .Site.Params.version "v" "" | markdownify }} +{{- if .Site.Params.archived_version }} + +
+{{- end }} \ No newline at end of file