diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 2ac074f..c0ec1d7 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -21,5 +21,6 @@ {{ end }} {{ end }} {{ define "content-footer" }} +{{ partial "webmentions.html" . }} {{ partial "paginator.html" .Paginator }} {{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1cee266..b873382 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -15,5 +15,6 @@ {{ end }} {{ define "content-footer" }} +{{ partial "webmentions.html" . }} {{ partial "prev-next-page.html" . }} {{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 82905b8..ba0730c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -19,5 +19,6 @@ {{ end }} {{ define "content-footer" }} +{{ partial "webmentions.html" . }} {{ partial "paginator.html" .Paginator }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/webmentions.html b/layouts/partials/webmentions.html new file mode 100644 index 0000000..2085092 --- /dev/null +++ b/layouts/partials/webmentions.html @@ -0,0 +1,26 @@ +{{ $urlized := .Page.Permalink | md5 }} +{{ if ne .Site.Data.webmentions nil }} +{{ if index .Site.Data.webmentions $urlized }} +
+ {{ $likes := index (index .Site.Data.webmentions $urlized) "like-of" }} + {{ $replys := index (index .Site.Data.webmentions $urlized) "in-reply-to" }} + {{ $reposts := index (index .Site.Data.webmentions $urlized) "repost-of"}} +

Likes

+ {{ range $i, $like := $likes }} + {{ $like.author.name }} + {{end}} + +

Reposts

+ {{ range $i, $repost := $reposts }} + {{ $repost.author.name }} + {{end}} + +

Comments and Replies

+ {{ range $i, $reply := $replys }} + {{ $reply.author.name }} + {{ end }} +
+{{ end }} +{{ end }} \ No newline at end of file