jlelse
/
Indieroad
Archived
1
Fork 0

Replace slashes in mentions md5, sort mentions

This commit is contained in:
Jan-Lukas Else 2019-12-13 08:34:05 +01:00
parent b66a0fd89a
commit 1b8918c74b
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{{ if .Param "indieweb.enabled" }}
{{ $md5pl := md5 .Permalink }}
{{ $md5pl := md5 (replace .Permalink "/" "") }}
{{ $mentions := index .Site.Data.mentions $md5pl }}
{{ $dateFormat := ( .Site.Params.dateformat | default "January 02, 2006") }}
{{ with $mentions }}
@ -7,7 +7,7 @@
<details>
<summary class="caption">{{ T "interactions" }}</summary>
<ul class="mentions-list">
{{ range . }}
{{ range sort . ".date" "asc" }}
{{ $sourceUrl := urls.Parse .source }}
<li class="item"><a href="{{ .source }}" target="_blank" rel="nofollow noopener">{{ $sourceUrl.Host }}</a> <i>{{ dateFormat $dateFormat .date }}</i></li>
{{ end }}