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/partials/_mdinclude.html')
-rw-r--r--layouts/partials/_mdinclude.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/_mdinclude.html b/layouts/partials/_mdinclude.html
index 812b8c9..f23ea92 100644
--- a/layouts/partials/_mdinclude.html
+++ b/layouts/partials/_mdinclude.html
@@ -16,8 +16,10 @@
{{- end -}}
{{- define "pageBlock" -}}
-{{ $path := printf "%s__%s.md" .page.Dir .name}}
+{{ if .page.File}}
+{{ $path := printf "%s__%s.md" .page.File.Dir .name}}
{{ with .page.Site.GetPage $path }}
{{ .Content }}
{{end}}
{{- end -}}
+{{- end -}}