mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
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 <craig.osterhout@docker.com>
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
{{- end }}
|
||||
|
||||
{{- define "walkHeadingFragments" }}
|
||||
{{- $min := 2 }}
|
||||
{{- $max := 3 }}
|
||||
{{- $min := default 2 page.Params.toc_min }}
|
||||
{{- $max := default 3 page.Params.toc_max }}
|
||||
<ul class="pl-2">
|
||||
{{- range . }}
|
||||
{{- if and (ge .Level $min) (le .Level $max) }}
|
||||
|
||||
Reference in New Issue
Block a user