cite.html 454 B

123456789101112
  1. {{ $page := .Page }}
  2. {{ $item := .Get "page" }}
  3. {{/* Default compact view. */}}
  4. {{ $view := (.Get "view") | default "compact" }}
  5. {{/* Hugo stores all shortcode args as strings, however `render_view` expects legacy numeric views 1-4 to be int */}}
  6. {{ $view = cond (in (slice "1" "2" "3" "4") $view) (int $view) $view }}
  7. {{ with site.GetPage $item }}
  8. {{ partial "functions/render_view" (dict "page" $page "item" . "view" $view "index" 0) }}
  9. {{ end }}