feat: add support for webmentions

This commit is contained in:
2025-07-12 18:54:02 +07:00
parent 02c3adb06e
commit f18f8d7d24
10 changed files with 805 additions and 12 deletions

View File

@@ -21,10 +21,17 @@
</div>
{% endif %}
{# Button to go to the comment section #}
{% if comment_system %}
<a href="#comments" id="comments-button" class="no-hover-padding" title="{{ macros_translate::translate(key="go_to_comments", default="Go to comments section", language_strings=language_strings) }}">
<svg viewBox="0 0 20 20" fill="currentColor"><path d="M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z" clip-rule="evenodd" fill-rule="evenodd"/></svg>
{# Button to go to the comment/webmentions section #}
{% if comment_system or config.extra.webmentions.enable %}
{%- if comment_system -%}
{#- Comments are shown above webmentions -#}
{%- set comments_id = "comments" -%}
{%- else -%}
{%- set comments_id = "webmentions" -%}
{%- endif -%}
<a href="#{{- comments_id -}}" id="comments-button" class="no-hover-padding" title="{{ macros_translate::translate(key="go_to_comments", default="Go to comments section", language_strings=language_strings) }}">
<svg viewBox="0 0 20 20" fill="currentColor"><path d="M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z" clip-rule="evenodd" fill-rule="evenodd"/></svg>
</a>
{% endif %}