Sofía Aritz
8876c53ecb
Based on https://berglyd.net/blog/2023/03/mastodon-comments/ Scripts are loaded only on blog posts. DOMPurify comes from the 0.3.1 release (dist/ on their GitHub repo)
27 lines
690 B
Plaintext
27 lines
690 B
Plaintext
---
|
|
layout: simple_page.njk
|
|
load_comments_script: true
|
|
---
|
|
|
|
<h1>{{ title }}</h1>
|
|
{% if date %}
|
|
<time datetime="{{ date | htmlDateString }}">{{ date | readableDate }}</time> |
|
|
{% endif %}
|
|
{% if tags %}
|
|
{% for tag in tags %}
|
|
<span>{{ tag }} {% if loop.last == false %}·{% endif %}</span>
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
{{ content | timeToRead }}
|
|
|
|
|
|
{{ content | safe }}
|
|
|
|
{% if comment_status %}
|
|
<hr>
|
|
<h3>comentarios · <a href="https://hachyderm.io/@sofiaritz/{{ comment_status }}">ver en el servidor</a></h3>
|
|
<button data-status="{{ comment_status }}" id="comment-load-btn">Cargar comentarios</button>
|
|
<section id="comment-section"></section>
|
|
{% endif %}
|