Skip to content

Commit

Permalink
feat: allow overriding prev and next links in frontmatter (#15755) (#…
Browse files Browse the repository at this point in the history
…16044)

* feat: allow overriding prev and next links in frontmatter (#15755)

* build test successfully run locally

* implemented prev and next logic according to front matter

* added overriding prev and next in frontmatter

* cleaned code

* Update content/en/docs/ambient/install/_index.md

Co-authored-by: Craig Box <[email protected]>

---------

Co-authored-by: Craig Box <[email protected]>
  • Loading branch information
AdeshGhadage and craigbox authored Jan 13, 2025
1 parent 3f4412e commit 6bcd883
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
3 changes: 2 additions & 1 deletion content/en/docs/ambient/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ aliases:
- /docs/ops/ambient/getting-started
- /latest/docs/ops/ambient/getting-started
owner: istio/wg-networking-maintainers
skip_list: true
test: yes
skip_list: true
next: /docs/ambient/getting-started/deploy-sample-app
---

This guide lets you quickly evaluate Istio's {{< gloss "ambient" >}}ambient mode{{< /gloss >}}. You'll need a Kubernetes cluster to proceed. If you don't have a cluster, you can use [kind](/docs/setup/platform-setup/kind) or any other [supported Kubernetes platform](/docs/setup/platform-setup).
Expand Down
1 change: 1 addition & 0 deletions content/en/docs/ambient/getting-started/cleanup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: Delete Istio and associated resources.
weight: 6
owner: istio/wg-networking-maintainers
test: yes
next: /docs/ambient/install
---

If you no longer need Istio and associated resources, you can delete them by following the steps in this section.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: Deploy the Bookinfo sample application.
weight: 2
owner: istio/wg-networking-maintainers
test: yes
prev: /docs/ambient/getting-started
---

To explore Istio, you will install the sample [Bookinfo application](/docs/examples/bookinfo/), composed of four separate microservices used to demonstrate various Istio features.
Expand Down
20 changes: 15 additions & 5 deletions layouts/partials/posts_navigation.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
{{ $skipPageNav := .Scratch.Get "skipPageNav" }}
{{ if not (or .Params.skip_pagenav $skipPageNav) }}
{{ if or .NextInSection .PrevInSection }}
{{ $prev := .NextInSection }}
{{ $next := .PrevInSection }}
{{ with .Params.prev }}
{{$prev = $.Site.GetPage $.Site.Language.Lang .}}
{{ end }}

{{ with .Params.next }}
{{$next = $.Site.GetPage $.Site.Language.Lang .}}
{{ end }}

{{ if or $prev $next }}
<nav class="pagenav">
<div class="left">
{{ if .NextInSection }}
<a title="{{ .NextInSection.Description }}" href="{{ .NextInSection.Permalink }}" class="next-link">{{- partial "icon.html" "left-arrow" -}}{{- .NextInSection.LinkTitle -}}</a>
{{ if $prev }}
<a title="{{ $prev.Description }}" href="{{ $prev.Permalink }}" class="next-link">{{- partial "icon.html" "left-arrow" -}}{{- $prev.LinkTitle -}}</a>
{{ end }}
</div>
<div class="right">
{{ if .PrevInSection }}
<a title="{{ .PrevInSection.Description }}" href="{{ .PrevInSection.Permalink }}" class="next-link">{{- .PrevInSection.LinkTitle -}}{{- partial "icon.html" "right-arrow" -}}</a>
{{ if $next }}
<a title="{{ $next.Description }}" href="{{ $next.Permalink }}" class="next-link">{{- $next.LinkTitle -}}{{- partial "icon.html" "right-arrow" -}}</a>
{{ end }}
</div>
</nav>
Expand Down

0 comments on commit 6bcd883

Please sign in to comment.