mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-15 02:16:10 +00:00
1 parent
0c41b518dc
commit
37518f31f5
2 files changed
+35
No files matched your search
@@ -0,0 +1,25 @@
|
||||
{{/*
|
||||
Docs: https://docs.hugoblox.com/content/writing-markdown-latex/#cite
|
||||
|
||||
Cite shortcode for Hugo Blox Builder.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
page : required
|
||||
Path to Markdown page to be referenced.
|
||||
view : optional, default "citation"
|
||||
A built-in Hugo Blox Builder 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 }}
|
||||
Reference in new issue
Block a user