From f42f69a7da9c8c8b9a099a5d1e5c80a125296940 Mon Sep 17 00:00:00 2001 From: vjeantet Date: Sat, 12 Sep 2020 12:57:32 +0200 Subject: fix some hugo WARNs --- layouts/partials/body-article-content.html | 12 +++------ layouts/partials/body-article-sidepage.html | 4 ++- layouts/slide/section.html | 38 +++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 layouts/slide/section.html diff --git a/layouts/partials/body-article-content.html b/layouts/partials/body-article-content.html index 71cec06..14d911d 100644 --- a/layouts/partials/body-article-content.html +++ b/layouts/partials/body-article-content.html @@ -10,9 +10,10 @@ - {{if not .Params.layout }} {{$pagetitle := .Title}} - {{if eq $pagetitle ""}}{{$pagetitle = .File.BaseFileName}}{{end}} + {{if eq $pagetitle ""}} + {{with .File}}{{$pagetitle = .BaseFileName}}{{end}} + {{end}} {{ $cPage := .}} {{ $elements := (where .Sections "NONONO" false) }} @@ -49,11 +50,6 @@ {{- end}} {{ end }} - - - {{else}} -

{{.Title}}

- {{end}} @@ -82,7 +78,7 @@ {{if not (in .Params.hide "nextpage")}} -
+
{{ partial "_next-prev-page.html" .CurrentSection }}
{{end -}} diff --git a/layouts/partials/body-article-sidepage.html b/layouts/partials/body-article-sidepage.html index 219760c..743cd2a 100644 --- a/layouts/partials/body-article-sidepage.html +++ b/layouts/partials/body-article-sidepage.html @@ -24,12 +24,14 @@ {{end}} {{ if .Site.Params.editWithNetlifyCMSURL }} + {{with .Page.File}}
  • {{$dir := (replace .Dir "\\" "/") }}{{if eq $dir "/" }}{{$dir = ""}}{{end}} - + {{T "Edit-this-page"}}
  • + {{end}} {{end}} {{ if not .Page.Lastmod.IsZero }}
  • diff --git a/layouts/slide/section.html b/layouts/slide/section.html new file mode 100644 index 0000000..aecfc89 --- /dev/null +++ b/layouts/slide/section.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + +
    +
    +
    + {{ .RawContent }} +
    +
    +
    + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3