Website Summary Files Commits Branches @commit @diff @stats
path: root / website / layouts / shortcodes / readpost.html
diff options
context:
space:
mode:
Commit28e13917829d649c71ed1696519db8f1845466b3 (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-10-04 08:20:14 +0300
Committer
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-10-04 08:20:14 +0300
Files9079ae947a4271ad835f1c9ad10516e6d43f7f20 /website/layouts/shortcodes/readpost.html
IPL-28e13917829d649c71ed1696519db8f1845466b3.tar
IPL-28e13917829d649c71ed1696519db8f1845466b3.tar.gz
IPL-28e13917829d649c71ed1696519db8f1845466b3.zip
Parentb65dbe28ba20a14de4c194e93284f9f1a4aa8858 (diff)
Parent49eed25b200c0f5f0aba46baa3f7332d0e93b276 (diff)
Merge branch 'feature/themes'
- Switch theme to hugo-clarity - Move old content to 2018
1 files changed, 10 insertions, 0 deletions
-rw-r--r--website/layouts/shortcodes/readpost.html10
diff --git a/website/layouts/shortcodes/readpost.html b/website/layouts/shortcodes/readpost.html
new file mode 100644
index 0000000..5f80a27
--- /dev/null
+++ b/website/layouts/shortcodes/readpost.html
@@ -0,0 +1,10 @@
+{{$file := .Get "file"}}
+{{$content := $file | readFile | replaceRE "^---[[:graph:][:space:]]*?---\n" "" }}
+
+{{- if eq (.Get "markdown") "true" -}}
+ {{- $content | markdownify -}}
+{{- else if (.Get "highlight") -}}
+ {{- highlight ($content) (.Get "highlight") "" -}}
+{{- else -}}
+ {{ $content | safeHTML }}
+{{- end -}}