Skip to content

Commit b6456b6

Browse files
layouts: add toc_max and toc_min (#22159)
<!--Delete sections as needed --> ## Description Fix toc_min and toc_max for right nav as defined in https://docs.docker.com/contribute/file-conventions/#front-matter Comparison with existing `toc_max: 2`: https://docs.docker.com/desktop/release-notes/ https://deploy-preview-22159--docsdocker.netlify.app/desktop/release-notes/ ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Editorial review Signed-off-by: Craig <[email protected]>
1 parent fd28bc8 commit b6456b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

layouts/partials/pagemeta.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
{{- end }}
2121

2222
{{- define "walkHeadingFragments" }}
23-
{{- $min := 2 }}
24-
{{- $max := 3 }}
23+
{{- $min := default 2 page.Params.toc_min }}
24+
{{- $max := default 3 page.Params.toc_max }}
2525
<ul class="pl-2">
2626
{{- range . }}
2727
{{- if and (ge .Level $min) (le .Level $max) }}

0 commit comments

Comments
 (0)