Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions content/en/docs/ambient/install/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ aliases:
owner: istio/wg-environment-maintainers
test: n/a
list_below: yes
prev: /docs/ambient/getting-started/cleanup
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thoughts we should remove this; people who find this page don't necessarily come from Getting Started.

Suggested change
prev: /docs/ambient/getting-started/cleanup

---

{{< tip >}}
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 }}
AdeshGhadage marked this conversation as resolved.
Show resolved Hide resolved
<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