Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictoria Drake <hello@victoria.dev>2020-07-25 16:38:23 +0300
committerVictoria Drake <hello@victoria.dev>2020-07-25 16:57:40 +0300
commite781be1620c1f5f16044f035c265b937ba4971a7 (patch)
tree7f8c5cc351cad60c1c6d8b2edc0c28753a34a87f /exampleSite/layouts
parent5f5084d870d3af81cf81b701bfd50913b426ba23 (diff)
Add example site configuration post, shortcodes
- Hopefully help explain related issues #217, #194 Close #226
Diffstat (limited to 'exampleSite/layouts')
-rw-r--r--exampleSite/layouts/shortcodes/md.html1
-rw-r--r--exampleSite/layouts/shortcodes/readfile.html8
2 files changed, 9 insertions, 0 deletions
diff --git a/exampleSite/layouts/shortcodes/md.html b/exampleSite/layouts/shortcodes/md.html
new file mode 100644
index 0000000..ed3fb8a
--- /dev/null
+++ b/exampleSite/layouts/shortcodes/md.html
@@ -0,0 +1 @@
+{{.Inner}} \ No newline at end of file
diff --git a/exampleSite/layouts/shortcodes/readfile.html b/exampleSite/layouts/shortcodes/readfile.html
new file mode 100644
index 0000000..36400ac
--- /dev/null
+++ b/exampleSite/layouts/shortcodes/readfile.html
@@ -0,0 +1,8 @@
+{{$file := .Get "file"}}
+{{- if eq (.Get "markdown") "true" -}}
+{{- $file | readFile | markdownify -}}
+{{- else if (.Get "highlight") -}}
+{{- highlight ($file | readFile) (.Get "highlight") "" -}}
+{{- else -}}
+{{ $file | readFile | safeHTML }}
+{{- end -}} \ No newline at end of file