1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-27 14:12:09 +00:00

Handle "like" webmentions properly

Display a "like" webmention in the format "<Name> liked this" instead of
using the standard pingback format.
This commit is contained in:
Rohan Kumar 2021-01-19 13:16:42 -08:00
parent 8a527895a3
commit 552b8c9417
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -35,11 +35,15 @@
<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">{{ $webmention.author_name }}</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 -}}
{{- end }}
</ul>
</section>
</footer>