add *commented out* webmention section

This commit is contained in:
Hedy Li 2021-08-25 11:46:58 +08:00
parent 3a8ae66cf4
commit a0db293a56
Signed by: hedy
GPG Key ID: B51B5A8D1B176372
1 changed files with 24 additions and 0 deletions

View File

@ -27,4 +27,28 @@
or to me <a href="mailto:hedy@tilde.cafe">directly</a>.
</p>
</section>
{{/*
<section class="webmentions">
<h2>Webmentions</h2>
<ul class="unstyled-list">
{{ $target := .RelPermalink -}}
{{ $url := printf "https://seirdy.one/webmentions/get?status=approved&target=https://seirdy.one%s" $target -}}
{{ $webmentions := getJSON $url -}}
{{ range $webmentions -}}
{{ $webmention := . -}}
<li>
<time datetime="{{ dateFormat "2006-01-02 15:04:05Z07:00" $webmention.created_at }}">{{ dateFormat "2006-01-02" $webmention.created_at }}</time>
<br>
{{ if (eq $webmention.type "like") -}}
<a href="{{ $webmention.source }}" rel="nofollow">{{ if $webmention.author_name }}{{ $webmention.author_name }}{{ else }}{{ $webmention.title }}{{ end }}</a> liked this
{{else -}}
<a href="{{ $webmention.source }}" rel="nofollow">{{ $webmention.title }}</a>
{{- end }}
</li>
{{ else -}}
<li><p>This post doesn't have any approved Webmentions yet.</p></li>
{{- end }}
</ul>
</section>
*/}}
{{ end }}