mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00
commit
79ed74b48a
6 changed files with 20 additions and 21 deletions
|
@ -328,7 +328,6 @@ allowed_domains = [
|
|||
{ directive = "script-src", domains = ["'self'"] },
|
||||
{ directive = "style-src", domains = ["'self'"] },
|
||||
{ directive = "frame-src", domains = ["player.vimeo.com", "https://www.youtube-nocookie.com"] },
|
||||
# { directive = "connect-src", domains = [ "https://webmention.io"] },
|
||||
]
|
||||
|
||||
# Enable the CSP directives configured (or default).
|
||||
|
@ -365,9 +364,9 @@ service = "goatcounter"
|
|||
self_hosted_url = "https://tabi-stats.osc.garden"
|
||||
|
||||
[extra.webmentions]
|
||||
# enable = true
|
||||
enabled = true
|
||||
# Specify the domain registered with webmention.io.
|
||||
# domain = "www.example.com"
|
||||
domain = "www.example.com"
|
||||
|
||||
# The HTML ID for the object to fill in with the webmention data.
|
||||
# Defaults to "webmentions"
|
||||
|
@ -381,7 +380,7 @@ page_url = "https://beesbuzz.biz/code/439-Falsehoods-programmers-believe-about-e
|
|||
# add_urls
|
||||
|
||||
# The maximum number of words to render in reply mentions.
|
||||
# wordcount = 20
|
||||
wordcount = 20
|
||||
|
||||
# The maximum number of mentions to retrieve. Defaults to 30.
|
||||
# max_webmentions
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Mastering tabi Settings: A Comprehensive Guide"
|
||||
date = 2023-09-18
|
||||
updated = 2025-02-11
|
||||
updated = 2025-02-12
|
||||
description = "Discover the many ways you can customise your tabi site."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -767,22 +767,15 @@ If you have enabled a system globally, but want to disable it on a specific page
|
|||
|
||||
Read [the docs](@/blog/comments/index.md) for more information on the available systems and their setup.
|
||||
|
||||
## Webmentions
|
||||
### Webmentions
|
||||
|
||||
As described by the recommended W3C standard [Webmention][1] is a simple way to notify any URL when you mention it on your site. From the receiver's perspective, it's a way to request notifications when other sites mention it.
|
||||
|
||||
For static sites [webmention.io][2] hosts a webmention endpoint that can be used to receive webmentions. This feature fetches the webmentions stored at webmention.io and displays them for a page. You will need to have setup an account for your website at webmention.io. When you enable the webmention feature it will advertise your webmention.io endpoint and display the webmentions for any post using the webmention shortcut.
|
||||
|
||||
### Configuration and Usage
|
||||
|
||||
Enable webmentions for your site by adding the following to your `config.toml` file. A directive for CSP is required to allow the webmention.io endpoint to be used.
|
||||
|
||||
```toml
|
||||
[extra]
|
||||
allowed_domains = [
|
||||
{ directive = "connect-src", domains = [ "https://webmention.io"] },
|
||||
]
|
||||
Enable webmentions for your site by adding the following to your `config.toml` file.
|
||||
|
||||
```
|
||||
[extra.webmentions]
|
||||
enable = true
|
||||
# Specify the domain registered with webmention.io.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Custom shortcodes"
|
||||
date = 2023-02-19
|
||||
updated = 2025-02-11
|
||||
updated = 2025-02-12
|
||||
description = "This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display images that adapt to light and dark themes, or format a professional-looking reference section, these custom shortcodes have got you covered."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -455,7 +455,7 @@ Enable webmentions for your site, add the following to your `config.toml` file:
|
|||
|
||||
```toml
|
||||
[extra.webmentions]
|
||||
enable = true
|
||||
enabled = true
|
||||
# Specify the domain registered with webmention.io.
|
||||
domain = "www.example.com"
|
||||
```
|
||||
|
@ -466,5 +466,7 @@ Add the shortcut on the page where you want to display the webmentions:
|
|||
{{/* webmentions() */}}
|
||||
```
|
||||
|
||||
{{ webmentions() }}
|
||||
|
||||
[1]: https://www.w3.org/TR/webmention/#abstract-p-1
|
||||
[2]: https://webmention.io/
|
||||
|
|
|
@ -54,6 +54,12 @@ content="default-src 'self'
|
|||
{%- 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:" -%}
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
{%- endif -%}
|
||||
|
||||
{# Webmentions #}
|
||||
{%- if config.extra.webmentions.enable -%}
|
||||
{%- if config.extra.webmentions.enabled -%}
|
||||
{%- include "partials/webmentions.html" -%}
|
||||
{%- endif -%}
|
||||
|
||||
|
|
|
@ -285,7 +285,6 @@ allowed_domains = [
|
|||
{ directive = "script-src", domains = ["'self'"] },
|
||||
{ directive = "style-src", domains = ["'self'"] },
|
||||
{ directive = "frame-src", domains = ["player.vimeo.com", "https://www.youtube-nocookie.com"] },
|
||||
# { directive = "connect-src", domains = [ "https://webmention.io"] },
|
||||
]
|
||||
|
||||
# Enable the CSP directives configured (or default).
|
||||
|
@ -322,7 +321,7 @@ custom_subset = true
|
|||
# self_hosted_url = ""
|
||||
|
||||
[extra.webmentions]
|
||||
# enable = true
|
||||
# enabled = true
|
||||
# Specify the domain registered with webmention.io.
|
||||
# domain = "www.example.com"
|
||||
|
||||
|
@ -332,7 +331,7 @@ custom_subset = true
|
|||
|
||||
# data configuration for the webmention.min.js script
|
||||
# The base URL to use for this page. Defaults to window.location
|
||||
# page_url = "https://beesbuzz.biz/code/439-Falsehoods-programmers-believe-about-email"
|
||||
# page_url =
|
||||
|
||||
# Additional URLs to check, separated by |s
|
||||
# add_urls
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue