hugo-ataru

Hugo theme with titleless posts and microformats2 support

git clone git://git.shimmy1996.com/hugo-ataru.git
commit 6bd29fbe344cec65115a4d6f88ab0df21fdd29d0
parent 2ef3d39f5723f2e204f905ed0f32c4af6cadf1a9
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sun, 12 Apr 2020 23:18:43 -0500

Simplify headers, and markup home page with h-feed

Diffstat:
Mlayouts/_default/list.html | 12++++--------
Mlayouts/partials/header.html | 7+------
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
@@ -1,18 +1,14 @@
 {{ define "main" }}
-<main>
+<main class="h-feed">
   {{ $pag := partial "get_paginator.html" . }}
   {{ if (and .IsHome (not $pag.HasPrev)) }}
-  <div class="h-card">{{ .Content }}</div>
+  {{ .Content }}
   {{ end }}
   {{ range $pag.Pages }}
-  <article class="h-entry">
+  <div class="h-entry">
     {{ partial "header.html" . }}
-    {{ if eq .Section "posts" }}
-    <div class="p-summary">{{ range (findRE "<p>.*</p>" .Content 1) }}{{ (replaceRE "<.p>" "" .) | safeHTML}}{{ end }}</div>
-    {{ else }}
     <div class="e-content">{{ .Content }}</div>
-    {{ end }}
-  </article>
+  </div>
   {{ end }}
 </main>
 {{ end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
@@ -1,10 +1,5 @@
 <header>
   {{ $timestamp := .Date.Format "2006-01-02T15:04:05Z07:00" }}
   <a class="u-url" href="{{ .Permalink }}"><time class="dt-published" datetime="{{ $timestamp }}">{{ $timestamp }}</time></a>
-  - <a class="p-author h-card" href="{{ .Site.Author.url }}">{{ .Site.Author.name }}</a>
-  {{ with .Title }}{{ if $.IsNode }}
-  <h2 class="p-name">{{ . }}</h2>
-  {{ else }}
-  <h1 class="p-name">{{ . }}</h1>
-  {{ end }}{{ end }}
+  {{ with .Title }}<h1>{{ . }}</h1>{{ end }}
 </header>