Skip to content

Commit

Permalink
[docs] Address issues with Ecosystem links in navs (#6200)
Browse files Browse the repository at this point in the history
Signed-off-by: Charlie Egan <charlie@styra.com>
  • Loading branch information
charlieegan3 committed Aug 31, 2023
1 parent 760c586 commit 65a8b7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
7 changes: 5 additions & 2 deletions docs/website/layouts/partials/docs/navbar.html
Expand Up @@ -16,7 +16,7 @@
{{ $operations := where $allDocs ".Params.kind" "eq" "operations" }}
{{ $management := where $allDocs ".Params.kind" "eq" "management" }}
{{ $contrib := where $allDocs ".Params.kind" "eq" "contrib" }}
{{ $misc := where $allDocs ".Params.kind" "eq" "misc" }}
{{ $misc := where (where $allDocs ".Params.kind" "eq" "misc") ".Title" "ne" "Ecosystem" }}
{{ $version := index (split .File.Path "/") 1 }}
{{ $pageUrl := .Permalink }}
<nav class="navbar is-primary">
Expand Down Expand Up @@ -66,11 +66,14 @@
Support
</span>
<a class="navbar-item" href="/support">
Enterprise and Commercial
Enterprise
</a>
<a class="navbar-item" href="/community">
Community
</a>
<a class="navbar-item" href="/ecosystem">
OPA Ecosystem
</a>
</div>

<div class="navbar-end">
Expand Down
14 changes: 5 additions & 9 deletions docs/website/layouts/partials/docs/sidenav.html
Expand Up @@ -8,8 +8,9 @@
{{ $operations := where $allDocs ".Params.kind" "eq" "operations" }}
{{ $management := where $allDocs ".Params.kind" "eq" "management" }}
{{ $contrib := where $allDocs ".Params.kind" "eq" "contrib" }}
{{ $misc := where $allDocs ".Params.kind" "eq" "misc" }}
{{ $support := where $allDocs ".Params.kind" "eq" "support" }}
{{/* Drop all ecosystem pages in historic versions in favor of hard coded link below */}}
{{ $misc := where (where $allDocs ".Params.kind" "eq" "misc") ".Title" "ne" "Ecosystem" }}
{{ $support := where (where (where $allDocs ".Params.kind" "eq" "support") ".Title" "ne" "Ecosystem") ".Title" "ne" "OPA Ecosystem" }}
{{ $pageUrl := .Permalink }}
{{ $isDocsHome := eq .Permalink $docsHome.Permalink }}
{{ $version := index (split .File.Path "/") 1 }}
Expand Down Expand Up @@ -53,10 +54,5 @@

{{ partial "docs/sidenav-section.html" ( dict "ctx" . "sectionTitle" "Support" "section" $support "pageUrl" $pageUrl "version" $version ) }}

<a class="docs-nav-item" href="/ecosystem">
OPA Ecosystem
</a>

<a class="docs-nav-item" href="/support">
Enterprise
</a>
<a class="docs-nav-item" href="/ecosystem">OPA Ecosystem</a>
<a class="docs-nav-item" href="/support">Enterprise</a>

0 comments on commit 65a8b7d

Please sign in to comment.