json feeds and favicon support
[kengrimes.com/theme.git] / layouts / _default / baseof.html
index 96e0c13..d57f909 100644 (file)
@@ -6,6 +6,7 @@
     <script src="/js/speedy.js"></script>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
+    {{- partialCached "meta.html" . -}}
     {{ .Hugo.Generator }}
   </head>
   <body>
       {{- $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 +41,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>