diff options
author | vjeantet <valere.jeantet@gmail.com> | 2020-09-25 10:34:09 +0300 |
---|---|---|
committer | vjeantet <valere.jeantet@gmail.com> | 2020-09-25 10:34:09 +0300 |
commit | 025b2c65c6af04530fd5dcb8157a59f8257897b1 (patch) | |
tree | bfc82237aee5df0d1e875950b886efc653483493 /layouts/partials | |
parent | e4e112f9f561c428fa2d443aecbc82cacbbeae27 (diff) |
fiw hugo build warns
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/_mdinclude.html | 4 | ||||
-rw-r--r-- | layouts/partials/body-article-content.html | 2 |
2 files changed, 5 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 -}} diff --git a/layouts/partials/body-article-content.html b/layouts/partials/body-article-content.html index f4d9698..73f2abf 100644 --- a/layouts/partials/body-article-content.html +++ b/layouts/partials/body-article-content.html @@ -41,6 +41,7 @@ {{ if gt (len $elements) 0}}
<nav class="subpages">
{{- range $elements}}
+ {{- if .File -}}
{{- if and (not .Params.hidden) ( not (hasPrefix .File.BaseFileName "__")) }}
{{$pagetitle := .Title}}
{{if eq $pagetitle ""}}{{$pagetitle = .File.BaseFileName}}{{end}}
@@ -48,6 +49,7 @@ <a title="$pagetitle" href="{{ .RelPermalink}}">{{safeHTML .Params.Pre}}{{$pagetitle}}{{safeHTML .Params.Post}}</a>
</li>
{{- end}}
+ {{- end}}
{{- end}}
</nav>
{{ end }}
|