From 708f9bebfa427f7929e85e889d27671a8fb30f73 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sat, 3 Aug 2019 15:18:15 -0700 Subject: [PATCH] Add a way to include code into a post --- themes/vanilla/layouts/shortcodes/codeblock | 1 + themes/vanilla/layouts/shortcodes/rawblock | 1 + 2 files changed, 2 insertions(+) create mode 100644 themes/vanilla/layouts/shortcodes/codeblock create mode 100644 themes/vanilla/layouts/shortcodes/rawblock diff --git a/themes/vanilla/layouts/shortcodes/codeblock b/themes/vanilla/layouts/shortcodes/codeblock new file mode 100644 index 0000000..3982d6b --- /dev/null +++ b/themes/vanilla/layouts/shortcodes/codeblock @@ -0,0 +1 @@ +{{ highlight (readFile (printf "code/%s" (.Get 1))) (.Get 0) "" }} diff --git a/themes/vanilla/layouts/shortcodes/rawblock b/themes/vanilla/layouts/shortcodes/rawblock new file mode 100644 index 0000000..3352ce0 --- /dev/null +++ b/themes/vanilla/layouts/shortcodes/rawblock @@ -0,0 +1 @@ +
{{ readFile (printf "code/%s" (.Get 0)) }}