using .Page.Description instead of .Page.Params.heading
[kengrimes.com/theme.git] / layouts / _default / baseof.html
index 96e0c13..ddfb8b0 100644 (file)
       {{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
       <img src="{{ $ph }}">
       <div>
-        {{- if not .Page.Params.heading }}
-        {{ .Page.Title }}
-        {{- else if eq (printf "%T" .Page.Params.heading) "string" }}
-        {{ .Page.Params.heading }}
-        {{- else }}
-        {{- index .Page.Params.heading 0 }}
-        {{- if (gt (len .Page.Params.heading) 1) }}
-        {{- range after 1 .Page.Params.heading -}}
-        <br>
-        {{ . }}
-        {{- end -}}
-        {{- end -}}
-        {{- end }}
+        <p>
+          {{- if not .Page.Description }}
+          {{ .Page.Title }}
+          {{- else }}
+          {{ replaceRE "\n\n" "<br>\n" .Page.Description | safeHTML }}
+          {{- end }}
+        </p>
       </div>
     </header>
     <nav>
@@ -46,9 +40,9 @@
         {{ cond (not $sp.Params.menu.main.title) $sp.Title $sp.Params.menu.main.title }}
       </footer>
     </nav>
-    <main>
+    <article>
       {{ block "main" . }}{{ end }}
-    </main>
+    </article>
     <footer>
       <p>&copy;{{ .Site.Copyright }}</p>
     </footer>