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.html15
1 files changed, 12 insertions, 3 deletions
diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html
index c099e6e..2fd8012 100644
--- a/layouts/shortcodes/include.html
+++ b/layouts/shortcodes/include.html
@@ -1,9 +1,18 @@
{{$file := .Get 0}}
-{{$path := printf "%s%s" .Page.File.Dir $file}}
-{{ with .Site.GetPage $path }}{{ .Content }}{{else}}
+{{ with .Page.File }}
+{{ $path := printf "%s%s" .Dir $file}}
+{{ with $.Site.GetPage $path }}{{ .Page.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
+{{ end }}
+{{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 : Current page file does not exist !
+ <br>
+ <small>param was "{{$file}}"</small>
+</span>
+
+{{end}} \ No newline at end of file