diff options
author | vjeantet <valere.jeantet@gmail.com> | 2020-09-12 13:57:32 +0300 |
---|---|---|
committer | vjeantet <valere.jeantet@gmail.com> | 2020-09-12 13:57:32 +0300 |
commit | f42f69a7da9c8c8b9a099a5d1e5c80a125296940 (patch) | |
tree | 4d7163395b0f5a76ee90f5f6a130bd008b7a8a8d | |
parent | 9ac8e55791d0352973fc411a025079ee62feb331 (diff) |
fix some hugo WARNs
-rw-r--r-- | layouts/partials/body-article-content.html | 12 | ||||
-rw-r--r-- | layouts/partials/body-article-sidepage.html | 4 | ||||
-rw-r--r-- | layouts/slide/section.html | 38 |
3 files changed, 45 insertions, 9 deletions
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 @@ <!-- FIN FIL D'ARIANE -->
<!-- TITRE -->
- {{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}}
</nav>
{{ end }}
-
-
- {{else}}
- <h1>{{.Title}}</h1>
- {{end}}
<!-- FIN TITRE -->
<!-- JUMP TO SECTION -->
@@ -82,7 +78,7 @@ {{if not (in .Params.hide "nextpage")}}
- <div class="chevrons {{.Params.layout}}">
+ <div class="chevrons">
{{ partial "_next-prev-page.html" .CurrentSection }}
</div>
{{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,13 +24,15 @@ {{end}} {{ if .Site.Params.editWithNetlifyCMSURL }} + {{with .Page.File}} <li> {{$dir := (replace .Dir "\\" "/") }}{{if eq $dir "/" }}{{$dir = ""}}{{end}} - <a href="{{ .Site.BaseURL }}{{ .Site.Params.editWithNetlifyCMSURL }}{{with .File}}{{ replace .Dir "\\" "/" | safeURL }}{{ .BaseFileName }}{{end}}" target="blank"> + <a href="{{ $.Site.BaseURL }}{{ $.Site.Params.editWithNetlifyCMSURL }}{{ $dir | safeURL }}{{ .BaseFileName }}" target="blank"> <i class="fab fa-github"></i> {{T "Edit-this-page"}}</a> </li> {{end}} + {{end}} {{ if not .Page.Lastmod.IsZero }} <li> <i class='fas fa-calendar'></i> 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 @@ +<!doctype html> +<html> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> + + + <link rel="stylesheet" href="{{"/vendor/revealjs/reveal.js-master/dist/reset.css"|relURL}}"> + <link rel="stylesheet" href="{{"/vendor/revealjs/reveal.js-master/dist/reveal.css"|relURL}}"> + <link rel="stylesheet" href="{{"/vendor/revealjs/reveal.js-master/dist/theme/black.css"|relURL}}" id="theme"> + <!-- Theme used for syntax highlighted code --> + <link rel="stylesheet" href="{{"/vendor/revealjs/reveal.js-master/plugin/highlight/monokai.css"|relURL}}" id="highlight-theme"> + </head> + <body> + <div class="reveal"> + <div class="slides"> + <section data-markdown + data-separator="^---" + data-separator-vertical="^___" + data-separator-notes="^Note:"> + {{ .RawContent }} + </section> + </div> + </div> + + <script src="{{"/vendor/revealjs/reveal.js-master/dist/reveal.js"|relURL}}"></script> + <script src="{{"/vendor/revealjs/reveal.js-master/plugin/notes/notes.js"|relURL}}"></script> + <script src="{{"/vendor/revealjs/reveal.js-master/plugin/markdown/markdown.js"|relURL}}"></script> + <script src="{{"/vendor/revealjs/reveal.js-master/plugin/highlight/highlight.js"|relURL}}"></script> + + <script> + Reveal.initialize({ + plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ], + }); + </script> + + + </body> +</html>
\ No newline at end of file |