this repo has no description

ft: show Webmentions on articles

Changed files
+33 -5
.github
workflows
templates
+16
.github/workflows/rebuild.yml
···
+
name: Trigger Netlify rebuild
+
on:
+
schedule:
+
# Run every 4h
+
- cron: '0 */4 * * *'
+
+
jobs:
+
trigger:
+
name: Send trigger
+
runs-on: ubuntu-latest
+
env:
+
BUILD_HOOK_URL: 'https://api.netlify.com/build_hooks/629f4bdea589057c66219efd'
+
steps:
+
- name: Run cURL request
+
run: |
+
curl -X POST -d '{}' "$BUILD_HOOK_URL"
+17 -5
templates/page.html
···
</div>
{%- endif -%}
-
<!--
<div class="webmentions">
{%- set webmentions = load_data(url="https://webmention.io/api/mentions.jf2?target=" ~ page.permalink, format="json") -%}
-
{%- for mention in webmentions.children -%}
-
Foo
+
{%- if webmentions.children | length > 0 -%}
+
<p>Webmentions:</p>
+
<ul>
+
{%- for mention in webmentions.children -%}
+
<li>
+
<a href="{{ mention.url }}">
+
{%- if mention.name -%}
+
{{ mention.name }}
+
{%- else -%}
+
{{ mention.url }}
+
{%- endif -%}
+
</a>
+
by <a href="{{ mention.author.url }}">{{ mention.author.name }}</a>
+
</li>
+
{%- endfor -%}
+
</ul>
{%- else -%}
No webmentions yet, you can be first.
-
{%- endfor -%}
+
{%- endif -%}
</div>
-
-->
</article>
{%- endblock main -%}