From 4afdb4deba1d463e935e2546429973a5e452be36 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 29 Jul 2020 13:56:16 +0100 Subject: [PATCH] feat: add cite shortcode --- layouts/shortcodes/cite.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 layouts/shortcodes/cite.html diff --git a/layouts/shortcodes/cite.html b/layouts/shortcodes/cite.html new file mode 100644 index 00000000..37e38804 --- /dev/null +++ b/layouts/shortcodes/cite.html @@ -0,0 +1,17 @@ +{{ $page := .Get "page" }} + +{{/* Default compact view. */}} +{{ $view := (.Get "view") | default 2 }} +{{ $view = int $view }} + +{{ with site.GetPage $page }} + {{ if eq $view 1 }} + {{ partial "li_list" . }} + {{ else if eq $view 3 }} + {{ partial "li_card" . }} + {{ else if eq $view 4 }} + {{ partial "li_citation" . }} + {{ else }} + {{ partial "li_compact" . }} + {{ end }} +{{ end }}