diff --git a/modules/blox-tailwind/layouts/_shortcodes/cite.html b/modules/blox-tailwind/layouts/_shortcodes/cite.html new file mode 100644 index 00000000..8fb605aa --- /dev/null +++ b/modules/blox-tailwind/layouts/_shortcodes/cite.html @@ -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 }} diff --git a/starters/academic-cv/content/post/teach-courses/index.md b/starters/academic-cv/content/post/teach-courses/index.md index f1d1dd6f..19990a37 100644 --- a/starters/academic-cv/content/post/teach-courses/index.md +++ b/starters/academic-cv/content/post/teach-courses/index.md @@ -19,6 +19,16 @@ image: On this page, you'll find some examples of the types of technical content that can be rendered with Hugo Blox. +## Citation + +Here's an example of citing a publication using the cite shortcode: + +{{< cite page="/publication/preprint" view="citation" >}} + +You can also use the default view by omitting the view parameter: + +{{< cite page="/publication/conference-paper" >}} + ## Video Teach your course by sharing videos with your students. Choose from one of the following approaches: