jlelse
/
Indieroad
Archived
1
Fork 0
This repository has been archived on 2020-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
Indieroad/layouts/partials/mentions.html

17 lines
696 B
HTML

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