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

github.com/vjeantet/hugo-theme-docport.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/include.html')
-rw-r--r--layouts/shortcodes/include.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html
new file mode 100644
index 0000000..c099e6e
--- /dev/null
+++ b/layouts/shortcodes/include.html
@@ -0,0 +1,9 @@
+{{$file := .Get 0}}
+{{$path := printf "%s%s" .Page.File.Dir $file}}
+{{ with .Site.GetPage $path }}{{ .Content }}{{else}}
+<span style=" border: 4px dashed white;display: block;background-color: red;padding: 1em;color:white; font-size: large;font-weight: bold;text-transform: capitalize;">
+ Include : File "{{$path}}" not found !
+ <br>
+ <small>param was "{{$file}}"</small>
+</span>
+{{ end }} \ No newline at end of file