Skip to content
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
2 changes: 1 addition & 1 deletion content/en/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"url": "https://istio.io/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://istio.io/search?q={search_term_string}",
"target": "https://istio.io/latest/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
Expand Down
23 changes: 11 additions & 12 deletions layouts/index.redir
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ https://istio.netlify.com/* https://istio.io/:splat 301!
/favicon.ico /latest/favicons/favicon.ico 200
/logos/* /latest/logos/:splat

# navigating to a page without /latest on front, add /latest
{{ range $p := .Site.Pages }}
{{ strings.TrimPrefix "/latest" $p.Permalink }} {{ $p.Permalink}}
{{ strings.TrimPrefix "/latest" (printf "%s.html" (substr $p.Permalink 0 -1)) }} {{ $p.Permalink}}
{{- end }}
# Redirect root paths without /latest
/about/* /latest/about/:splat
/blog/* /latest/blog/:splat
/docs/* /latest/docs/:splat
/get-involved/* /latest/get-involved/:splat
/news/* /latest/news/:splat
/search/* /latest/search/:splat
/test/* /latest/test/:splat

# redirect current version to /latest
/v{{ .Site.Data.args.version }}/* /latest/:splat
Expand All @@ -71,15 +74,11 @@ https://istio.netlify.com/* https://istio.io/:splat 301!
# migration from old design to new
/about / 301!
/latest/about /latest 301!
# /faq/ /about/faq
/faq/* /about/faq/
# /latest/faq/ /about/faq
/latest/faq/* /about/faq/
/about/faq/* /about/faq/
/latest/about/faq/* /about/faq/
/faq/* /latest/about/faq/
/latest/faq/* /latest/about/faq/
/about/faq/* /latest/about/faq/

# media-resources page

/about/media-resources https://github.com/cncf/artwork/tree/master/projects/istio
/latest/about/media-resources https://github.com/cncf/artwork/tree/master/projects/istio
/about/zh/media-resources https://github.com/cncf/artwork/tree/master/projects/istio
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{{ end }}
<input type="hidden" name="ie" value="utf-8" />
<input type="hidden" name="hl" value="{{ .Page.Lang }}" />
<input type="hidden" id="search-page-url" value="{{ "/search" | relLangURL }}" />
<input type="hidden" id="search-page-url" value="{{ "/latest/search" | relLangURL }}" />
<input id="search-textbox" class="search-textbox form-control" name="q" type="search" aria-label='{{ i18n "search" }}' placeholder='{{ i18n "search_label" }}' />
<button id="search-close" title='{{ i18n "search_cancel" }}' type="reset" aria-label='{{ i18n "search_cancel" }}'>{{ partial "icon.html" "menu-close" }}</button>
</form>
Expand Down