mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 18:15:31 +00:00
26 lines
708 B
HTML
26 lines
708 B
HTML
{{/*
|
|
Docs: https://docs.hugoblox.com/content/writing-markdown-latex/#cite
|
|
|
|
Cite shortcode for Hugo Blox Kit.
|
|
|
|
Parameters
|
|
----------
|
|
page : required
|
|
Path to Markdown page to be referenced.
|
|
view : optional, default "citation"
|
|
A built-in Hugo Blox Kit view or an installed community view.
|
|
|
|
*/}}
|
|
|
|
{{ $page := .Page }}
|
|
{{ $item := .Get "page" }}
|
|
|
|
{{/* Default to citation view for Tailwind module */}}
|
|
{{ $view := (.Get "view") | default "citation" }}
|
|
|
|
{{ with site.GetPage $item }}
|
|
{{ partial "functions/render_view" (dict "page" $page "item" . "view" $view "index" 0) }}
|
|
{{ else }}
|
|
{{ warnf "Failed to find page for cite shortcode: %s" $item }}
|
|
{{ end }}
|