From 938428333e5009ee537749760fd56dcd470a6727 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sun, 17 Jan 2021 19:42:07 -0800 Subject: [PATCH] Indieweb: statically display webmentions Statically grab and include webmentions during Hugo builds, no JS involved. Hugo supports making web requests and parsing the resulting JSON, so there was no need to use an external program either. --- assets/css/main.css | 4 +-- layouts/_default/single.html | 42 ++++++++++++++++++------- layouts/partials/posts.html | 2 +- layouts/partials/processed-content.html | 9 ++++-- 4 files changed, 40 insertions(+), 17 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index d5e610b..b8e602d 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -43,11 +43,11 @@ nav li { * of the "date + title" format is enough to convey separation * between elements. */ -.posts { +.unstyled-list { padding: 0; } -.posts li { +.unstyled-list li { list-style-type: none; margin-bottom: 1rem; } diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8fc6d7b..5fb73b7 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,17 +14,37 @@
{{ partial "processed-content" . -}}
- -
-
- + +
+
+
+
{{ end }} diff --git a/layouts/partials/posts.html b/layouts/partials/posts.html index 51a6832..9d13b45 100644 --- a/layouts/partials/posts.html +++ b/layouts/partials/posts.html @@ -4,7 +4,7 @@

Posts

{{ end -}}

Timestamp format: YYYY-MM-DD, as per RFC 3339 and ISO 8601

-