mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-05 06:13:14 +00:00
See https://discord.com/channels/722225264733716590/738924091511144489/1406144559188283494 See https://gohugo.io/templates/new-templatesystem-overview/
24 lines
750 B
HTML
24 lines
750 B
HTML
{{/*
|
|
Docs: https://docs.hugoblox.com/content/writing-markdown-latex/#cite
|
|
|
|
Parameters
|
|
----------
|
|
page : required
|
|
Path to Markdown page to be referenced.
|
|
view : optional, default "compact"
|
|
A built-in Hugo Blox Builder view or an installed community view.
|
|
*/}}
|
|
|
|
{{ $page := .Page }}
|
|
{{ $item := .Get "page" }}
|
|
|
|
{{/* Default compact view. */}}
|
|
{{ $view := (.Get "view") | default "compact" }}
|
|
|
|
{{/* Hugo stores all shortcode args as strings, however `render_view` expects legacy numeric views 1-4 to be int */}}
|
|
{{ $view = cond (in (slice "1" "2" "3" "4") $view) (int $view) $view }}
|
|
|
|
{{ with site.GetPage $item }}
|
|
{{ partial "functions/render_view" (dict "page" $page "item" . "view" $view "index" 0) }}
|
|
{{ end }}
|