hugo-ataru

Hugo theme with titleless posts and microformats2 support

git clone git://git.shimmy1996.com/hugo-ataru.git
commit b24338c1edea937362c911f1fda99b8e7e68d9ac
parent ca8988c4237b17ca91bce8b05f504ff84573a6e7
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Thu,  9 Apr 2020 07:15:24 -0500

Use summary in list view and add hyperskip

Diffstat:
Mlayouts/_default/list.html | 2+-
Mlayouts/_default/single.html | 1+
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
@@ -13,7 +13,7 @@
       - <a class="p-author h-card" href="{{ .Site.Author.url }}">{{ .Site.Author.name }}</a>
       {{ with .Title }}<h1 class="p-name">{{ . }}</h1>{{ end }}
     </header>
-    <div class="e-content">{{ .Content }}</div>
+    <div class="p-summary">{{ range (findRE "<p>.*</p>" .Content 1) }}{{ (replaceRE "<.p>" "" .) | safeHTML}}{{ end }}</div>
   </article>
   {{ end }}
 </main>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -8,4 +8,5 @@
   </header>
   <div class="e-content">{{ .Content }}</div>
 </main>
+{{ partial "hyperskip.html" . }}
 {{ end }}