diff --git a/exampleSite/layouts/partials/home/reveal-hugo/body.html b/exampleSite/layouts/partials/home/reveal-hugo/body.html new file mode 100644 index 0000000..1dba7f9 --- /dev/null +++ b/exampleSite/layouts/partials/home/reveal-hugo/body.html @@ -0,0 +1,9 @@ + + + + diff --git a/exampleSite/layouts/partials/home/reveal-hugo/head.html b/exampleSite/layouts/partials/home/reveal-hugo/head.html new file mode 100644 index 0000000..58b786e --- /dev/null +++ b/exampleSite/layouts/partials/home/reveal-hugo/head.html @@ -0,0 +1,18 @@ + + + diff --git a/layouts/_default/baseof.reveal.html b/layouts/_default/baseof.reveal.html index 9db28a3..c2713bc 100644 --- a/layouts/_default/baseof.reveal.html +++ b/layouts/_default/baseof.reveal.html @@ -30,17 +30,19 @@ link.href = window.location.search.match( /print-pdf/gi ) ? '{{ $reveal_cdn}}/css/print/pdf.css' : '{{ $reveal_cdn }}/css/print/paper.css'; document.getElementsByTagName( 'head' )[0].appendChild( link ); - + {{- partial "reveal-hugo/head" . -}} + + {{- $sectionHeadPartial := printf "%s/reveal-hugo/head" (.Page.Section | default "home") -}} + {{- if fileExists (printf "layouts/partials/%s.html" $sectionHeadPartial) -}}{{ partial $sectionHeadPartial . }}{{- end }} {{- block "main" . -}}{{- end -}} - - - {{ partial "reveal-hugo/body" . }} + + {{- partial "reveal-hugo/body" . }} + + {{- $sectionBodyPartial := printf "%s/reveal-hugo/body" (.Page.Section | default "home") -}} + {{- if fileExists (printf "layouts/partials/%s.html" $sectionBodyPartial) -}}{{ partial $sectionBodyPartial . }}{{- end }}