mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +00:00
Webmentions: trim displayed URLs
When a title is unavailable, we fall back to displaying the URL. Trim the https://(www.)? prefix and trailing slashes.
This commit is contained in:
parent
88689a9676
commit
8bcfa63859
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@
|
||||||
{{- if $webmention.title -}}
|
{{- if $webmention.title -}}
|
||||||
{{- $webmention.title | truncate 200 -}}
|
{{- $webmention.title | truncate 200 -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $webmention.source | truncate 35 -}}
|
{{- $webmention.source | strings.TrimPrefix "https://" | strings.TrimPrefix "www." | strings.TrimRight "/" | truncate 35 -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</span></a>
|
</span></a>
|
||||||
{{- if $webmention.author_name }}
|
{{- if $webmention.author_name }}
|
||||||
|
|
Loading…
Reference in a new issue