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

Fix: handle webmentions without titles

This commit is contained in:
Rohan Kumar 2022-02-04 11:28:18 -08:00
parent 42c87d6970
commit e3d0603a3f
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -44,9 +44,9 @@
<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
<a href="{{ $webmention.source }}" rel="nofollow">{{ if $webmention.author_name }}{{ $webmention.author_name }}{{ else if $webmention.title }}{{ $webmention.title }}{{ else }}{{ $webmention.source }}{{ end }}</a> liked this
{{else -}}
<a href="{{ $webmention.source }}" rel="nofollow">{{ $webmention.title }}</a>
<a href="{{ $webmention.source }}" rel="nofollow">{{ if $webmention.title }}{{ $webmention.title }}{{ else }}{{ $webmention.source }}{{ end }}</a>
{{- end }}
</li>
{{ else -}}