|
|
@ -1,17 +1,12 @@ |
|
|
|
{{ if .Param "indieweb.enabled" }} |
|
|
|
{{ if not (.Param "indieweb.hidewmform") }} |
|
|
|
{{ if .Param "indieweb.endpoints.webmention" }} |
|
|
|
{{ $md5pl := md5 (replace .Permalink "/" "") }} |
|
|
|
{{ $mentions := index .Site.Data.mentions $md5pl }} |
|
|
|
{{ $dateFormat := ( .Site.Params.dateformat | default "January 02, 2006") }} |
|
|
|
<details class="p" id="interactions"> |
|
|
|
<summary><b>{{ T "interactions" }}</b></summary> |
|
|
|
{{ with $mentions }} |
|
|
|
<ul> |
|
|
|
{{ range sort . ".date" "asc" }}{{ $sourceUrl := urls.Parse .source }} |
|
|
|
<li><a href="{{ .source }}" target="_blank" rel="nofollow noopener noreferrer">{{ $sourceUrl.Host }}</a> <i>{{ dateFormat $dateFormat .date }}</i></li> |
|
|
|
{{ end }} |
|
|
|
</ul> |
|
|
|
{{ if .Param "indieweb.endpoints.webmentiond" }} |
|
|
|
<div id="mentionslist"></div> |
|
|
|
{{ $wmScript := resources.Get "js/webmentions.template.js" | resources.ExecuteAsTemplate "js/webmentions.js" . | minify | fingerprint }} |
|
|
|
<script defer src="{{ $wmScript.RelPermalink }}" integrity="{{ $wmScript.Data.Integrity }}"></script> |
|
|
|
{{ end }} |
|
|
|
<form method="post" action="{{ .Param "indieweb.endpoints.webmention" }}"> |
|
|
|
<label for="wm-source" class="p">{{ T "wmform_label" }}</label> |
|
|
|