first try to get webmentions going

This commit is contained in:
Marvin Steadfast 2020-03-12 16:45:18 +01:00
parent 9678e8d33a
commit 839607e868
6 changed files with 59 additions and 1 deletions

View File

@ -10,12 +10,16 @@ steps:
environment:
FTP_PASS:
from_secret: ftp_pass
WEBMENTIONIO_TOKEN:
from_secret: webmentionio_token
commands:
- apk add --no-cache make
- apk add --no-cache curl make
- 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
- ls -lah data/
- make build
- make ftp_upload
when:

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
data/mentions.json

0
data/.gitkeep Normal file
View File

View File

@ -2,6 +2,7 @@
<main>
<article class="h-entry">
{{ partial "article.html" . }}
{{ partial "mentions.html" . }}
</article>
</main>
{{ end }}

View File

@ -0,0 +1,26 @@
<hr>
<section id="mentions">
<form action="https://webmention.io/xsteadfastx.org/webmention" method="post">
<fieldset>
<label>Have you written a <a href="https://indieweb.org/responses">response</a> to this? Let me know the URL:</label>
<input type="hidden" name="target" value="{{ .Permalink }}">
<div class="row">
<div class="column">
<input type="url" name="source">
</div>
<div class="column">
<input class="button-primary" type="submit" value="Send Webmention">
</div>
</div>
</fieldset>
</form>
<table>
{{ range where .Site.Data.mentions.links "target" .Permalink }}
<tr>
<td><img src="{{ .data.author.photo }}"></td>
<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>
</tr>
{{ end }}
</table>
</section>

View File

@ -189,3 +189,29 @@ body .meta {
article .p-author.h-card {
display: none;
}
article #mentions {
padding-top: 5rem;
padding-left: 0px;
}
article.h-entry section#mentions form fieldset div.row div.column {
padding-left: 0px;
}
.button.default,
button.default,
[type="button"][default],
[type="button"].default,
[type="reset"].default,
[type="submit"] {
background-color: #000000;
}
.button,
button,
[type="button"],
[type="reset"],
[type="submit"] {
border: 0.1rem solid #000000;
}