mirror of
https://github.com/welpo/tabi.git
synced 2025-12-14 11:48:45 +01:00
commit
cf59175c62
6 changed files with 28 additions and 11 deletions
|
|
@ -374,7 +374,7 @@ domain = "www.example.com"
|
||||||
|
|
||||||
# data configuration for the webmention.min.js script
|
# data configuration for the webmention.min.js script
|
||||||
# The base URL to use for this page. Defaults to window.location
|
# 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 = "https://www.jrussell.ie/blog/update-and-release/10-update-and-release/"
|
||||||
|
|
||||||
# Additional URLs to check, separated by |s
|
# Additional URLs to check, separated by |s
|
||||||
# add_urls
|
# add_urls
|
||||||
|
|
|
||||||
BIN
content/blog/mastering-tabi-settings/img/webmention_dark.webp
Normal file
BIN
content/blog/mastering-tabi-settings/img/webmention_dark.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
content/blog/mastering-tabi-settings/img/webmention_light.webp
Normal file
BIN
content/blog/mastering-tabi-settings/img/webmention_light.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
|
|
@ -1,7 +1,7 @@
|
||||||
+++
|
+++
|
||||||
title = "Mastering tabi Settings: A Comprehensive Guide"
|
title = "Mastering tabi Settings: A Comprehensive Guide"
|
||||||
date = 2023-09-18
|
date = 2023-09-18
|
||||||
updated = 2025-02-12
|
updated = 2025-02-19
|
||||||
description = "Discover the many ways you can customise your tabi site."
|
description = "Discover the many ways you can customise your tabi site."
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
|
|
@ -767,7 +767,7 @@ 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.
|
Read [the docs](@/blog/comments/index.md) for more information on the available systems and their setup.
|
||||||
|
|
||||||
### Webmentions
|
### Webmentions {#adding-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.
|
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.
|
||||||
|
|
||||||
|
|
@ -788,6 +788,10 @@ Add the shortcut on the page where you want to display the webmentions:
|
||||||
{{/* webmentions() */}}
|
{{/* webmentions() */}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The webmentions section will then be displayed where you added it on the page as follows:
|
||||||
|
|
||||||
|
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Page footer, showing a 'Site source' link") }}
|
||||||
|
|
||||||
[1]: https://www.w3.org/TR/webmention/#abstract-p-1
|
[1]: https://www.w3.org/TR/webmention/#abstract-p-1
|
||||||
[2]: https://webmention.io/
|
[2]: https://webmention.io/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
+++
|
+++
|
||||||
title = "Custom shortcodes"
|
title = "Custom shortcodes"
|
||||||
date = 2023-02-19
|
date = 2023-02-19
|
||||||
updated = 2025-02-12
|
updated = 2025-02-19
|
||||||
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."
|
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]
|
[taxonomies]
|
||||||
|
|
@ -466,6 +466,12 @@ Add the shortcut on the page where you want to display the webmentions:
|
||||||
{{/* webmentions() */}}
|
{{/* webmentions() */}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The webmentions section will then be displayed where you added it on the page as follows:
|
||||||
|
|
||||||
|
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Page footer, showing a 'Site source' link") }}
|
||||||
|
|
||||||
|
The following is a live example based on the specific page_url configured in the template config.toml.
|
||||||
|
|
||||||
{{ webmentions() }}
|
{{ webmentions() }}
|
||||||
|
|
||||||
[1]: https://www.w3.org/TR/webmention/#abstract-p-1
|
[1]: https://www.w3.org/TR/webmention/#abstract-p-1
|
||||||
|
|
|
||||||
|
|
@ -106,10 +106,11 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
||||||
{# End debugging #}
|
{# End debugging #}
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<article>
|
<article class="h-entry">
|
||||||
<h1 class="article-title">
|
<h1 class="p-name article-title">
|
||||||
{{ page.title }}
|
{{ page.title }}
|
||||||
</h1>
|
</h1>
|
||||||
|
<a class="u-url u-uid" href="{{ page.permalink | safe }}"></a>
|
||||||
|
|
||||||
<ul class="meta">
|
<ul class="meta">
|
||||||
{#- Draft indicator -#}
|
{#- Draft indicator -#}
|
||||||
|
|
@ -137,7 +138,7 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- set by_author = macros_translate::translate(key="by_author", default="By $AUTHOR", language_strings=language_strings) -%}
|
{%- set by_author = macros_translate::translate(key="by_author", default="By $AUTHOR", language_strings=language_strings) -%}
|
||||||
<li>{{ by_author | replace(from="$AUTHOR", to=author_string) }}</li>
|
<li p-author>{{ by_author | replace(from="$AUTHOR", to=author_string) }}</li>
|
||||||
{%- set previous_visible = true -%}
|
{%- set previous_visible = true -%}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
@ -145,7 +146,7 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
||||||
|
|
||||||
{#- Date -#}
|
{#- Date -#}
|
||||||
{% if page.date and macros_settings::evaluate_setting_priority(setting="show_date", page=page, default_global_value=true) == "true" %}
|
{% if page.date and macros_settings::evaluate_setting_priority(setting="show_date", page=page, default_global_value=true) == "true" %}
|
||||||
<li>{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }}</li>
|
<li class="dt-published">{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }}</li>
|
||||||
{#- Variable to keep track of whether we've shown a section, to avoid separators as the first element -#}
|
{#- Variable to keep track of whether we've shown a section, to avoid separators as the first element -#}
|
||||||
{%- set previous_visible = true -%}
|
{%- set previous_visible = true -%}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
@ -160,7 +161,7 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
||||||
{%- if page.taxonomies and page.taxonomies.tags -%}
|
{%- if page.taxonomies and page.taxonomies.tags -%}
|
||||||
<li class="tag">{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}: </li>
|
<li class="tag">{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}: </li>
|
||||||
{%- for tag in page.taxonomies.tags -%}
|
{%- for tag in page.taxonomies.tags -%}
|
||||||
<li class="tag"><a href="{{ get_taxonomy_url(kind='tags', name=tag, lang=lang) | safe }}">{{ tag }}</a>
|
<li class="p-category tag"><a href="{{ get_taxonomy_url(kind='tags', name=tag, lang=lang) | safe }}">{{ tag }}</a>
|
||||||
{%- if not loop.last -%}
|
{%- if not loop.last -%}
|
||||||
,
|
,
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
@ -175,7 +176,7 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
||||||
{%- set formatted_date = macros_format_date::format_date(date=page.updated, short=true, language_strings=language_strings) -%}
|
{%- 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 updated_str = last_updated_str | replace(from="$DATE", to=formatted_date) -%}
|
||||||
{%- set previous_visible = true -%}
|
{%- set previous_visible = true -%}
|
||||||
</ul><ul class="meta last-updated"><li>{{ updated_str }}</li>
|
</ul><ul class="dt-updated meta last-updated"><li>{{ updated_str }}</li>
|
||||||
{#- Show link to remote changes if enabled -#}
|
{#- 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 config.extra.remote_repository_url and macros_settings::evaluate_setting_priority(setting="show_remote_changes", page=page, default_global_value=true) == "true" -%}
|
||||||
<li>{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}<a href="{% include "partials/history_url.html" %}" {{ blank_target }} rel="{{ rel_attributes }}">{{ macros_translate::translate(key="see_changes", default="See changes", language_strings=language_strings) }}<small> <span class="arrow-corner">↗</span></small></a></li>
|
<li>{%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}<a href="{% include "partials/history_url.html" %}" {{ blank_target }} rel="{{ rel_attributes }}">{{ macros_translate::translate(key="see_changes", default="See changes", language_strings=language_strings) }}<small> <span class="arrow-corner">↗</span></small></a></li>
|
||||||
|
|
@ -227,7 +228,13 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
||||||
{{ macros_toc::toc(page=page, header=true, language_strings=language_strings) }}
|
{{ macros_toc::toc(page=page, header=true, language_strings=language_strings) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section class="body">
|
{#- Optional Summary paragraph for readers -#}
|
||||||
|
{% if page.description %}
|
||||||
|
<p class="p-summary" hidden>{{ page.description }}</p>
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
|
|
||||||
|
<section class="e-content body">
|
||||||
{#- Replace series_intro placeholder -#}
|
{#- Replace series_intro placeholder -#}
|
||||||
{%- set content_with_intro = page.content -%}
|
{%- set content_with_intro = page.content -%}
|
||||||
{%- if "<!-- series_intro -->" in page.content -%}
|
{%- if "<!-- series_intro -->" in page.content -%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue