feat(indieweb): add hidden h-card

This commit is contained in:
Henri Bourcereau 2025-03-23 20:31:23 +01:00
parent cc39652eb5
commit 2c578bd15b
5 changed files with 128 additions and 1 deletions

View file

@ -1,7 +1,7 @@
+++
title = "Mastering tabi Settings: A Comprehensive Guide"
date = 2023-09-18
updated = 2025-02-16
updated = 2025-04-02
description = "Discover the many ways you can customise your tabi site."
[taxonomies]
@ -1018,6 +1018,24 @@ See the [CSP documentation page](@/blog/security/index.md) for more information.
---
## Indieweb
### Representative h-card
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
| :--: | :-----: | :-----------: | :---------------: | :-----------------: |
| ❌ | ❌ | ✅ | ❌ | ❌ |
Tabi adds a representative [h-card](https://microformats.org/wiki/h-card) to the homepage out of the box. It is hidden to the naked eye, but remains visible by microformat parsers. You can check the validity of the card with the [Indiewebify.me](https://indiewebify.me/validate-h-card/) tool.
It is possible to disable the h-card by setting `enable = false` in the `[extra.hcard]` section of the config file.
The default h-card includes your name, website url and social media links.
You can set a profile picture and a small bio with the `avatar` and `biography` settings.
All other [h-card properties](https://microformats.org/wiki/h-card#Properties) can be added by listing them under the `[extra.hcard]`section of the config file. Simply replace all `-` characters by `_`.
---
[^1]: If you're using a remote Git repository, you might want to automate the process of updating the `updated` field. Here's a guide for that: [Zola Git Pre-Commit Hook: Updating Post Dates](https://osc.garden/blog/zola-date-git-hook/).
[^2]: To encode your email in base64 you can use [online tools](https://www.base64encode.org/) or, on your terminal, run: `printf 'mail@example.com' | base64`.