Files
hugo_blog.awin.one/layouts/partials/utils/get-bundles.html
2022-05-10 01:13:38 +08:00

7 lines
342 B
HTML

{{ $currentPage := . }}
{{ $bundles := slice $currentPage }}
{{ if and (ne $currentPage.Kind "taxonomy") (or (ne $currentPage $currentPage.FirstSection) (eq $currentPage.Kind "term")) }}
{{ $currentBundles := partial "utils/get-bundles" $currentPage.Parent }}
{{ $bundles = $bundles | append $currentBundles }}
{{ end }}
{{ return $bundles }}