Replace slashes in mentions md5, sort mentions
This commit is contained in:
parent
b66a0fd89a
commit
1b8918c74b
|
@ -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 }}
|
||||
|
|
Reference in New Issue