mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
docs: update version for non docs pages
This sets the default version for all non docs pages to latest. We have recently started to list some pages in the search index from non docs pages, when a user makes a search, they search within the current version. This will make pages from the rest of the site available in the index when searching from 'latest'. Signed-off-by: Charlie Egan <charlie@styra.com>
This commit is contained in:
committed by
Ashutosh Narkar
parent
2dbacae1aa
commit
89bb42b6a7
@@ -5,7 +5,10 @@
|
||||
{{ $pageType := cond $isHome "website" "article" }}
|
||||
{{ $imageUrl := "/img/logos/opa-horizontal-color.png" | absURL }}
|
||||
{{ $twitter := site.Params.social.twitter }}
|
||||
{{ $version := index (split .File.Path "/") 1 }}
|
||||
{{ $version := "latest" }}
|
||||
{{ if strings.HasPrefix .Permalink "/docs/" }}
|
||||
{{ $version := index (split .File.Path "/") 1 }}
|
||||
{{ end }}
|
||||
{{ $page := trim .RelPermalink "/" }}
|
||||
{{ $releases := site.Data.releases }}
|
||||
{{ $latest := index $releases 1 }}
|
||||
|
||||
Reference in New Issue
Block a user