From a14df765b8677db56aeec9f7b86ffadab8bc24a9 Mon Sep 17 00:00:00 2001 From: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com> Date: Wed, 11 Sep 2024 20:59:16 -0700 Subject: [PATCH] Block web crawlers on `v1.8-branch` (#3861) * Block web crawlers on `v1.8-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> * Backport changes from #3863 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> * Remove `Archive: ` version dropdown prefix 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 | 19 ++++------------ config.toml | 14 ++++++------ layouts/partials/head.html | 8 ++----- layouts/partials/version-banner.html | 33 ++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 28 deletions(-) create mode 100644 layouts/partials/version-banner.html diff --git a/OWNERS b/OWNERS index 3df8e780f8..dad6adc133 100644 --- a/OWNERS +++ b/OWNERS @@ -1,18 +1,7 @@ approvers: - - animeshsingh - - 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 b557289946..e4b177c7b8 100644 --- a/config.toml +++ b/config.toml @@ -113,30 +113,30 @@ enable = true 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.8" # 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.8" # 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.8-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.8" githubbranch = "v1.8-branch" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 735944195e..8cd6549fcd 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