Tune the archive_landing mode. (#4046)

(cherry picked from commit 69cf07bc84)
This commit is contained in:
Martin Taillefer 2019-04-25 14:02:06 -07:00 committed by GitHub
parent 8482359213
commit 4c4e401886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 80 additions and 68 deletions

View File

@ -50,11 +50,7 @@ is used is determined by the istio.io [Netlify](https://netlify.com) project's c
* The content of archive.istio.io is taken from the older release-XXX branches. The set of branches that
are included on archive.istio.io is determined by the `TOBUILD` variable in this
[script](https://github.com/istio/admin-sites/blob/master/archive.istio.io/build.sh)
> The above means that if you want to do a change to the main istio.io site, you need
to make the change in the master branch of https://github.com/istio/istio.io and then merge that change into the
current release branch.
[script](https://github.com/istio/istio.io/blob/master/scripts/gen_archive_site.sh).
### Publishing content immediately
@ -72,23 +68,33 @@ version of Istio is 0.6 and you wish to introduce 0.7 which has been under devel
1. Switch to the istio/istio.io repo and make sure everything is up to date.
1. Run `scripts/grab_reference_docs.sh` in order to get the latest reference docs.
1. Edit the file `scripts/gen_archive_site.sh` and add the new archive version
(in this case release-0.6) to the `TOBUILD` variable.
1. Commit the previous edits to your local git repo and push your **master** branch to GitHub.
1. Create a new release branch off of master, named as release-*major*.*minor*, which in this case would be
release-0.7. There is one such branch for every release.
1. In the **release** branch you created, edit the file `data/args.yml`. Set the `preliminary` field to `false`
and the `source_branch_name` and `doc_branch_name` fields to the name of the branch, in this case release-0.7.
1. In the **release** branch you created, edit the file `scripts/grab_reference_docs.sh`. Update the branch
name for `istio.git` and `api.git` to point to the release branch. In this case release-0.7.
1. Commit the previous edit to your local git repo and push your **release** branch to GitHub.
#### Updating preliminary.istio.io
1. Switch to the istio/istio.io repo and make sure everything is up to date.
1. In the **master** branch, edit the file `data/versions.yml`. Set preliminary to the next Istio release
("0.8") and main to the current release ("0.7").
1. In the **master** branch, edit the file `data/versions.yml`. Set the `preliminary` field to the next Istio release
("0.8") and the `main` field to the current release ("0.7").
1. In the **master** branch, edit the file `data/args.yml` and update the `version` and `full_version` fields to have the version
of the next Istio release. In this case, you would set the fields to 0.8 and 0.8.0 respectively.
1. In the **master** branch, edit the file `data/args.yml`. Set the `version` and `full_version` fields to have the version
of the next Istio release. In this case, you would set the fields to "0.8" and "0.8.0" respectively.
1. Commit the previous edits to your local git repo and push the **master** branch to GitHub.
@ -124,16 +130,18 @@ of the next Istio release. In this case, you would set the fields to 0.8 and 0.8
1. In the **previous release's** branch (in this case release-0.6), edit the file `data/args.yml`. Set the
`archive` field to true and the `archive_date` field to the current date.
1. Commit the previous edit to your local git repo and push the **previous release's* branch to GitHub.
1. In the **previous release's** branch (in this case release-0.6), edit the file `config.toml`. Set the
`disableAliases` field to `false`.
1. Switch to the istio/admin-sites repo.
1. Commit the previous edits to your local git repo and push the **previous release's* branch to GitHub.
1. Edit the `archive.istio.io/build.sh` script to add the newest archive version (in this case
release-0.6) to the `TOBUILD` variable.
1. Go to the archive.istio.io project on [Netlify](https://netlify.com)
1. Commit the previous edit to your local git repo and push the change to GitHub.
1. Change the branch that is built from the previous release's branch to the new release branch, in this case release-0.7.
1. Wait a while (~10 minutes) and browse archive.istio.io and make sure everything looks good.
1. Select the option to trigger an immediate rebuild and redeployment.
1. Once deployment is done, browse archive.istio.io and make sure everything looks good.
### Creating a patch release
@ -146,9 +154,11 @@ you describe the changes in the release.
1. Create a release note page in `content/about/notes/1.X.Y/index.md`, where `1.X.Y` is the name of the
release.
1. Create an announcement blog post in `content/blog/YYYY/announcing-1.X.Y`, where `YYYY` is the current year
1. Create an announcement blog post in `content/blog/YYYY/announcing-1.X.Y/index.md`, where `YYYY` is the current year
and `1.x.Y` is the name of the release.
1. Edit the `data/args.yml` file and change the `full_version` field to the name of the release.
For the first three files, please look at existing files in the same location for example content and layout.
1. Run `scripts/grab_reference_docs.sh` to get the latest reference docs.
For the first three files, please look at existing files in the same locations for example content and layout.

View File

@ -7,10 +7,12 @@
{{- $release_url = printf "https://github.com/istio/istio/releases/tag/%s" .Site.Data.args.full_version -}}
{{- end -}}
<a class="channel" title='{{ printf (i18n "download_desc") (strings.TrimSuffix ".0" .Site.Data.args.full_version) }}' href="{{- $release_url -}}" aria-label="Download Istio">
<span>download</span>
{{ partial "icon.html" "download" }}
</a>
{{- if not .Site.Data.args.archive_landing -}}
<a class="channel" title='{{ printf (i18n "download_desc") (strings.TrimSuffix ".0" .Site.Data.args.full_version) }}' href="{{- $release_url -}}" aria-label="Download Istio">
<span>download</span>
{{ partial "icon.html" "download" }}
</a>
{{- end -}}
<a class="channel" title='{{ i18n "discuss_istio_io_desc" }}' href="https://discuss.istio.io" aria-label="Istio discussion board">
<span>discuss</span>

View File

@ -54,65 +54,65 @@
{{ end }}
{{ end }}
{{ if not .Site.Data.args.archive_landing }}
<div class="menu">
<button id="gearDropdownButton" class="menu-trigger" title='{{ i18n "options_menu" }}'
aria-label="Options and Settings" aria-controls="gearDropdownContent">
{{ partial "icon.html" "gear" }}
</button>
<div class="menu">
<button id="gearDropdownButton" class="menu-trigger" title='{{ i18n "options_menu" }}'
aria-label="Options and Settings" aria-controls="gearDropdownContent">
{{ partial "icon.html" "gear" }}
</button>
<div id="gearDropdownContent" class="menu-content" aria-labelledby="gearDropdownButton" role="menu">
<div id="gearDropdownContent" class="menu-content" aria-labelledby="gearDropdownButton" role="menu">
{{ if not .Site.Data.args.archive_landing }}
<a tabindex="-1" role="menuitem" lang="en" id="switch-lang-en" {{ if eq $home.Lang "en" }}class="active"{{ end }}>English</a>
<a tabindex="-1" role="menuitem" lang="zh" id="switch-lang-zh" {{ if eq $home.Lang "zh" }}class="active"{{ end }}>中文</a>
<div role="separator"></div>
{{ end }}
<a tabindex="-1" role="menuitem" class="active" id="light-theme-item">{{ i18n "light_theme" }}</a>
<a tabindex="-1" role="menuitem" id="dark-theme-item">{{ i18n "dark_theme" }}</a>
<a tabindex="-1" role="menuitem" class="active" id="light-theme-item">{{ i18n "light_theme" }}</a>
<a tabindex="-1" role="menuitem" id="dark-theme-item">{{ i18n "dark_theme" }}</a>
<div role="separator"></div>
<a tabindex="-1" role="menuitem" id="syntax-coloring-item">{{ i18n "syntax_coloring" }}</a>
{{ if not .Site.Data.args.archive }}
<div role="separator"></div>
<a tabindex="-1" role="menuitem" id="syntax-coloring-item">{{ i18n "syntax_coloring" }}</a>
{{ if not .Site.Data.args.archive }}
<div role="separator"></div>
{{ if .Params.source_repo }}
{{ $msg := i18n "generated_file" }}
{{ $title := printf $msg .Page.Params.source_repo }}
<a tabindex="-1" role="menuitem" class="disabled" title="{{ $title }}">{{ i18n "edit_on_github" }}</a>
{{ else }}
{{ if eq $home.Lang "zh" }}
<a tabindex="-1" role="menuitem" href="https://github.com/istio/istio.io/edit/{{ .Site.Data.args.doc_branch_name }}/content_zh/{{ .Path }}">{{ i18n "edit_on_github" }}</a>
{{ else }}
<a tabindex="-1" role="menuitem" href="https://github.com/istio/istio.io/edit/{{ .Site.Data.args.doc_branch_name }}/content/{{ .Path }}">{{ i18n "edit_on_github" }}</a>
{{ end }}
{{ end }}
<a tabindex="-1" role="menuitem" href="https://github.com/istio/istio.io/issues/new?title=Issue%20with%20{{ .Path}}">{{ i18n "report_site_bugs" }}</a>
{{ end }}
<div role="separator"></div>
<h6>{{ i18n "other_versions_of_site" }}</h6>
{{ $next := .Site.Data.versions.preliminary }}
{{ $current := .Site.Data.versions.main }}
{{ if .Site.Data.args.archive }}
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://istio.io/{{.Dir}}');return false;">{{ printf (i18n "current_release") $current }}</a>
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://preliminary.istio.io/{{.Dir}}');return false;">{{ printf (i18n "next_release") $next }}</a>
<a tabindex="-1" role="menuitem" href="https://archive.istio.io">{{ i18n "archived_releases" }}</a>
{{ else if .Site.Data.args.preliminary }}
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://istio.io/{{.Dir}}');return false;">{{ printf (i18n "current_release") $current }}</a>
<a tabindex="-1" role="menuitem" href="https://archive.istio.io">{{ i18n "archived_releases" }}</a>
{{ if .Params.source_repo }}
{{ $msg := i18n "generated_file" }}
{{ $title := printf $msg .Page.Params.source_repo }}
<a tabindex="-1" role="menuitem" class="disabled" title="{{ $title }}">{{ i18n "edit_on_github" }}</a>
{{ else }}
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://preliminary.istio.io/{{.Dir}}');return false;">{{ printf (i18n "next_release") $next }}</a>
<a tabindex="-1" role="menuitem" href="https://archive.istio.io">{{ i18n "archived_releases" }}</a>
{{ if eq $home.Lang "zh" }}
<a tabindex="-1" role="menuitem" href="https://github.com/istio/istio.io/edit/{{ .Site.Data.args.doc_branch_name }}/content_zh/{{ .Path }}">{{ i18n "edit_on_github" }}</a>
{{ else }}
<a tabindex="-1" role="menuitem" href="https://github.com/istio/istio.io/edit/{{ .Site.Data.args.doc_branch_name }}/content/{{ .Path }}">{{ i18n "edit_on_github" }}</a>
{{ end }}
{{ end }}
</div>
<a tabindex="-1" role="menuitem" href="https://github.com/istio/istio.io/issues/new?title=Issue%20with%20{{ .Path}}">{{ i18n "report_site_bugs" }}</a>
{{ end }}
<div role="separator"></div>
<h6>{{ i18n "other_versions_of_site" }}</h6>
{{ $next := .Site.Data.versions.preliminary }}
{{ $current := .Site.Data.versions.main }}
{{ if .Site.Data.args.archive }}
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://istio.io/{{.Dir}}');return false;">{{ printf (i18n "current_release") $current }}</a>
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://preliminary.istio.io/{{.Dir}}');return false;">{{ printf (i18n "next_release") $next }}</a>
<a tabindex="-1" role="menuitem" href="https://archive.istio.io">{{ i18n "archived_releases" }}</a>
{{ else if .Site.Data.args.preliminary }}
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://istio.io/{{.Dir}}');return false;">{{ printf (i18n "current_release") $current }}</a>
<a tabindex="-1" role="menuitem" href="https://archive.istio.io">{{ i18n "archived_releases" }}</a>
{{ else }}
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://preliminary.istio.io/{{.Dir}}');return false;">{{ printf (i18n "next_release") $next }}</a>
<a tabindex="-1" role="menuitem" href="https://archive.istio.io">{{ i18n "archived_releases" }}</a>
{{ end }}
</div>
{{ end }}
</div>
<button id="search-show" title='{{ i18n "search" }}' aria-label='{{ i18n "search_label" }}'>{{ partial "icon.html" "magnifier" }}</button>
</div>