diff --git a/content/en/_index.html b/content/en/_index.html index 524d2e4fd3f95..cf3ff10f2cdd1 100644 --- a/content/en/_index.html +++ b/content/en/_index.html @@ -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" } } diff --git a/layouts/index.redir b/layouts/index.redir index 7541777784168..c439db5fd81a6 100644 --- a/layouts/index.redir +++ b/layouts/index.redir @@ -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 @@ -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 diff --git a/layouts/partials/header.html b/layouts/partials/header.html index cc4107465b0fe..5aef757b4bfc3 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -65,7 +65,7 @@ {{ end }} - +