{{/* - Multi-page guide: render a progress bar - */}}
{{ $totalPages := len .CurrentSection.Pages }} {{/* - initialize the page store $stepper_seen controls the color of the item in the stepper green: "completed" - index is lower than current page blue: current page gray: next in section for the section page, they're all gray default to true if kind = section (make all entries gray) - */}} {{ page.Store.Set "stepper_seen" .IsSection }} {{/* - Loop over the pages in this guide - */}} {{ range $i, $e := .CurrentSection.Pages }} {{ $isLast := eq (add $i 1) $totalPages }}
{{/* - Render the page's index digit (1,2,3,4 etc) - */}} {{ add $i 1 }} {{/* - Render the vertical border - */}} {{ if not $isLast }}
{{ end }}
{{/* - Render the page's title - */}}
{{ end }}