+
+
{{ page.title | markdown(inline=true) | safe }}
+
{#- Draft indicator -#}
@@ -137,7 +138,7 @@
{%- endif -%}
{%- set by_author = macros_translate::translate(key="by_author", default="By $AUTHOR", language_strings=language_strings) -%}
-
- {{ by_author | replace(from="$AUTHOR", to=author_string) }}
+ - {{ by_author | replace(from="$AUTHOR", to=author_string) }}
{%- set previous_visible = true -%}
{% endif %}
@@ -145,7 +146,7 @@
{#- Date -#}
{% if page.date and macros_settings::evaluate_setting_priority(setting="show_date", page=page, default_global_value=true) == "true" %}
-
- {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }}
+ - {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }}
{#- Variable to keep track of whether we've shown a section, to avoid separators as the first element -#}
{%- set previous_visible = true -%}
{% endif %}
@@ -160,7 +161,7 @@
{%- if page.taxonomies and page.taxonomies.tags -%}
- {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}:
{%- for tag in page.taxonomies.tags -%}
- - {{ tag }}
+
- {{ tag }}
{%- if not loop.last -%}
,
{%- endif -%}
@@ -175,7 +176,7 @@
{%- set formatted_date = macros_format_date::format_date(date=page.updated, short=true, language_strings=language_strings) -%}
{%- set updated_str = last_updated_str | replace(from="$DATE", to=formatted_date) -%}
{%- set previous_visible = true -%}
-
- {{ updated_str }}
+
- {{ updated_str }}
{#- Show link to remote changes if enabled -#}
{%- if config.extra.remote_repository_url and macros_settings::evaluate_setting_priority(setting="show_remote_changes", page=page, default_global_value=true) == "true" -%}
- {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_translate::translate(key="see_changes", default="See changes", language_strings=language_strings) }}
@@ -227,7 +228,13 @@
{{ macros_toc::toc(page=page, header=true, language_strings=language_strings) }}
{% endif %}
-
+ {#- Optional Summary paragraph for readers -#}
+ {% if page.description %}
+ {{ page.description }}
+ {%- endif -%}
+
+
+
{#- Replace series_intro placeholder -#}
{%- set content_with_intro = page.content -%}
{%- if "" in page.content -%}
diff --git a/templates/partials/content_security_policy.html b/templates/partials/content_security_policy.html
index ee9211cc2..187060d2e 100644
--- a/templates/partials/content_security_policy.html
+++ b/templates/partials/content_security_policy.html
@@ -54,6 +54,12 @@
{%- set script_src = script_src ~ " " ~ " cdn.jsdelivr.net" -%}
{%- endif -%}
+ {#- Check if a webmention system is enabled to allow the necessary domains and directives -#}
+ {%- set webmention_enabled = config.extra.webmentions.enabled -%}
+ {%- if webmention_enabled -%}
+ {%- set connect_src = connect_src ~ " webmention.io" -%}
+ {%- endif -%}
+
{#- Append WebSocket for Zola serve mode -#}
{%- if config.mode == "serve" -%}
{%- set connect_src = connect_src ~ " ws:" -%}
diff --git a/templates/partials/header.html b/templates/partials/header.html
index 049450ee7..f93de978c 100644
--- a/templates/partials/header.html
+++ b/templates/partials/header.html
@@ -136,10 +136,12 @@
{%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%}
- {# If JavaScript is disabled, hide the button. #}
-
-
-
+ {# If JavaScript is disabled, hide the button. #}
+
+
+
{%- endif -%}
{%- if config.extra.analytics.service -%}
@@ -151,6 +153,11 @@
{%- endif -%}
+ {# Webmentions #}
+ {%- if config.extra.webmentions.enabled -%}
+ {%- include "partials/webmentions.html" -%}
+ {%- endif -%}
+
{# Search #}
{%- if config.build_search_index -%}
{%- if config.search.index_format -%}
diff --git a/templates/partials/webmentions.html b/templates/partials/webmentions.html
new file mode 100644
index 000000000..5d4d68bb1
--- /dev/null
+++ b/templates/partials/webmentions.html
@@ -0,0 +1,69 @@
+{# Incorporate webmention.io links and script into the page head.
+1. Provide the link to the webmention data in the at webmention.io.
+2. Link to the stylesheet for styling webmentions on a page.
+3. Add and configure the javascript to fetch and display the webmentions collected at webmention.io. #}
+
+
+
+{# Calculate the configured data for the script, if any #}
+
+{% set script_data = "" %}
+
+{% if config.extra.webmentions.id %}
+ {% set script_data = script_data ~ "data-id=" ~ config.extra.webmentions.id %}
+{% endif %}
+
+{% if config.extra.webmentions.page_url %}
+ {% set script_data = script_data ~ " data-page-url=" ~ config.extra.webmentions.page_url %}
+{% endif %}
+
+{% if config.extra.webmentions.add_urls %}
+ {% set script_data = script_data ~ "data-add-urls=" ~ config.extra.webmentions.add_urls %}
+{% endif %}
+
+{% if config.extra.webmentions.wordcount %}
+ {% set script_data = script_data ~ " data-wordcount=" ~ config.extra.webmentions.wordcount %}
+{% endif %}
+
+{% if config.extra.webmentions.max_webmentions %}
+ {% set script_data = script_data ~ "data-max-webmentions=" ~ config.extra.webmentions.max_webmentions %}
+{% endif %}
+
+{% if config.extra.webmentions.prevent_spoofing %}
+ {% set script_data = script_data ~ "data-prevent-spoofing=" ~ config.extra.webmentions.prevent_spoofing %}
+{% endif %}
+
+{% if config.extra.webmentions.sort_by %}
+ {% set script_data = script_data ~ "data-sort-by=" ~ config.extra.webmentions.sort_by %}
+{% endif %}
+
+{% if config.extra.webmentions.sort_dir %}
+ {% set script_data = script_data ~ "data-sort-dir=" ~ config.extra.webmentions.sort_dir %}
+{% endif %}
+
+{% if config.extra.webmentions.comments_are_reactions %}
+ {% set script_data = script_data ~ " data-comments-are-reactions=" ~ config.extra.webmentions.comments_are_reactions %}
+{% endif %}
+
+
+
+{#
+
+
+#}
\ No newline at end of file
diff --git a/templates/shortcodes/webmentions.html b/templates/shortcodes/webmentions.html
new file mode 100644
index 000000000..33986fbdc
--- /dev/null
+++ b/templates/shortcodes/webmentions.html
@@ -0,0 +1,8 @@
+{%- set format = config.extra.webmentions.format | default(value="") -%}
+{% if format == "" %}
+{%- set dash = "" -%}
+{% else %}
+{%- set dash = "-" -%}
+{% endif %}
+
+hello
\ No newline at end of file
diff --git a/theme.toml b/theme.toml
index db3384ede..6dc9cf8c2 100644
--- a/theme.toml
+++ b/theme.toml
@@ -320,6 +320,47 @@ custom_subset = true
# Leave this field empty if you're using the service's default hosting.
# self_hosted_url = ""
+[extra.webmentions]
+# enabled = true
+# Specify the domain registered with webmention.io.
+# domain = "www.example.com"
+
+# The HTML ID for the object to fill in with the webmention data.
+# Defaults to "webmentions"
+# id = "webmentions"
+
+# data configuration for the webmention.min.js script
+# The base URL to use for this page. Defaults to window.location
+# page_url =
+
+# Additional URLs to check, separated by |s
+# add_urls
+
+# The maximum number of words to render in reply mentions.
+# wordcount = 20
+
+# The maximum number of mentions to retrieve. Defaults to 30.
+# max_webmentions
+
+# By default, Webmentions render using the mf2 'url' element, which plays
+# nicely with webmention bridges (such as brid.gy and telegraph)
+# but allows certain spoofing attacks. If you would like to prevent
+# spoofing, set this to a non-empty string (e.g. "true").
+# prevent_spoofing
+
+# What to order the responses by; defaults to 'published'. See
+# https://github.com/aaronpk/webmention.io#api
+# sort_by
+
+# The order to sort the responses by; defaults to 'up' (i.e. oldest
+# first). See https://github.com/aaronpk/webmention.io#api
+# sort_dir
+
+# If set to a non-empty string (e.g. "true"), will display comment-type responses
+# (replies/mentions/etc.) as being part of the reactions
+# (favorites/bookmarks/etc.) instead of in a separate comment list.
+# comments_are_reactions = "true"
+
# giscus support for comments. https://giscus.app
# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup
[extra.giscus]
{{ page.title | markdown(inline=true) | safe }}
+-
{#- Draft indicator -#}
@@ -137,7 +138,7 @@
- {{ by_author | replace(from="$AUTHOR", to=author_string) }} +
- {{ by_author | replace(from="$AUTHOR", to=author_string) }} {%- set previous_visible = true -%} {% endif %} @@ -145,7 +146,7 @@
- {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }} +
- {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }} {#- Variable to keep track of whether we've shown a section, to avoid separators as the first element -#} {%- set previous_visible = true -%} {% endif %} @@ -160,7 +161,7 @@
- {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}: {%- for tag in page.taxonomies.tags -%} -
- {{ tag }} +
- {{ tag }}
{%- if not loop.last -%}
,
{%- endif -%}
@@ -175,7 +176,7 @@
{%- set formatted_date = macros_format_date::format_date(date=page.updated, short=true, language_strings=language_strings) -%} {%- set updated_str = last_updated_str | replace(from="$DATE", to=formatted_date) -%} {%- set previous_visible = true -%} -
{%- endif -%} {%- set by_author = macros_translate::translate(key="by_author", default="By $AUTHOR", language_strings=language_strings) -%} -
{#- Date -#} {% if page.date and macros_settings::evaluate_setting_priority(setting="show_date", page=page, default_global_value=true) == "true" %} -
{%- if page.taxonomies and page.taxonomies.tags -%}
- {{ updated_str }} +
- {{ updated_str }} {#- Show link to remote changes if enabled -#} {%- if config.extra.remote_repository_url and macros_settings::evaluate_setting_priority(setting="show_remote_changes", page=page, default_global_value=true) == "true" -%}
- {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_translate::translate(key="see_changes", default="See changes", language_strings=language_strings) }} @@ -227,7 +228,13 @@
{{ macros_toc::toc(page=page, header=true, language_strings=language_strings) }}
{% endif %}
-
+ {#- Optional Summary paragraph for readers -#}
+ {% if page.description %}
+ {{ page.description }}
+ {%- endif -%}
+
+
+
{#- Replace series_intro placeholder -#}
{%- set content_with_intro = page.content -%}
{%- if "" in page.content -%}
diff --git a/templates/partials/content_security_policy.html b/templates/partials/content_security_policy.html
index ee9211cc2..187060d2e 100644
--- a/templates/partials/content_security_policy.html
+++ b/templates/partials/content_security_policy.html
@@ -54,6 +54,12 @@
{%- set script_src = script_src ~ " " ~ " cdn.jsdelivr.net" -%}
{%- endif -%}
+ {#- Check if a webmention system is enabled to allow the necessary domains and directives -#}
+ {%- set webmention_enabled = config.extra.webmentions.enabled -%}
+ {%- if webmention_enabled -%}
+ {%- set connect_src = connect_src ~ " webmention.io" -%}
+ {%- endif -%}
+
{#- Append WebSocket for Zola serve mode -#}
{%- if config.mode == "serve" -%}
{%- set connect_src = connect_src ~ " ws:" -%}
diff --git a/templates/partials/header.html b/templates/partials/header.html
index 049450ee7..f93de978c 100644
--- a/templates/partials/header.html
+++ b/templates/partials/header.html
@@ -136,10 +136,12 @@
{%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%}
- {# If JavaScript is disabled, hide the button. #}
-
-
-
+ {# If JavaScript is disabled, hide the button. #}
+
+
+
{%- endif -%}
{%- if config.extra.analytics.service -%}
@@ -151,6 +153,11 @@
{%- endif -%}
+ {# Webmentions #}
+ {%- if config.extra.webmentions.enabled -%}
+ {%- include "partials/webmentions.html" -%}
+ {%- endif -%}
+
{# Search #}
{%- if config.build_search_index -%}
{%- if config.search.index_format -%}
diff --git a/templates/partials/webmentions.html b/templates/partials/webmentions.html
new file mode 100644
index 000000000..5d4d68bb1
--- /dev/null
+++ b/templates/partials/webmentions.html
@@ -0,0 +1,69 @@
+{# Incorporate webmention.io links and script into the page head.
+1. Provide the link to the webmention data in the at webmention.io.
+2. Link to the stylesheet for styling webmentions on a page.
+3. Add and configure the javascript to fetch and display the webmentions collected at webmention.io. #}
+
+
+
+{# Calculate the configured data for the script, if any #}
+
+{% set script_data = "" %}
+
+{% if config.extra.webmentions.id %}
+ {% set script_data = script_data ~ "data-id=" ~ config.extra.webmentions.id %}
+{% endif %}
+
+{% if config.extra.webmentions.page_url %}
+ {% set script_data = script_data ~ " data-page-url=" ~ config.extra.webmentions.page_url %}
+{% endif %}
+
+{% if config.extra.webmentions.add_urls %}
+ {% set script_data = script_data ~ "data-add-urls=" ~ config.extra.webmentions.add_urls %}
+{% endif %}
+
+{% if config.extra.webmentions.wordcount %}
+ {% set script_data = script_data ~ " data-wordcount=" ~ config.extra.webmentions.wordcount %}
+{% endif %}
+
+{% if config.extra.webmentions.max_webmentions %}
+ {% set script_data = script_data ~ "data-max-webmentions=" ~ config.extra.webmentions.max_webmentions %}
+{% endif %}
+
+{% if config.extra.webmentions.prevent_spoofing %}
+ {% set script_data = script_data ~ "data-prevent-spoofing=" ~ config.extra.webmentions.prevent_spoofing %}
+{% endif %}
+
+{% if config.extra.webmentions.sort_by %}
+ {% set script_data = script_data ~ "data-sort-by=" ~ config.extra.webmentions.sort_by %}
+{% endif %}
+
+{% if config.extra.webmentions.sort_dir %}
+ {% set script_data = script_data ~ "data-sort-dir=" ~ config.extra.webmentions.sort_dir %}
+{% endif %}
+
+{% if config.extra.webmentions.comments_are_reactions %}
+ {% set script_data = script_data ~ " data-comments-are-reactions=" ~ config.extra.webmentions.comments_are_reactions %}
+{% endif %}
+
+
+
+{#
+
+
+#}
\ No newline at end of file
diff --git a/templates/shortcodes/webmentions.html b/templates/shortcodes/webmentions.html
new file mode 100644
index 000000000..33986fbdc
--- /dev/null
+++ b/templates/shortcodes/webmentions.html
@@ -0,0 +1,8 @@
+{%- set format = config.extra.webmentions.format | default(value="") -%}
+{% if format == "" %}
+{%- set dash = "" -%}
+{% else %}
+{%- set dash = "-" -%}
+{% endif %}
+
+hello
\ No newline at end of file
diff --git a/theme.toml b/theme.toml
index db3384ede..6dc9cf8c2 100644
--- a/theme.toml
+++ b/theme.toml
@@ -320,6 +320,47 @@ custom_subset = true
# Leave this field empty if you're using the service's default hosting.
# self_hosted_url = ""
+[extra.webmentions]
+# enabled = true
+# Specify the domain registered with webmention.io.
+# domain = "www.example.com"
+
+# The HTML ID for the object to fill in with the webmention data.
+# Defaults to "webmentions"
+# id = "webmentions"
+
+# data configuration for the webmention.min.js script
+# The base URL to use for this page. Defaults to window.location
+# page_url =
+
+# Additional URLs to check, separated by |s
+# add_urls
+
+# The maximum number of words to render in reply mentions.
+# wordcount = 20
+
+# The maximum number of mentions to retrieve. Defaults to 30.
+# max_webmentions
+
+# By default, Webmentions render using the mf2 'url' element, which plays
+# nicely with webmention bridges (such as brid.gy and telegraph)
+# but allows certain spoofing attacks. If you would like to prevent
+# spoofing, set this to a non-empty string (e.g. "true").
+# prevent_spoofing
+
+# What to order the responses by; defaults to 'published'. See
+# https://github.com/aaronpk/webmention.io#api
+# sort_by
+
+# The order to sort the responses by; defaults to 'up' (i.e. oldest
+# first). See https://github.com/aaronpk/webmention.io#api
+# sort_dir
+
+# If set to a non-empty string (e.g. "true"), will display comment-type responses
+# (replies/mentions/etc.) as being part of the reactions
+# (favorites/bookmarks/etc.) instead of in a separate comment list.
+# comments_are_reactions = "true"
+
# giscus support for comments. https://giscus.app
# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup
[extra.giscus]
{{ page.description }}
+ {%- endif -%} + + +hello
\ No newline at end of file
diff --git a/theme.toml b/theme.toml
index db3384ede..6dc9cf8c2 100644
--- a/theme.toml
+++ b/theme.toml
@@ -320,6 +320,47 @@ custom_subset = true
# Leave this field empty if you're using the service's default hosting.
# self_hosted_url = ""
+[extra.webmentions]
+# enabled = true
+# Specify the domain registered with webmention.io.
+# domain = "www.example.com"
+
+# The HTML ID for the object to fill in with the webmention data.
+# Defaults to "webmentions"
+# id = "webmentions"
+
+# data configuration for the webmention.min.js script
+# The base URL to use for this page. Defaults to window.location
+# page_url =
+
+# Additional URLs to check, separated by |s
+# add_urls
+
+# The maximum number of words to render in reply mentions.
+# wordcount = 20
+
+# The maximum number of mentions to retrieve. Defaults to 30.
+# max_webmentions
+
+# By default, Webmentions render using the mf2 'url' element, which plays
+# nicely with webmention bridges (such as brid.gy and telegraph)
+# but allows certain spoofing attacks. If you would like to prevent
+# spoofing, set this to a non-empty string (e.g. "true").
+# prevent_spoofing
+
+# What to order the responses by; defaults to 'published'. See
+# https://github.com/aaronpk/webmention.io#api
+# sort_by
+
+# The order to sort the responses by; defaults to 'up' (i.e. oldest
+# first). See https://github.com/aaronpk/webmention.io#api
+# sort_dir
+
+# If set to a non-empty string (e.g. "true"), will display comment-type responses
+# (replies/mentions/etc.) as being part of the reactions
+# (favorites/bookmarks/etc.) instead of in a separate comment list.
+# comments_are_reactions = "true"
+
# giscus support for comments. https://giscus.app
# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup
[extra.giscus]