Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block web crawlers on v0.7-branch #3852

Merged
merged 9 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 6 additions & 54 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,55 +1,7 @@
approvers:
- abhi-g
- aronchick
- dansanche
- ewilderj
- jinchihe
- jlewi
- kunmingg
- lluunn
- nickchase
- pdmack
- richardsliu
- sarahmaddox
- texasmichelle
- willingc
- dsdinter
- Ark-kun
- gaoning777
- hongye-sun
- IronPan
- neuromage
- paveldournov
- qimingj
- rileyjbauer
- vicaire
- joeliedtke
- animeshsingh
reviewers:
- abhi-g
- aronchick
- carmine
- dansanche
- inc0
- jinchihe
- jlewi
- kunmingg
- lluunn
- nickchase
- pdmack
- richardsliu
- sarahmaddox
- texasmichelle
- willingc
- dsdinter
- Ark-kun
- gaoning777
- hongye-sun
- IronPan
- neuromage
- paveldournov
- qimingj
- rileyjbauer
- thedriftofwords
- vicaire
- animeshsingh
- andreyvelich
- james-jwu
- jbottum
- johnugeorge
- terrytangyuan
- zijianjoy
39 changes: 19 additions & 20 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ 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"'.
Expand All @@ -128,34 +128,33 @@ githubbranch = "v0.7-branch"
# Add new release versions here. 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 = "v0.2"
githubbranch = "v0.2-branch"
url = "https://v0-2.kubeflow.org"

version = "v0.7"
githubbranch = "v0.7-branch"
url = "https://v0-7.kubeflow.org"
[[params.versions]]
version = "v0.3"
githubbranch = "v0.3-branch"
url = "https://v0-3.kubeflow.org"

version = "v0.6"
githubbranch = "v0.6-branch"
url = "https://v0-6.kubeflow.org"
[[params.versions]]
version = "v0.5"
githubbranch = "v0.5-branch"
url = "https://v0-5.kubeflow.org"
[[params.versions]]
version = "v0.4"
githubbranch = "v0.4-branch"
url = "https://v0-4.kubeflow.org"

[[params.versions]]
version = "v0.5"
githubbranch = "v0.5-branch"
url = "https://v0-5.kubeflow.org"

version = "v0.3"
githubbranch = "v0.3-branch"
url = "https://v0-3.kubeflow.org"
[[params.versions]]
version = "v0.6"
githubbranch = "v0.6-branch"
url = "https://v0-6.kubeflow.org"
version = "v0.2"
githubbranch = "v0.2-branch"
url = "https://v0-2.kubeflow.org"

# Docsy: User interface configuration
[params.ui]
Expand Down
7 changes: 2 additions & 5 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{{ hugo.Generator }}
{{ if eq (getenv "HUGO_ENV") "production" }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}
<!-- Prevent search engines from indexing this old site -->
<meta name="robots" content="noindex">
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
Expand Down
45 changes: 32 additions & 13 deletions layouts/partials/version-banner.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
<!-- Check the variable that indicates whether this is an archived doc set.
If yes, display a banner. -->
{{ if .Site.Params.archived_version }}
{{ $color := "primary" }}
{{ $latest := .Site.Params.url_latest_version }}
<div class="pageinfo pageinfo-{{ $color }}">
{{ with .Site.Params.version }}<p>Version {{ . | markdownify }} of the
documentation is no longer actively maintained. The site that you are
currently viewing is an archived snapshot. For up-to-date documentation,
see the
<a href="{{ $latest | safeURL }}" target="_blank">latest version</a>.</p>
{{ end }}
<!-- Check the variable that indicates whether this is an archived doc set. If yes, display a banner. -->
{{- $latest_version_url := .Site.Params.url_latest_version }}
{{- $current_version := replace .Site.Params.version "v" "" | markdownify }}
{{- if .Site.Params.archived_version }}
<style>
.version-banner {
padding: 1.5rem;
margin: 2rem 0;
max-width: 40rem;
border-style: solid;
border-color: #f0ad4e;
background-color: #faf5b6;
border-radius: 0.25rem;
}
.version-banner h3 {
margin-top: 0;
margin-bottom: 0.6em;
font-size: 1.25em;
}
.version-banner p {
margin-top: 0;
margin-bottom: 0;
}
</style>
<div class="version-banner">
<h3>You are viewing documentation for <strong>Kubeflow {{ $current_version }}</strong></h3>
<p>
This is a static snapshot from the time of the Kubeflow {{ $current_version }} release.
<br>
For up-to-date information, see the <a href="{{ $latest_version_url | safeURL }}">latest version</a>.
</p>
</div>
{{ end }}
{{- end }}
6 changes: 4 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
command = "hugo"

[context.deploy-preview.environment]
HUGO_VERSION = "0.55.6"
HUGO_VERSION = "0.81.0"
NODE_VERSION = "12"

[context.production.environment]
HUGO_VERSION = "0.55.6"
HUGO_VERSION = "0.81.0"
NODE_VERSION = "12"
HUGO_ENV = "production"
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "website",
"devDependencies": {
"autoprefixer": "^9.4.3",
"postcss": "^7.0.6",
"postcss-cli": "^6.1.0"
}
}
2 changes: 1 addition & 1 deletion themes/docsy/layouts/shortcodes/blocks/cover.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{ with .Get "title" }}<h1 class="display-1 mt-0 mt-md-5 pb-4">{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}<img class="td-cover-logo" src="{{ $logo_image_resized.RelPermalink }}" alt="{{ $title | html }} Logo">{{ end }}{{ $title | html }}</h1>{{ end }}
{{ with .Get "subtitle" }}<p class="display-2 text-uppercase mb-0">{{ . | html }}</p>{{ end }}
<div class="pt-3 lead">
{{ .Inner | markdownify}}
{{ .Inner }}
</div>
</div>
</div>
Expand Down