webmention like support

This commit is contained in:
Marvin Steadfast 2020-03-12 17:31:07 +01:00
parent b73c7f4fb6
commit d38398a826
2 changed files with 6 additions and 2 deletions

View File

@ -13,13 +13,12 @@ steps:
WEBMENTIONIO_TOKEN:
from_secret: webmentionio_token
commands:
- apk add --no-cache curl make git npm jq
- apk add --no-cache curl make git npm
- mkdir -p ~/.config/rclone
- make rclone_config
- cat ~/.config/rclone/rclone.conf
- make install_deps
- curl "https://webmention.io/api/mentions?token=$$WEBMENTIONIO_TOKEN" -o data/mentions.json
- cat data/mentions.json|jq
- make build
- make ftp_upload
- npm install @remy/webmention

View File

@ -19,7 +19,12 @@
{{ range where .Site.Data.mentions.links "target" .Permalink }}
<tr>
<td><img src="{{ .data.author.photo }}"></td>
{{ if eq .activity.type "reply" }}
<td>{{ .data.content | safeHTML}} <small>- <a href="{{ .data.author.url }}">{{ .data.author.name }}</a> &commat; <a href="{{ .data.url }}">{{ dateFormat "Monday, Jan 2, 2006" .data.published }}</a></small></td>
{{ end }}
{{ if eq .activity.type "like" }}
<td><small>liked by <a href="{{ .data.author.url }}">{{ .data.author.name }}</a></small></td>
{{ end }}
</tr>
{{ end }}
</table>