Compare commits

...

378 commits
v1.0.0 ... main

Author SHA1 Message Date
github-actions[bot]
e1860ad1a0
⬆️ chore(deps): upgrade KaTeX to v0.16.23 (#570)
Some checks failed
Build Site / Check and Build for Pull Requests (push) Has been cancelled
Build Site / Build and Deploy on Main Push (push) Has been cancelled
2025-10-04 13:14:19 +02:00
Óscar
e8dcd0528e
️ feat(a11y): add skip to content link for keyboard navigation (#552)
Some checks failed
Build Site / Check and Build for Pull Requests (push) Has been cancelled
Build Site / Build and Deploy on Main Push (push) Has been cancelled
Co-authored-by: Awiteb <a@4rs.nl>
2025-09-28 21:10:39 +02:00
welpo
13f88a8e86
feat: load extra features in section template
Some checks failed
Build Site / Check and Build for Pull Requests (push) Has been cancelled
Build Site / Build and Deploy on Main Push (push) Has been cancelled
Allows using copy code block options, KaTex, etc. in the homepage
2025-09-22 23:39:57 +02:00
github-actions[bot]
ea53c823cf
⬆️ chore(deps): upgrade mermaid to v11.12.0 (#569)
Some checks failed
Build Site / Check and Build for Pull Requests (push) Has been cancelled
Build Site / Build and Deploy on Main Push (push) Has been cancelled
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-09-20 10:31:04 +02:00
f0e804b4ff
📝 misc(README): add posixlycorrect.com to sites using tabi (#568)
Some checks failed
Build Site / Check and Build for Pull Requests (push) Has been cancelled
Build Site / Build and Deploy on Main Push (push) Has been cancelled
2025-09-17 21:48:35 +02:00
renovate[bot]
e33c1cc00d
⬆️ chore(deps): update scripts/release digest to 8e0a56e (#567)
Some checks failed
Build Site / Check and Build for Pull Requests (push) Has been cancelled
Build Site / Build and Deploy on Main Push (push) Has been cancelled
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-15 08:52:30 +02:00
redmie
83b0a5d011
feat(i18n): display lcode in language switcher (#565)
Some checks are pending
Build Site / Check and Build for Pull Requests (push) Waiting to run
Build Site / Build and Deploy on Main Push (push) Waiting to run
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-09-14 12:35:42 +02:00
github-actions[bot]
57277a0f23
⬆️ chore(deps): upgrade mermaid to v11.11.0 (#566)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-09-05 08:55:24 +02:00
github-actions[bot]
c36d868b55
⬆️ chore(deps): upgrade mermaid to v11.10.1 (#564)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-08-23 10:30:43 +02:00
github-actions[bot]
479fd96e50
⬆️ chore(deps): upgrade mermaid to v11.10.0 (#563)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-08-20 15:03:21 +02:00
Pedro Pontes García
a7a0c05100
feat: allow custom archive date format (#557)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-08-15 18:59:15 +02:00
renovate[bot]
a21edd31d5
⬆️ chore(deps): update actions/checkout action to v5 (#562)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 18:26:59 +02:00
mfiano
7e12f9acf3
♻️ refactor: prevent HTML escaping of joined CSP strings (#553)
Co-authored-by: kanuba <me@kanuba.me>
2025-08-10 14:25:58 +02:00
Pedro Pontes García
515fd078a5
📝 docs: fix broken custom skins link (#559) 2025-08-07 17:40:26 +02:00
Óscar
2064beae78
feat: add per-language date format configuration (#556) 2025-08-07 14:00:48 +02:00
Awiteb
3a40ae5a83
🌐 fix(i18n): iine Arabic translation (#551) 2025-08-01 22:40:15 +02:00
Óscar
daa8b1a412
feat(iine): add like buttons (#550) 2025-08-01 21:43:04 +02:00
renovate[bot]
79b5dcf9a7
⬆️ chore(deps): update shalzz/zola-deploy-action action to v0.21.0 (#544)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-20 20:56:09 +00:00
Ulrich Schreiner
0639c0c397
♻️ refactor: force a trailing slash on the nav home title (#547)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-07-20 19:06:13 +02:00
welpo
9f5f307444
📝 misc(README): clean up 'sites using tabi'
Site no longer used tabi.
2025-07-19 12:19:37 +02:00
welpo
9b7a45db53
🐛 fix(feed): conditionally render updated field
Zola 0.21.0 broke this
2025-07-19 09:45:42 +02:00
github-actions[bot]
36adac03a4
⬆️ chore(deps): upgrade mermaid to v11.9.0 (#545)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-07-18 00:22:33 +02:00
github-actions[bot]
bda9f22f79
⬆️ chore(deps): upgrade mermaid to v11.8.1 (#542)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-07-09 23:19:46 +02:00
github-actions[bot]
d241fc1fda
⬆️ chore(deps): upgrade mermaid to v11.8.0 (#541)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-07-05 10:24:31 +02:00
loraX
0f8733b91a
🍱 feat(socials): add codeberg icon (#540) 2025-07-01 21:00:03 +02:00
github-actions[bot]
0dfd434ce2
⬆️ chore(deps): upgrade mermaid to v11.7.0 (#538)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-06-21 12:02:09 +02:00
welpo
2499387693
📝 misc(projects): fix webmentions link 2025-06-16 22:43:58 +02:00
undecV
9b115904d7
feat(analytics): make Umami DNT behavior configurable (#536)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-06-16 22:42:13 +02:00
welpo
23a1baf96c
🔖 chore(release): prepare for v4.1.0 2025-06-14 09:53:41 +02:00
welpo
2e29782279
💄 style: remove extra spacing after author
Only seen when minification was set to `false`.
2025-06-08 22:42:37 +02:00
welpo
7321fc5a43
🐛 fix: render author HTML on page metadata 2025-06-08 22:17:23 +02:00
gortavoher
c325267bd1
feat: add support for webmentions (#485)
Co-authored-by: Jeremiah Russell <47631109+jerusdp@users.noreply.github.com>
Co-authored-by: Henri Bourcereau <henri.bourcereau@gmail.com>
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-06-08 21:49:54 +02:00
bajacc
84c67ab2b2
🐛 fix: allow feed icon to be hidden (#533) 2025-06-01 19:56:50 +02:00
Cameron Taylor
979f347fb0
feat: extend tabi <head> and <body> elements (#528)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-06-01 17:12:41 +02:00
b1n
5c1e4acbb1
📝 misc(README): add b1n.io to 'sites using tabi' (#531) 2025-05-30 10:09:47 +02:00
tzinm
68c35b02f8
🐛 fix(feed): prioritise description > summary (#525) 2025-05-11 14:33:27 +02:00
Henri Bourcereau
5f28b0e87e
feat(webmentions): add hcard in post page (#524)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-05-10 16:51:35 +02:00
tzinm
c4f39d7643
feat(feed): add feed icon tag pages (#522)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-04-30 09:28:25 +02:00
rktjump
93af295d78
feat: parse markdown in post summary & description (#517)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-04-26 19:53:19 +02:00
tzinm
f47cefd42b
♻️ refactor: add "target_attribute" macro (#515)
Co-authored-by: Óscar <welpo@users.noreply.github.com>
2025-04-26 11:21:09 +02:00
Gabriel Martinez
221e245671
🍱 feat(socials): add itch.io icon (#520) 2025-04-26 11:18:36 +02:00
Olexandr88
b9b76799eb
📝 misc(README): fix broken link tag (#516) 2025-04-14 19:03:16 +02:00
github-actions[bot]
2d68b40e14
⬆️ chore(deps): upgrade KaTeX to v0.16.22 (#511)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-04-10 21:09:37 +02:00
Henri Bourcereau
3d2c3a14b8
🐛 fix: fix hcard html tags (#508) 2025-04-05 22:53:51 +02:00
Henri Bourcereau
94af15b6e8
feat(indieweb): add hidden h-card (#506)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-04-05 14:10:16 +02:00
welpo
a384ac80c8
♻️ refactor: improve error message when title is unset
Resolves #502
2025-04-05 00:06:15 +02:00
Axel Karjalainen
cc39652eb5
feat: cache bust images in shortcodes (#504) 2025-04-02 22:25:23 +02:00
Axel Karjalainen
c7bc652618
🌐 feat(i18n): add Finnish language (#505)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-04-02 22:21:39 +02:00
github-actions[bot]
a59310a6b2
⬆️ chore(deps): upgrade mermaid to v11.6.0 (#500)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-03-26 08:27:44 +01:00
Óscar
8678c477bf
💄 fix: fix external link icon breaking word wrapping (#498) 2025-03-15 10:12:11 +01:00
welpo
e11186a844
🐛 misc(CI): fix Mermaid version detection 2025-03-15 09:25:40 +01:00
github-actions[bot]
88ebde9b24
⬆️ chore(deps): upgrade mermaid to v11.5.0 (#497)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-03-15 00:22:52 +01:00
tzinm
f25dfe3429
📝 misc(README): add tzinm's blog to 'sites using tabi' (#496) 2025-03-12 20:35:09 +01:00
Clément Escolano
bf1d05e092
🐛 fix: fix padding hover on links with code (custom font) (#494) 2025-03-12 10:15:03 +01:00
welpo
1bb33439da
🔖 chore(release): prepare for v4.0.0 2025-02-16 21:28:11 +01:00
Mohammed Alotaibi
ed8e2d1888
🌐 docs(demo): basic Arabic translation (#390)
Signed-off-by: Awiteb <a@4rs.nl>
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-02-16 21:25:20 +01:00
welpo
1c067e708e
💄 fix: adapt footnotes styling for zola 0.19.x & 0.20.x
Also makes code tags slightly smaller (to match the font) in footnotes.

Zola 0.20.0 wraps footnotes in a <footer> tag, which broke existing styles.
This change makes the CSS selectors work with both old (<ol>) and new
(<footer>) HTML structures while maintaining the same visual appearance.
2025-02-16 16:25:40 +01:00
Óscar
09e724a82b
feat: add hide_from_main_feed support (#490) 2025-02-16 09:49:51 +01:00
welpo
45fe170467
🐛 fix(feed): styling now works in all website paths
The feed's stylesheet now uses the base URL from Zola's configuration,
ensuring correct stylesheet loading in all contexts (root path,
subdirectories, and subdomains).

Previously, the stylesheet URLs could break when feeds were in
subdirectories.
2025-02-16 09:28:57 +01:00
welpo
402965786b
📝 docs(series): add tip for custom text permalinks 2025-02-15 23:18:17 +01:00
welpo
2b106b7c62
💄 style(admonitions): fix external link icon
Should've been done in #443
2025-02-15 22:45:31 +01:00
Óscar
61793b2e56
feat: support Zola's native code block names (#489) 2025-02-15 22:31:55 +01:00
stalkerGH
6837f6f4f1
feat: render markdown in page titles & descriptions (#486)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-02-15 14:33:37 +01:00
Óscar
a5ab6259c6
feat: add indicator to external links (#443) 2025-02-15 09:34:54 +01:00
renovate[bot]
036b11b7da
⬆️ chore(deps): updatezola-deploy-action to v0.20.0 (#488)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-15 09:34:07 +01:00
welpo
a3ae897c83
feat: allow setting post_listing_date per section 2025-02-09 23:16:53 +01:00
Óscar
db5062fb3f
feat: render section content (#484) 2025-02-09 21:00:08 +01:00
Óscar
6ff0604beb
💥 feat(archive)!: enforce chronological sorting (#483) 2025-02-09 20:44:21 +01:00
welpo
d777d5d996
💄 style: increase emoji favicon size
Resolves #476
2025-02-08 10:17:26 +01:00
welpo
11eb774bd7
📝 misc(projects): add nemui project 2025-02-08 10:08:42 +01:00
Óscar
05d042d27a
️ fix: improve menu accessibility (#482) 2025-02-02 14:54:03 +01:00
Óscar
5b5bdda456
🐛 fix: support external URLs in menu (#481) 2025-02-02 14:25:52 +01:00
Jérôme Ramette
8fafc0f9c8
📝 misc(README): add idle-ti.me blog to sites using tabi (#479) 2025-02-01 20:03:37 +01:00
welpo
89ad44ce26
🍱 feat(socials): add more Fediverse social icons
Resolves #478
2025-02-01 20:01:37 +01:00
Stephen Kershaw
e519864543
🔒️ fix(CSP): improve CSP coverage (#471) 2025-01-25 18:45:35 +01:00
ZzMzaw
6445f549ad
📝 misc(README): add zzmzaw's blog to sites using tabi (#469) 2025-01-19 09:43:09 +01:00
Óscar
c3b048d34a
🐛 fix(feed): load CSS in subfolder setups (#467) 2025-01-18 14:19:10 +01:00
welpo
0e0a391ea8
🍱 feat(socials): add Letterboxd social icon 2025-01-18 07:07:48 -03:00
github-actions[bot]
9b5dc70546
⬆️ chore(deps): upgrade KaTeX to v0.16.21 (#466)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-01-18 10:46:13 +01:00
Niels Gouman
36ff72b318
🐛 fix: remove nofollow robots meta tag (#465) 2025-01-17 00:26:36 +01:00
Niels Gouman
7793b819a9
📝 misc(README): add nizzlay.com to Sites using tabi (#464) 2025-01-17 00:17:22 +01:00
github-actions[bot]
f440c011cc
⬆️ chore(deps): upgrade KaTeX to v0.16.20 (#462)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-01-14 22:11:48 +01:00
welpo
47ea26db97
👷 misc(CI): add concurrency control to sumi action 2025-01-12 18:42:06 +01:00
Niels Gouman
799f3c0681
feat: support disabling header font-subset (#458)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-01-12 18:39:40 +01:00
Olexandr88
162a84b6d6
📝 docs(README): fix typo (#457) 2025-01-08 19:34:16 +01:00
welpo
de6fa58fe3
🐛 fix: show feed icon without socials
Previously the feed icon would not display when it was the only
configured "social" option, as the containing <ul> required either
socials or email to be present.

Fixes #456
2025-01-04 11:39:12 +01:00
Christian Franzl
28fe074ea0
feat: support using info-page.html for sections (#455)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-01-02 21:50:56 +01:00
github-actions[bot]
e05860636b
⬆️ chore(deps): upgrade KaTeX to v0.16.19 (#453)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-12-30 11:27:47 +01:00
welpo
1dcd615615
📝 docs(shortcodes): clarify aside usage 2024-12-28 17:42:58 +01:00
welpo
da1b6bb0cc
📝 docs(shortcodes): clarify position parameter usage for "aside" 2024-12-27 12:30:18 +01:00
Óscar
98b0c8d161
feat(shortcodes): add 'aside' shortcode for side notes (#452) 2024-12-24 10:50:47 +01:00
welpo
e1b60542df
📝 misc: add "shuku" project 2024-12-24 00:56:50 +01:00
welpo
2cc336d9d0
🐛 fix: add separator between update date & remote changes link 2024-12-24 00:41:49 +01:00
Szabolcs
6810a0cb74
📝 misc(README): add szabolcs.me to Sites using tabi (#451) 2024-12-20 12:06:52 +01:00
github-actions[bot]
9c5b55d002
⬆️ chore(deps): upgrade KaTeX to v0.16.18 (#450)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-12-19 12:06:37 +01:00
welpo
dbb0e826b6
💄 style: remove extra whitespace in post metadata
Only happened with `minify_html = false`.
2024-12-19 01:36:24 +01:00
welpo
551b3d28c6
👷 misc(CI): add dependencies label to upgrade PRs 2024-12-18 12:26:51 +01:00
github-actions[bot]
92996d98ac
⬆️ chore(deps): upgrade KaTeX to v0.16.17 (#449)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-12-18 12:18:06 +01:00
welpo
eb0395352c
📝 docs: suggest MathML in lieu of KaTeX for JS-free math 2024-12-15 13:47:54 +01:00
Ariel Richtman
3dcd7a33db
🐛 fix(analytics): update umami domain (#448) 2024-12-14 13:41:41 +01:00
github-actions[bot]
21225f832d
⬆️ chore(deps): upgrade KaTeX to v0.16.15 (#447)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-12-10 11:18:52 +01:00
github-actions[bot]
f413c9f295
⬆️ chore(deps): upgrade KaTeX to v0.16.14 (#446)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-12-09 15:04:56 +01:00
welpo
c6d1c3dff8
📝 misc: add ずつ (zutsu) project page 2024-12-04 22:56:53 +01:00
welpo
a6b6c32050
💄 style: use text-colour for hover on rt in links
Didn't look good on dark mode in note admonition.
2024-12-04 19:20:23 +01:00
welpo
0688628420
🐛 misc(upgrade-deps): improve version detection 2024-12-02 12:29:34 +01:00
welpo
69713c973c
📝 misc(README): set original colours for docs|up badge 2024-11-30 20:05:49 +01:00
welpo
077821208f
📝 misc(docs): fix Series section headings 2024-11-30 15:10:13 +01:00
welpo
0b10560a94
📝 misc(docs): use internal links in home description 2024-11-30 15:09:13 +01:00
welpo
29bbd2eecc
💚 misc(deps): check for existing branch upgrades 2024-11-29 13:16:58 +01:00
welpo
4834a9e85f
📝 docs(README): add maintenance badges 2024-11-29 13:10:19 +01:00
github-actions[bot]
e42832e131
⬆️ chore(deps): upgrade mermaid to v11.4.1 (#442) 2024-11-29 12:31:18 +01:00
Óscar
761f546b30
📝 docs: add tabi-start integration (#441) 2024-11-28 00:00:48 +01:00
Óscar
f8e98afd9d
feat: add raw_path parameter to image shortcodes (#439) 2024-11-27 21:34:42 +01:00
welpo
180fc53384
♻️ refactor: only show project tag filter with 2 or more tags
Prior to this change, the project filters would show up even with a single
tag, which wasn't very useful for filtering. Now filters only appear when
there are 2+ unique tags.
2024-11-27 19:33:47 +01:00
welpo
c15098a959
📝 misc: fix dōteki docs link 2024-11-27 16:00:40 +01:00
Óscar
9e58b3aca8
💄 style: fix home banner layout for short intro (#438) 2024-11-27 15:55:51 +01:00
welpo
6d44320f45
📝 misc: update git-sumi & dōteki projects 2024-11-25 15:17:28 +01:00
welpo
4be8a5634f
💄 style: fix numbered code blocks on iOS Safari
Tables used for line numbers were inheriting incorrect font sizes on iOS Safari
due to WebKit's text size adjustment behaviour.

Short lines were being centred, too.
2024-11-24 01:07:35 +01:00
Óscar
123110ea43
💄 style: fix numbered code blocks (#437) 2024-11-23 16:49:19 +01:00
welpo
cf6385553c
🍱 feat(socials): add ORCID icon 2024-11-23 14:13:03 +01:00
renovate[bot]
c9639dc5c8
⬆️ chore(deps): update scripts/release digest to a128ada (#433) 2024-11-23 02:54:52 +01:00
Óscar
39a6750d8b
🐛 fix: support relative paths in inherited social media card (#432) 2024-11-18 00:02:06 +01:00
welpo
a7833299ff
💥 feat!: add tag filtering for projects (#431)
- Card (project) images no longer require manual top/bottom margin
adjustments for proper spacing. Action needed: Review existing card
images as previous manual margin adjustments may now be
unnecessary/excessive.
- Sites using `cards.html` with tags will now load JavaScript by
default when tags are present. To maintain no-JS behaviour, explicitly
set `enable_cards_tag_filtering = false` in either `config.toml` or the
`_index.md` file where `cards.html` is used.
2024-11-17 00:38:32 +01:00
welpo
f93def0692
👷 misc(CI): ignore deleted files in pre-commit 2024-11-16 19:01:14 +01:00
welpo
557ea7786f
🐛 style: retain base code block style in admonitions 2024-11-16 16:06:25 +01:00
welpo
1e4859998d
⬆️ chore(deps): upgrade Inter font to v4.1
https://github.com/rsms/inter/releases/tag/v4.1
2024-11-16 14:04:52 +01:00
welpo
8e1acdbba2
🔖 chore(release): prepare for v3.1.0 2024-11-14 18:45:05 +01:00
welpo
3b7fd3db9c
🐛 fix: link to "All posts" in non-default-language root
Was linking to e.g. `es/blog/_index.es.md` instead of `/es/blog/`
2024-11-14 18:41:49 +01:00
Óscar
1cf27322ba
💄 style: colour scrollbar to match primary colour (#430) 2024-11-14 18:12:13 +01:00
Óscar
34a330f384
💄 style: set accent color to match theme (#429) 2024-11-14 18:07:32 +01:00
welpo
c3c344a76f
📝 docs: highlight pinned posts feature 2024-11-14 17:47:13 +01:00
welpo
5687f3bacb
♻️ refactor(GitHub): update issue templates 2024-11-14 00:55:41 +01:00
Óscar
d7da6feaa4
feat: allow pinned posts with pagination (#428) 2024-11-14 00:24:00 +01:00
welpo
5927409c41
💄 style: fix info admonition code color 2024-11-14 00:06:31 +01:00
Óscar
bdb1486ccc
🐛 fix: Isso comments in multilingual setups (#427) 2024-11-13 18:54:35 +01:00
Óscar
36e53dc646
feat: add pinned posts functionality (#424) 2024-11-13 18:07:46 +01:00
Óscar
42f9bb9781
💄 style: improve navigation bar & metadata wrapping (#425) 2024-11-11 18:51:16 +01:00
ZzMzaw
0253799f23
feat: add series functionality (#406)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-11-08 00:01:30 +01:00
welpo
57a0a8e1a0
🚨 misc: change codeblock language from plaintext to txt 2024-11-07 14:34:31 +01:00
Óscar
e8381d05cc
feat(shortcodes): support body admonitions (#423) 2024-11-07 14:33:06 +01:00
welpo
e2c5c6e9b7
👷 misc(CI): allow longer PR titles for dep updates
Now for real.
2024-11-06 19:07:47 +01:00
welpo
f3001298c2
📝 misc(projects): add ラム (ramu) project 2024-11-06 19:07:46 +01:00
welpo
87f1099caa
💄 style: fix hover color for <rt> element in links
Before, it would be invisible on hover.
2024-11-05 19:22:46 +01:00
welpo
51fee5d660
💄 style: add styling for <kbd> keyboard input 2024-11-05 17:28:22 +01:00
welpo
fa9f160342
👷 misc(CI): allow longer PR titles for dep updates
bd45a1ae45 didn't work
2024-11-01 14:23:36 +01:00
github-actions[bot]
5f16885b36
⬆️ chore(deps): upgrade mermaid to v11.4.0 (#420)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-10-31 11:20:02 +01:00
ZzMzaw
84dd26b26c
📝 docs(README): fix typo (#421) 2024-10-31 11:19:10 +01:00
welpo
bd45a1ae45
👷 misc(CI): allow longer PR titles for dep updates 2024-10-26 17:16:52 +02:00
welpo
2e3cff2ef1
👷 misc(deps): remove local release script 2024-10-26 16:19:39 +02:00
Óscar
3442fd9ff0
📝 docs: clarify instructions for listing recent posts (#418) 2024-10-21 01:48:04 +02:00
renovate[bot]
5737c279e5
⬆️ chore(deps): update scripts/release (#416) 2024-10-19 23:21:01 +02:00
welpo
b461964d76
🔖 chore(release): prepare for v3.0.0 2024-10-18 19:02:16 +02:00
welpo
0a36ef55ee
👷 misc: update git-cliff variables to commit.remote
`commit.github` is deprecated.
2024-10-18 19:01:16 +02:00
Óscar
c9f8d27b96
feat: add force_text_direction shortcode (#414) 2024-10-18 19:01:15 +02:00
Óscar
092ccdd1ba
💥 feat!: force code blocks LTR rendering (#412)
BREAKING CHANGE: Code blocks default to LTR. Set `force_codeblock_ltr = false` to keep previous behaviour.
2024-10-18 19:00:14 +02:00
Anett Seeker
34514c1869
🐛 fix: update CSP for GoatCounter (#413) 2024-10-18 16:08:20 +02:00
Óscar
11e246a876
📝 docs(CONTRIBUTING): fix broken link to commit message style 2024-10-15 17:54:30 +02:00
welpo
5db70b7978
📝 docs(mastering tabi): mention social links rel='me'
Related: #410
2024-10-13 15:07:18 +02:00
welpo
628bb735e7
🔖 chore(release): prepare for v2.17.0 2024-10-11 00:59:45 +02:00
welpo
47fcee8f81
📝 misc: reformat social card creation tip 2024-10-10 15:05:43 +02:00
Ariel Richtman
886aa59545
feat: add fediverse creator metadata support (#409)
Add `fediverse_creator` variable to highlight author's fediverse profile in Mastodon link previews.

Co-authored-by: Ariel Richtman <Ariel.Richtman@SilverRailTech.com>
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-10-10 14:53:39 +02:00
ZzMzaw
3fddb1f9a1
📝 docs: add mermaid shortcode usage (#407)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-10-08 01:25:36 +02:00
github-actions[bot]
7b00ed1d9d
⬆️ chore(deps): upgrade mermaid to v11.3.0 (#405)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-10-04 11:07:13 +02:00
Marcus Hughes
8e10f9e258
📝 misc(README): add jmbhughes.com to showcase (#404) 2024-10-03 22:22:36 +02:00
welpo
c50edbd453
📝 docs: update comment in config.toml RE: #402 2024-10-02 17:30:37 +02:00
Soumendra kumar sahoo
608513952f
🐛 fix: set proper URL for self-hosted Umami (#402) 2024-10-02 13:43:08 +02:00
renovate[bot]
02f9d88236
⬆️ chore(deps): update ubuntu to v24 (#403) 2024-09-26 23:33:30 +02:00
welpo
66239bee01
👷 misc(deps): replace local release script w/ git submodule 2024-09-25 00:41:11 +02:00
welpo
7ceada974b
️ refactor(search): reduce search lag on mobile
Should reduce perceived lag when opening the search modal
and scrolling through results.
2024-09-24 19:25:36 +02:00
Óscar
17694ba3d8
🐛 fix(search): restore highlighting functionality (#401) 2024-09-24 19:16:44 +02:00
welpo
fc04ab4e40
👷 misc(deps): automate KaTeX/mermaid upgrades 2024-09-24 16:18:34 +02:00
welpo
47a94d3d01
🔖 chore(release): prepare for v2.16.0 2024-09-22 15:09:50 +02:00
welpo
008b976e06
feat(remote_text shortcode): support line ranges (#399) 2024-09-22 15:06:38 +02:00
Óscar
90c1da1ddb
feat(remote_text shortcode): support relative paths (#398) 2024-09-22 14:30:03 +02:00
welpo
9101b6d6cb
🔖 chore(release): prepare for v2.15.0 2024-09-20 15:16:57 +02:00
John
0231a00ac0
📝 misc(README): add Ponderosa Games to showcase (#395) 2024-09-20 11:15:32 +02:00
Óscar
adfe28eaf9
feat(feed): make "Visit website" link context-aware (#394) 2024-09-20 01:55:05 +02:00
Óscar
52979f7f54
🐛 fix(feed): resolve Atom feed validation issues (#393) 2024-09-20 01:44:32 +02:00
Óscar
1ffe43f934
feat(search): hide "clear search" icon if input is empty (#388) 2024-09-19 16:00:34 +02:00
Óscar
0bebcd1c6d
🐛 fix: allow pages within pages (#385) 2024-09-18 00:06:02 +02:00
welpo
edb087392f
🔧 misc: set @TheAwiteb as owner of Arabic translation 2024-09-17 18:35:01 +02:00
welpo
d9c498b3a5
⬆️ chore(deps): upgrade mermaid to v11.2.1
Changelog: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.2.1

Source: https://cdn.jsdelivr.net/npm/mermaid@11.2.1/dist/mermaid.min.js
2024-09-16 20:46:26 +02:00
Óscar
1027f5ba53
🌐 style: improve RTL styling consistency (#381) 2024-09-16 17:50:16 +02:00
Óscar
35dcf55019
🐛 fix: improve dark mode and OS theme handling (#380) 2024-09-12 22:57:46 +02:00
welpo
1b11f4b321
🔨 misc(deps): avoid masking return values
Separate local variable declarations and assignments.
2024-09-09 18:49:18 +02:00
welpo
b5cbad422b
🔨 misc(deps): check local deps version to early exit 2024-09-09 18:42:46 +02:00
welpo
a106f1c489
⬆️ chore(deps): upgrade mermaid to v11.2.0
Changelog: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.2.0

Source: https://cdn.jsdelivr.net/npm/mermaid@11.2.0/dist/mermaid.min.js
2024-09-09 15:39:46 +02:00
welpo
ef1c80a9ec
🔖 chore(release): prepare for v2.14.0 2024-09-09 01:40:50 +02:00
welpo
b9bf4b2fd6
💄 style: use note admonition for TL;DR 2024-09-09 01:40:38 +02:00
welpo
0b75c8f4c4
⬆️ chore(deps): upgrade KaTeX CSS to v0.16.11 2024-09-07 00:22:36 +02:00
welpo
001ec8fc9a
🔨 misc(deps): add KaTeX to dependency upgrade script 2024-09-07 00:18:47 +02:00
welpo
d73c4bde5a
🔨 misc(deps): add script to upgrade mermaid 2024-09-06 21:13:35 +02:00
welpo
405f7643e9
⬆️ chore(deps): upgrade mermaid to v11.1.1
Changelog: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.1.1

Source: https://cdn.jsdelivr.net/npm/mermaid@11.1.1/dist/mermaid.min.js
2024-09-06 20:45:58 +02:00
welpo
e73a50c3c9
⬆️ chore(deps): update mermaid to v11.1.0
Changelog: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.1.0

File is https://cdn.jsdelivr.net/npm/mermaid@11.1.0/dist/mermaid.min.js but minified
2024-09-02 22:18:34 +02:00
Óscar
8d22a42e3f
💸 misc: add funding information 2024-09-02 22:13:55 +02:00
welpo
9e7b845e54
♻️ refactor(footer): lazy load social icons 2024-09-01 22:35:28 +02:00
Óscar
823e2ba99b
️ fix: reduce main page header/list sizes (#375) 2024-09-01 22:15:15 +02:00
Soumendra kumar sahoo
a089b7eea9
🌐 feat(i18n): add Odia language (#372) 2024-08-29 18:15:20 +02:00
Óscar
a7e78b29ab
feat: add Mermaid diagram support (#370) 2024-08-28 14:56:30 +02:00
Mohammed Alotaibi
13d305ac1a
🐛 fix(RTL): fix blockquote style (#368)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-08-26 15:38:33 +02:00
Arnold Loubriat
ce3be5c007
️ fix: add missing quotes to HTML attributes (#367) 2024-08-23 20:54:13 +02:00
renovate[bot]
37df94db9f
⬆️ chore(deps): update zola-deploy-action action to v0.19.2 (#366) 2024-08-19 11:31:19 +02:00
George Mynarskyi
6ba0e54104
🌐 feat(i18n): add Estonian language (#365) 2024-08-18 14:48:42 +02:00
welpo
6219b9200c
📝 docs(mastering tabi): clarify prev/next links requirements 2024-08-13 16:41:09 +02:00
welpo
82f7a984d5
👷 misc(release): ensure script is ran from default branch 2024-07-24 20:25:36 +02:00
welpo
c2519c51d6
🔖 chore(release): prepare for v2.13.0 2024-07-24 20:17:13 +02:00
welpo
9585843b14
♻️ misc(release): add error handling function 2024-07-24 20:16:36 +02:00
welpo
617a940cf8
👷 misc(release): ensure local repository is in good state 2024-07-24 20:10:19 +02:00
Óscar
89d3544db5
💄 style(error): enhance visibility of Zola errors (#359) 2024-07-24 19:59:42 +02:00
Óscar
24896a5f77
🐛 fix(header): render feed links based on config (#358) 2024-07-24 19:33:26 +02:00
Óscar
c7b79552c4
feat: follow user OS theme with JS disabled (#357) 2024-07-24 19:14:57 +02:00
sam
5db006ac47
🐛 fix(post_listing_date): show original date for unedited articles (#355) 2024-07-14 16:35:17 +02:00
sam
a76d6888b6
feat: add date visibility options to post list (#330)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-07-11 23:19:14 +02:00
Óscar
57ff693eca
⬆️ chore(deps): update KaTeX to v0.16.11 (#354) 2024-07-04 22:23:30 +02:00
welpo
fbb81f9764
📝 docs: mention custom Twitter card & automatic OG tags
Related: #353
2024-07-04 15:03:41 +02:00
welpo
1111631325
📝 docs(mastering tabi): fix broken image 2024-07-04 15:01:01 +02:00
Óscar
f72f454ea7
🐛 fix(search): close modal when clicking current page result (#350) 2024-07-01 22:59:01 +02:00
welpo
0f18ac264d
💄 style: match footnote backlinks size on Zola v0.19 2024-07-01 15:08:59 +02:00
renovate[bot]
6ca5a56055
⬆️ chore(deps): update demo and CI to Zola v0.19.1 (#345)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-07-01 15:08:18 +02:00
welpo
ced0cb43b6
📝 docs: deprecate JS footnote backlinks
In favour of native `bottom_footnotes` available in Zola 0.19.0.
2024-07-01 14:20:29 +02:00
welpo
4145364e08
📝 docs: fix broken internal links
Fixes #346 and #347.
2024-07-01 11:22:34 +02:00
welpo
e0d1cdeb66
🔖 chore(release): prepare for v2.12.0 2024-06-30 01:50:54 +02:00
Phil Schumann
3d3f62cf20
feat: allow sorting tags based on post count (#344)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-06-29 17:39:31 +02:00
welpo
a907f56bd5
feat: add option to use sans-serif font everywhere 2024-06-29 17:21:23 +02:00
welpo
82ecbc1454
🍱 feat(socials): add Debian icon 2024-06-28 19:15:42 +02:00
Óscar
3bb2dbc355
🌐 refactor: improve "Last updated on" format (#342) 2024-06-28 19:09:35 +02:00
Óscar
d689c15145
feat(admonitions): allow swapping admonition icons (#340) 2024-06-27 21:08:05 +02:00
welpo
c9c8ed84a0
📝 docs(mastering tabi): clarify post sorting in Archive
Related: #339
2024-06-27 13:48:55 +02:00
welpo
0a8d01014f
🔖 chore(release): prepare for v2.11.0 2024-06-24 11:30:20 +02:00
welpo
7a3380c467
📝 docs(README): fix command to update tabi submodule
Related: #338
2024-06-23 19:16:18 +02:00
Óscar
fdb63c8cb6
🐛 fix(footer): show feed icon on Zola 0.19.0 (#336) 2024-06-22 00:13:32 +02:00
welpo
448250ff57
🐛 misc(pre-commit hook): handle filenames with spaces 2024-06-21 00:54:22 +02:00
welpo
faa9633531
💄 style(admonitions): reduce thickness of strong tag
Matches the rest of the theme, improving cohesion across browsers.
2024-06-20 19:12:28 +02:00
welpo
be7628aeaa
feat: allow HTML tags in multilingual quote author 2024-06-20 17:54:53 +02:00
welpo
5ae629d171
📝 docs: explain how to use custom social icons 2024-06-19 21:39:02 +02:00
Andrea C
39ba56f02c
feat(socials): add bluesky icon (#333) 2024-06-19 19:53:27 +02:00
welpo
7d386283ff
📝 docs(README): clarify section_path format 2024-06-18 22:19:37 +02:00
welpo
4a47e0ad23
📝 docs(README): add commands to update the theme 2024-06-08 01:55:31 +02:00
welpo
be58172454
🔖 chore(release): prepare for v2.10.0 2024-05-30 14:39:16 +02:00
welpo
3b0d7e5a66
📝 docs: CSP requirements to use built-in syntax highlighting
Resolves #320.
2024-05-30 14:33:09 +02:00
welpo
22925caf06
🐛 fix: allow quotation in page summary
Quotation marks were being escaped, as the `safe` filter was not being used.
2024-05-30 14:12:44 +02:00
Martijn Faassen
f5f195c90c
♻️ refactor: improve settings hierarchy performance (#325) 2024-05-30 14:02:34 +02:00
Óscar
9d49a65354
feat: add option to show author in post metadata (#322) 2024-05-27 02:16:03 +02:00
Martijn Faassen
86a4e5f5f4
🍱 misc: update nani logo (#323) 2024-05-26 22:08:24 +02:00
welpo
94b3b1d804
💄 style: increase font size of h1
Resolves #321.
2024-05-24 21:54:32 +02:00
Óscar
c54251ca7a
feat(homepage): allow hiding posts listing (#317) 2024-05-19 20:36:38 +02:00
welpo
349663f28f
✏️ docs(mastering tabi): fix typo 2024-05-19 20:27:56 +02:00
Óscar
27525fc13f
feat(shortcodes): add inline option to image shortcodes (#315) 2024-05-18 14:52:39 +02:00
welpo
6a4f4244e0
feat: add inline image CSS class
Regular images get a `block` display to be centered.
This allows vertically aligned inline images.

Related: #314
2024-05-15 21:59:21 +02:00
welpo
aef49bb225
🐛 fix(footer): allow showing only email/feed icons
Fixes #312
2024-05-15 13:28:32 +02:00
welpo
1894d550bc
📈 misc(analytics): stop collecting Language data
It didn't seem to work.
2024-05-12 13:11:01 +02:00
welpo
e7e2f41e52
🔖 chore(release): prepare for v2.9.0 2024-05-12 00:36:02 +02:00
Ariel Richtman
26b9bbd7ba
🐛 fix(analytics): allow Umami through CSP (#310) 2024-05-07 09:10:52 +02:00
welpo
f081a92f59
💄 fix(add_src_to_code_block): avoid overlapping text 2024-05-03 23:40:19 +02:00
welpo
b70efd1642
feat: enable adding URL/path to code blocks (#307) 2024-05-03 17:37:40 +02:00
Óscar
0cbd727f25
feat: add option to display/hide date in metadata (#306) 2024-05-02 23:32:42 +02:00
Óscar
5bc593b676
feat(shortcodes): add remote_text shortcode (#305) 2024-05-02 22:57:56 +02:00
welpo
be9458cfad
🔖 chore(release): prepare for v2.8.1 2024-05-02 00:19:24 +02:00
welpo
50123c09ef
🐛 fix: ensure spacing when all projects are shown
Fixes #303.
2024-05-02 00:17:49 +02:00
welpo
52cd0cfccd
🔖 chore(release): prepare for v2.8.0 2024-04-29 14:41:17 +02:00
Ariel Richtman
341b80a2fd
🐛 fix(CSP): add Umami API URLs to CSP (#301) 2024-04-29 14:39:37 +02:00
welpo
b6b48cc3b4
🎨 refactor(search): close unclosed div 2024-04-28 18:02:59 +02:00
welpo
69094d6335
🐛 fix: align projects and posts properly
Caused by an unclosed div.

Fixes #300.
2024-04-28 18:02:07 +02:00
welpo
ba5acca734
📝 misc(README): remove sites no longer using tabi 2024-04-27 11:22:00 +02:00
Ariel Richtman
62a90f0723
📝 docs(README): add arichtman blog to showcase (#298) 2024-04-27 11:18:28 +02:00
Óscar
e7172a0432
feat: allow showcasing featured projects on homepage (#297) 2024-04-23 17:59:35 +02:00
welpo
7ef74a8f53
🔖 chore(release): prepare for v2.7.0 2024-04-18 15:03:36 +02:00
Daniel Kessler
9249d9fbbe
🐛 fix: link 'All posts' to proper section (#295)
Co-authored-by: Daniel Kessler (a.k.a. Dalker) <daniel.kessler@dalker.org>
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-04-18 14:58:50 +02:00
Myrdin
07bd0e17ea
🌐 feat(i18n): add Dutch language (#290)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-04-17 23:30:01 +02:00
Mohammed Alotaibi
838e3566bd
🐛 fix: fix history url for GitLab & Codeberg (#294) 2024-04-14 05:03:57 +02:00
Óscar
d0dd37ef1e
⬆️ chore(deps): update KaTeX to v0.16.10 (#288) 2024-03-25 13:03:26 +01:00
welpo
ad289f1d2c
📝 misc(projects): list Streaming Royalties Calculator 2024-03-23 00:50:28 +01:00
welpo
ce1a98ed93
🍱 misc: update nani logo
Fixes alignment issue with other logos.
2024-03-22 15:10:04 +01:00
welpo
ec6ba01bbc
🍱 misc: compress dōteki & git-sumi social media cards 2024-03-22 14:56:32 +01:00
welpo
e965694cdf
💄 style(shortcodes): use colourful admonition icons 2024-03-22 01:59:41 +01:00
welpo
30acc58f96
🔖 chore(release): prepare for v2.6.1 2024-03-21 22:24:56 +01:00
welpo
38f3aafdd8
👷 misc(CI): use CHANGES.md for GitHub release notes
Should fix shell parsing issues with special characters in release notes.
2024-03-21 22:18:49 +01:00
welpo
b4fec9c81f
🔖 chore(release): prepare for v2.6.0 2024-03-21 22:04:21 +01:00
Jérôme Ramette
a08a9f19c7
🐛 fix(feed): fix "Visit website" link with skin config (#286) 2024-03-21 22:03:28 +01:00
welpo
d0162291d9
feat(shortcodes): add admonition shortcode (#285) 2024-03-21 01:21:11 +01:00
welpo
edef96567c
🔖 chore(release): prepare for v2.5.0 2024-03-17 15:19:11 +01:00
Jérôme Ramette
1d49269003
🌐 fix(i18n): improve FR translations and correct typos (#284) 2024-03-17 11:31:55 +01:00
welpo
5e0cbdd67d
feat: allow disabling CSP, following the hierarchy
Introduces new option `enable_csp`, true by default.
Can be set on a page, section or globally.
2024-03-15 15:04:37 +01:00
welpo
8537bbc10e
♻️ refactor: set visibility hidden in "hidden" class 2024-03-11 12:32:36 +01:00
welpo
d825bef730
🎨 refactor: correct invalid attributes in search input 2024-03-10 23:54:17 +01:00
welpo
e951e95110
👷 misc(release): replace both pull and issue links 2024-03-02 15:56:47 +01:00
welpo
faaaee2f59
🔖 chore(release): prepare for v2.4.0 2024-03-02 15:48:17 +01:00
Smtbook
90410868ee
🐛 fix: allow translated drafts (#282)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-03-01 21:33:49 +01:00
Jafar Farganlooj
9a5ea8ed65
🌐 feat(i18n): add Persian language (#283)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-03-01 21:24:48 +01:00
welpo
4aaa2346d0
🍱 feat(socials): add Signal icon 2024-02-20 23:50:13 +01:00
welpo
0192b3ed9f
👷 misc(release): fix cross-compatibility of sed command 2024-02-19 22:07:18 +01:00
welpo
2ede03550a
👷 misc(CI): update git-cliff's github integration 2024-02-19 20:31:36 +01:00
welpo
8de049a2b5
🔧 misc(release): add author link only on full changelog
Makes it easier to auto-release with `cd.yml`, as release descriptions
automatically link to GitHub profiles based on the handle.
2024-02-19 20:18:26 +01:00
welpo
46ad1f011e
🔖 chore(release): prepare for v2.3.0 2024-02-19 19:45:29 +01:00
welpo
e2358f7edf
🔧 misc(release): remove link comparison 2024-02-19 19:45:12 +01:00
welpo
7b13798a68
📝 misc(projects): load git-sumi demo from its repo 2024-02-19 17:17:18 +01:00
welpo
5b5d1fa592
🔧 misc(release): update CHANGELOG format
Note: needs git-cliff > 1.4.0

- Use new `remote` options for git-cliff
- List authors and co-authors per commit
- Add new contributors list per release
- release script: clean up Markdown to remove separate git-cliff templates
2024-02-18 19:04:20 +01:00
Mohammed Alotaibi
c4893d4fdd
feat(i18n): implement pluralization logic (#277)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-02-16 15:41:25 +01:00
welpo
daef40338c
👷 misc(CI): build before checking links 2024-02-16 15:33:37 +01:00
welpo
0158097594
🔧 misc(link_checker): skip vultr.com links 2024-02-16 15:29:46 +01:00
welpo
3672a94e86
🔧 misc: add renovate config 2024-02-16 13:13:08 +01:00
welpo
262fcd95f1
👷 misc(CI): improve CI to check and build for PRs 2024-02-16 13:12:22 +01:00
welpo
6efe2ee57d
📝 docs: fix various broken links 2024-02-16 12:53:41 +01:00
welpo
22d4d68a69
💄 style(projects): set entire card as link target 2024-02-16 12:29:02 +01:00
welpo
d543560431
📝 misc(demo): update projects section 2024-02-16 01:45:10 +01:00
welpo
238487b4b2
📝 docs: update tabi screenshots 2024-02-16 01:07:51 +01:00
Óscar
ed845eaf25
feat(shortcodes): support URLs for image source (#280) 2024-02-16 00:49:16 +01:00
welpo
90def02dd7
🐛 fix(404): fix broken language selection from 404 page
Fixes #279.
2024-02-15 23:35:44 +01:00
welpo
274c4146b2
📝 docs(mastering-tabi): fix unclosed codeblock 2024-02-15 21:13:58 +01:00
Óscar
1b21b6397b
💄 style(projects): minor redesign (#278) 2024-02-15 19:02:47 +01:00
welpo
e5442fa29f
📝 docs(i18n): add Arabic to list of supported languages 2024-02-14 23:09:56 +01:00
Óscar
011d24a74b
🐛 fix(article-navigation): adjust spacing for RTL (#275) 2024-02-12 19:32:37 +01:00
Mohammed Alotaibi
b3ef23f305
🐛 fix(i18n): reverse arrows in RTL languages (#272)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-02-12 18:46:48 +01:00
Mohammed Alotaibi
009d2f646d
🐛 fix(i18n): fix header anchor for RTL (#270)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-02-12 17:40:42 +01:00
Mohammed Alotaibi
5a306d04cb
🐛 fix(i18n): atom feed page direction for RTL langs (#268)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-02-11 21:11:21 +01:00
Mohammed Alotaibi
13045f02a6
🌐 feat(i18n): add Arabic language (#265) 2024-02-11 21:08:05 +01:00
welpo
e373482946
🔧 misc(git-sumi): improve emoji matching 2024-02-11 13:31:07 +01:00
welpo
7e428c899b
🔖 chore(release): prepare for v2.2.0 2024-02-10 12:29:05 +01:00
Mohammed Alotaibi
afc82449fa
🐛 fix(tags): Arabic tags stuck together (#264)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-02-10 11:47:01 +01:00
welpo
119533b176
🔧 misc(git-sumi): require a space after the gitmoji 2024-02-10 00:18:18 +01:00
Mohammed Alotaibi
1d55a2963d
feat(i18n): add Right-to-left script support (#262)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-02-09 21:36:47 +01:00
welpo
8b5a131001
📝 docs(README): add git-sumi badge 2024-02-08 22:38:59 +01:00
welpo
1bb3c91b91
🔧 misc(CHANGELOG): improve emoji pattern 2024-02-08 01:25:31 +01:00
welpo
1e468f4acb
🔧 misc(CI): update git-sumi config 2024-02-08 01:07:02 +01:00
welpo
71f09a81b0
👷 misc(CI): use git-sumi hook to lint commit messages 2024-02-07 17:13:45 +01:00
welpo
f7c0de412d
📝 docs(README): add IPA notation for pronunciation 2024-02-07 17:07:51 +01:00
welpo
bcde187f73
📝 docs(README): add project badges 2024-02-07 17:05:12 +01:00
welpo
fcf16a457e
👷 misc(release): verify version tag format on release 2024-02-07 16:27:54 +01:00
welpo
c193d4d4e8
👷 misc: use git-sumi to lint commit messages 2024-02-07 01:10:31 +01:00
welpo
28d0f70e18
📝 docs(contributing): enrich PR information 2024-02-07 01:09:58 +01:00
welpo
0e6c5c2691
🔧 misc: update changelog sections 2024-02-07 01:02:48 +01:00
welpo
9b8b1396cf
🚀 misc: add continuous deployment workflow 2024-02-06 18:24:28 +01:00
welpo
7cc74d1fd9
👷 misc(CI): fix links in tag description
I don't think it's possible to override the preprocessors using an env variable.
2024-02-04 22:52:35 +01:00
welpo
1382b44c18
📝 docs(README): remove quick start section
In favour of properly installing a theme as a submodule or clone.
2024-02-04 20:16:18 +01:00
welpo
a05170c689
📝 docs(README): recommend installing tabi as a submodule or cloning it 2024-01-31 23:45:38 +01:00
welpo
ad03bd274c
📈 chore(stats): prevent non-demo sites from using demo GoatCounter 2024-01-31 23:33:51 +01:00
welpo
5d6cd7a7cf
🔖 chore(release): prepare for v2.1.0 2024-01-29 14:12:31 +01:00
ZzMzaw
b011f58da6
feat: allow inverting previous/next article links (#261)
- Adds next/previous labels for clarity
- Truncated long titles get "…" appended

Co-authored-by: welpo <welpo@users.noreply.github.com>
2024-01-29 00:00:30 +01:00
welpo
c9d6b62907
📝 docs(README): add CSS code block setup in required config
Related discussion: #258
2024-01-23 23:42:15 +01:00
Ian Andwati
24bb8d0bee
📝 chore(README): add andwati.github.io to showcase (#257) 2024-01-21 11:13:08 +01:00
welpo
124c31eea6
👷 chore(release): improve release script 2024-01-19 17:50:03 +01:00
welpo
8d5d6bccd0
👷 chore(release): refactor cliff-tag into release script 2024-01-19 01:19:26 +01:00
welpo
de7e30d6c5
👷 chore(release): print GitHub tag URL at the end of release 2024-01-15 21:58:29 +01:00
welpo
fabffb084e
🐛 chore(release): fix changelog spacing issue 2024-01-15 20:07:14 +01:00
welpo
3cb94d9798
🔖 chore(release): prepare for v2.0.0 2024-01-15 19:57:12 +01:00
welpo
64482cacb3
👷 chore(release): use different config for tag release
Avoids adding PR links which aren't clickable on the tags page.
2024-01-15 19:56:41 +01:00
welpo
ca65cd5a62
👷 chore(release): fix git-cliff template 2024-01-15 19:12:50 +01:00
welpo
abe690c1b1
👷 chore(release): re-list breaking changes in their category 2024-01-15 18:59:34 +01:00
welpo
5e45827322
👷 chore(release): add deprecations section to changelog 2024-01-15 18:55:23 +01:00
welpo
9f39b7fe47
💥 deprecate(i18n)!: force config.toml copyright translation (#255) 2024-01-15 18:52:48 +01:00
Óscar
1a1a7f79f2
💥 deprecate(home-banner)!: force proper header.img path (#254) 2024-01-15 18:37:14 +01:00
welpo
2c8a21d558
🐛 fix(archive): group multi-sourced posts by year
Closes #251.
2024-01-11 20:14:17 +01:00
welpo
c4e5a65908
📝 docs(faq-languages): clarify setting default language 2024-01-11 11:35:58 +01:00
Óscar
906bc9dec0
feat: add search functionality (#250) 2024-01-08 01:00:52 +01:00
welpo
fcd0c34d19
👷 chore(release): list breaking changes first in changelogs 2024-01-07 02:52:38 +01:00
welpo
eb3cee71f0
📝 chore(docs): mention Chinese Traditional support 2024-01-06 20:18:15 +01:00
welpo
aae1b160b2
📝 chore(tabi-project): fix link to i18n support 2024-01-06 20:04:37 +01:00
welpo
7fa208a2a5
🔧 chore: set full width prev/next article nav 2024-01-05 23:51:28 +01:00
welpo
563a452330
📝 chore(README): fix sorting issue in features 2024-01-05 23:40:53 +01:00
Óscar
b518e13c5d
feat(archive): allow multiple sources in Archive (#249) 2024-01-05 15:32:19 +01:00
welpo
e2baa36ddc
📝 docs(mastering-tabi): fix browser_theme_color spelling 2024-01-05 14:55:10 +01:00
Óscar
d50a85b5bc
feat: adjust width of prev/next link section (#248) 2024-01-05 14:50:14 +01:00
Óscar
dac6bfc024
feat: add previous/next article navigation (#246) 2024-01-04 19:05:06 +01:00
welpo
0aef23b370
🐛 fix(i18n): localise date in single taxonomy listing 2024-01-04 17:28:46 +01:00
welpo
dce495e71d
️ feat(a11y): add keyboard accessibility to theme toggler 2024-01-03 18:43:51 +01:00
Óscar
b6a89e6370
🎨 refactor: format JS with Prettier (#240) 2024-01-03 01:44:31 +01:00
Óscar
39fc4ece61
feat: add taxonomy list & single term templates (#239) 2024-01-01 17:02:03 +01:00
welpo
a1a258708e
chore(release-script): suggest version if none provided 2023-12-31 12:54:15 +01:00
welpo
cd2cbf36fa
📝 docs(mastering-tabi): favour GitHub discussions over comment section 2023-12-31 02:19:49 +01:00
Óscar Fernández
9fc45f288d
feat(tags): dynamically adjust tag list columns based on tag count (#233) 2023-12-30 17:42:26 +01:00
Óscar Fernández
d257e022ea
feat(tags): add compact_tags option (#232)
Co-authored-by: arichtman <10679234+arichtman@users.noreply.github.com>
2023-12-30 16:41:08 +01:00
welpo
0b13dd306d
👷 chore(pre-commit): update git-cliff template 2023-12-30 15:48:24 +01:00
welpo
8cbec84389
👷 chore(release): add release preparation script 2023-12-30 15:32:49 +01:00
welpo
33ba3abc8d
👷 chore(issue-template): request tabi version or commit 2023-12-30 13:09:04 +01:00
Ariel Richtman
58da40bdc0
🍱 feat(socials): add Keybase icon (#231) 2023-12-30 11:48:00 +01:00
welpo
b16ad26b00
👷 chore(pre-commit): ignore TODO in changelog 2023-12-30 01:07:03 +01:00
welpo
527d209d7d
📝 chore(changelog): add initial changelog 2023-12-30 01:06:54 +01:00
welpo
e1d6c6d85a
🔧 chore(changelog): set up cliff.toml for git cliff 2023-12-30 00:53:48 +01:00
395 changed files with 27631 additions and 1692 deletions

25
.githooks/commit-msg Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Commit-msg hook generated by git-sumi.
# For more information and documentation, visit: https://sumi.rs
set -e # Exit on any error.
# Get the current branch name.
current_branch=$(git rev-parse --abbrev-ref HEAD)
# Check if the current branch is 'main'.
if [ "$current_branch" != "main" ]; then
exit 0 # Exit successfully without running git-sumi.
fi
# Check if git-sumi is installed.
if ! command -v git-sumi &> /dev/null
then
echo "git-sumi is not installed. Please install it. See https://sumi.rs for instructions."
echo "Alternatively, edit or remove the commit-msg hook in .git/hooks/commit-msg."
exit 1
fi
# Run git-sumi on the commit message if on the 'main' branch.
git-sumi -- "$(cat $1)" # Exit with error if linting fails.

View file

@ -148,13 +148,16 @@ fi
# Ensure JavaScript files are minified. #
##################################################################
# Get the newly added and modified files.
all_changed_files=$(git diff --cached --name-only --diff-filter=AM)
# Get the newly added and modified files, but not deleted files.
mapfile -t all_changed_files < <(git diff --cached --name-only --diff-filter=d)
script_name=$(basename "$0")
# Loop through all newly added or modified files.
for file in $all_changed_files; do
# Ignore this script.
if [[ "$file" == "$0" ]]; then
for file in "${all_changed_files[@]}"; do
file_name=$(basename "$file")
# Ignore this script and the changelog.
if [[ "$file_name" == "$script_name" ]] || [[ "$file_name" == "CHANGELOG.md" ]]; then
continue
fi

1
.github/CODEOWNERS vendored
View file

@ -1 +1,2 @@
* @welpo
i18n/ar.toml @TheAwiteb

1
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1 @@
github: welpo

62
.github/ISSUE_TEMPLATE/2_bug_report.yml vendored Normal file
View file

@ -0,0 +1,62 @@
name: "🐛 Bug report"
description: "Did you run into an issue while using tabi?"
labels: ["bug"]
body:
- type: textarea
attributes:
label: "System information"
description: |
Please provide the following information:
- Zola version: Run `zola --version`
- tabi version or commit hash
placeholder: |
Zola version:
tabi version or commit:
validations:
required: true
- type: textarea
attributes:
label: "Expected behaviour"
description: "Tell us what should have happened."
placeholder: "Describe what you expected tabi to do…"
validations:
required: true
- type: textarea
attributes:
label: "Actual behaviour"
description: "Tell us what happens instead of the expected behavior."
placeholder: "Describe what actually happened…"
validations:
required: true
- type: textarea
attributes:
label: "Steps to reproduce"
description: "Please provide detailed steps to reproduce the issue."
placeholder: |
1. Set up `config.toml` with these settings:
2. Create content with this structure:
3. Run Zola with these arguments:
4. See the following error:
validations:
required: true
- type: textarea
attributes:
label: "Additional context"
description: >
Please provide any relevant configuration files, error messages, or screenshots that might help us understand the issue.
You can drag and drop files here to attach them.
validations:
required: false
- type: checkboxes
attributes:
label: "Final checklist"
options:
- label: "I've checked that the issue isn't already reported."
required: true
- label: "I've tested with the latest version of tabi to check if the issue has already been fixed."
required: true

View file

@ -0,0 +1,34 @@
name: "✨ Feature request"
description: "Suggest an idea for tabi"
labels: ["enhancement"]
body:
- type: textarea
attributes:
label: "Summary and motivation"
description: "Briefly describe the feature and why it would be valuable for tabi users."
placeholder: |
Describe:
- What the feature is
- Why it would be useful
- Any examples from other projects
validations:
required: true
- type: textarea
attributes:
label: "Implementation details"
description: "Share any ideas you have about how this could be implemented."
placeholder: "Technical suggestions, potential approaches, or specific requirements."
validations:
required: false
- type: checkboxes
attributes:
label: "Checklist"
options:
- label: "I've searched existing issues to make sure this feature hasn't already been requested."
required: true
- label: "This feature aligns with tabi's philosophy (minimal JS, accessible…)"
required: true
- label: "I'm willing to contribute to the implementation of this feature."
required: false

View file

@ -1,24 +0,0 @@
---
name: Bug report
about: Did you run into an issue while using tabi?
title: ''
labels: bug
assignees: ''
---
# Bug Report
## Environment
Zola version:
tabi commit:
## Expected Behavior
Tell us what should have happened.
## Current Behavior
Tell us what happens instead of the expected behavior.
## Step to Reproduce
Please provide the steps to reproduce the issue.

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💬 tabi discussions
url: https://github.com/welpo/tabi/discussions
about: If you have questions or need help, feel free to ask here~

View file

@ -1,22 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project.
title: ''
labels: enhancement
assignees: ''
---
# Feature Request
## Summary
Briefly describe what this feature request is about.
## Motivation
Why should this feature be implemented? How will it benefit the project and its users?
## Detailed Description
Please provide a detailed description of the proposed feature, including any suggestions you have for how it could be implemented.
## Additional Context
Add any other context or screenshots about the feature request here. If this feature request is related to a problem, please describe it.

View file

@ -58,6 +58,7 @@ If you need help, please ask! -->
- [ ] I have verified the accessibility of my changes
- [ ] I have tested all possible scenarios for this change
- [ ] I have updated `theme.toml` with a sane default for the feature
- [ ] I have updated `config.toml` in [tabi-start](https://github.com/welpo/tabi-start)
- [ ] I have made corresponding changes to the documentation:
- [ ] Updated `config.toml` comments
- [ ] Updated `theme.toml` comments

29
.github/renovate.json vendored Normal file
View file

@ -0,0 +1,29 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", ":automergeMinor", ":disableDependencyDashboard"],
"commitMessagePrefix": "⬆️",
"commitMessageAction": "chore(deps): update",
"commitMessageTopic": "{{{depName}}}",
"labels": ["dependencies"],
"git-submodules": {
"enabled": true
},
"packageRules": [
{
"updateTypes": ["pin"],
"commitMessagePrefix": "📌"
},
{
"updateTypes": ["major", "minor", "patch", "digest", "bump"],
"commitMessagePrefix": "⬆️"
},
{
"updateTypes": ["rollback"],
"commitMessagePrefix": "⬇️"
},
{
"matchFileNames": ["scripts/release/**"],
"automerge": true
}
]
}

36
.github/workflows/cd.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Continuous Deployment
on:
push:
tags:
- 'v*.*.*'
jobs:
deploy:
name: Deploy and release
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Generate the changelog
uses: orhun/git-cliff-action@main
id: git-cliff
with:
config: cliff.toml
args: --latest --strip all
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT: CHANGES.md
- name: Create GitHub release
run: |
gh release create ${{ github.ref_name }} \
--title "Release ${{ github.ref_name }}" \
--notes-file CHANGES.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

44
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,44 @@
name: Build Site
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check_and_build_pr:
name: Check and Build for Pull Requests
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout Code
uses: actions/checkout@v5
- name: Zola Build
uses: shalzz/zola-deploy-action@v0.21.0
env:
BUILD_ONLY: true
- name: Zola Check
uses: shalzz/zola-deploy-action@v0.21.0
env:
BUILD_ONLY: true
CHECK_LINKS: true
build_and_deploy:
name: Build and Deploy on Main Push
runs-on: ubuntu-24.04
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout Code
uses: actions/checkout@v5
- name: Build and Deploy
uses: shalzz/zola-deploy-action@v0.21.0
env:
PAGES_BRANCH: gh-pages
TOKEN: ${{ secrets.TOKEN }}
BUILD_THEMES: false

28
.github/workflows/git-sumi.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Lint pull request title
on:
pull_request:
types:
- opened
- edited
- synchronize
- ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
pull-requests: read
jobs:
main:
name: Run git-sumi
runs-on: ubuntu-24.04
steps:
- name: Set header length for dependency updates
if: contains(github.event.pull_request.title, 'chore(deps)')
run: echo "GIT_SUMI_MAX_HEADER_LENGTH=80" >> $GITHUB_ENV
- uses: welpo/git-sumi-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

89
.github/workflows/upgrade-deps.yml vendored Normal file
View file

@ -0,0 +1,89 @@
name: Dependency upgrade
on:
workflow_dispatch:
inputs:
dependency:
description: 'Dependency to upgrade'
required: true
type: choice
options:
- all
- mermaid
- katex
schedule:
- cron: '32 4 * * *'
jobs:
upgrade-dependency:
name: Upgrade dependency
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
strategy:
matrix:
dependency: ${{ github.event_name == 'schedule' && fromJson('["mermaid", "katex"]') || fromJson(format('["{0}"]', github.event.inputs.dependency)) }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up environment
run: |
sudo apt-get update
sudo apt-get install -y jq npm curl git
npm install uglify-js -g
uglifyjs --version
- name: Configure GPG key
run: |
echo -n ${{ secrets.GPG_PRIVATE_KEY }} | base64 --decode | gpg --import
- name: Configure Git
run: |
git config --global user.signingkey 33EACFE956484C3940BFEEDCE4EC28F8DFB57474
git config --global commit.gpgsign true
git config --global user.name "welpo"
git config --global user.email "welpo@users.noreply.github.com"
- name: Check for existing branch
id: check_branch
run: |
if git ls-remote --heads origin deps/upgrade-${{ matrix.dependency }} | grep -q deps/upgrade-${{ matrix.dependency }}; then
echo "branch_exists=true" >> $GITHUB_OUTPUT
else
echo "branch_exists=false" >> $GITHUB_OUTPUT
fi
- name: Handle existing branch
if: steps.check_branch.outputs.branch_exists == 'true'
run: |
echo "Branch deps/upgrade-${{ matrix.dependency }} already exists."
echo "Skipping upgrade as there's already an open PR"
exit 0
- name: Create and switch to new branch
run: |
git checkout -b deps/upgrade-${{ matrix.dependency }}
- name: Run upgrade script
shell: bash
run: |
if [[ "${{ matrix.dependency }}" == "all" ]]; then
bash scripts/upgrade-deps --all
else
bash scripts/upgrade-deps --${{ matrix.dependency }}
fi
- name: Push changes and create PR
shell: bash
run: |
if git diff --quiet HEAD origin/main; then
echo "No changes to push for ${{ matrix.dependency }}"
exit 0
fi
git push -u origin deps/upgrade-${{ matrix.dependency }}
gh pr create --fill --base main --head deps/upgrade-${{ matrix.dependency }} --label "dependencies"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,18 +0,0 @@
# On every push this script is executed
on: push
name: Build and deploy GH Pages
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: checkout
uses: actions/checkout@v3.0.0
- name: build_and_deploy
uses: shalzz/zola-deploy-action@master
env:
# Target branch
PAGES_BRANCH: gh-pages
# Provide personal access token
TOKEN: ${{ secrets.TOKEN }}
BUILD_THEMES: false

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "scripts/release"]
path = scripts/release
url = https://github.com/welpo/release.git

1
.prettierignore Normal file
View file

@ -0,0 +1 @@
*.min.*

11
.prettierrc.toml Normal file
View file

@ -0,0 +1,11 @@
semi = true
trailingComma = "es5"
singleQuote = true
printWidth = 88
tabWidth = 4
useTabs = false
arrowParens = "always"
bracketSpacing = true
jsxBracketSameLine = false
jsxSingleQuote = true
endOfLine = "lf"

1298
CHANGELOG.md Normal file

File diff suppressed because it is too large Load diff

View file

@ -16,17 +16,61 @@ We welcome contributions in many forms, including:
If you're not sure how to contribute or need help with something, please don't hesitate to reach out via the [issue tracker](https://github.com/welpo/tabi/issues) or [mail](mailto:tabi@osc.garden?subject=[GitHub]%20tabi).
## How to submit a pull request?
## Pull Requests
- Follow the [GitHub flow](https://guides.github.com/introduction/flow/).
- Follow the [Conventional Commits Specification](https://www.conventionalcommits.org/en/v1.0.0/).
- Use [gitmoji](https://gitmoji.dev/) it's fun! 🫶
Working on your first Pull Request? You can learn how from this free video series:
[**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
Please make sure the following is done when submitting a pull request:
1. **Keep your PR small**. Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
2. **Use descriptive titles**. It is recommended to follow this [commit message style](#conventional-commit-messages-with-gitmoji).
3. **Test your changes**. Make sure to test different configurations that might affect your changes.
4. **Fill the PR template**. The template will guide you through the process of submitting a PR.
### Conventional Commit Messages with Gitmoji
See how a minor change to your commit message style can make you a better programmer.
Format: `<gitmoji> <type>(<scope>): <description>`
`<gitmoji>` is an emoji from the [gitmoji](https://gitmoji.dev/) list. It makes it easier to visually scan the commit history and quickly grasp the purpose of changes.
`<scope>` is optional. If your change affects a specific part of the codebase, consider adding the scope. Scopes should be brief but recognizable, e.g. `config`, `feed`, or `search`.
The various types of commits:
- `feat`: a new API or behaviour **for the end user**.
- `fix`: a bug fix **for the end user**.
- `style`: changes to the visual appearance of the theme, e.g. CSS, fonts, images…
- `docs`: a change to the website or other Markdown documents.
- `refactor`: a change to code that doesn't change behaviour, e.g. splitting files, renaming internal variables, improving code style…
- `chore`: upgrading dependencies, releasing new versions… Chores that are **regularly done** for maintenance purposes.
- `misc`: anything else that doesn't change production code, yet is not `chore`. e.g. updating GitHub actions workflow.
The commits within your PR don't need to follow this convention (we'll [squash them](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)). However, the PR title should be in this format. If you're not sure about the title, don't worry, we'll help you fix it. Your code is more important than conventions!
Example:
```text
🐛 fix(i18n): localise date in single taxonomy listing
^ ^-^^----^ ^--------------------------------------^
| | | |
| | | +-> Description in imperative and lowercase.
| | |
| | +-> The scope of the change.
| |
| +-------> Type: see above for the list we use.
|
+----------> A valid gitmoji.
```
## Coding Style Guidelines
While we don't enforce a strict coding style, we appreciate it when contributions follow the existing code style of the project (e.g. indenting with 4 spaces). This makes the codebase easier to read and maintain. If you are making significant changes or additions, please try to maintain consistency with the current coding patterns and idioms.
For JavaScript files, you can use [Biome](https://biomejs.dev/) to format your code.
For JavaScript files, we use [Prettier](https://prettier.io/) to format the code.
The CSS properties are sorted following [Concentric-CSS](https://github.com/brandon-rhodes/Concentric-CSS). If you use VSCode, the [Sort CSS](https://marketplace.visualstudio.com/items?itemName=piyushsarkar.sort-css-properties) extension makes this super easy.

161
README.md
View file

@ -1,12 +1,39 @@
# tabi
<p align="center">
<a href="CONTRIBUTING.md#pull-requests">
<img src="https://img.shields.io/badge/PRs-welcome-0?style=flat-square&labelColor=202b2d&color=087e96" alt="PRs welcome"></a>
<a href="https://github.com/welpo/tabi/graphs/contributors">
<img src="https://img.shields.io/github/contributors/welpo/tabi?style=flat-square&labelColor=202b2d&color=087e96" alt="Contributors"></a>
<a href="https://github.com/welpo/tabi/forks">
<img src="https://img.shields.io/github/forks/welpo/tabi?style=flat-square&labelColor=202b2d&color=087e96" alt="Forks"></a>
<a href="https://github.com/welpo/tabi/commits/main/">
<img src="https://img.shields.io/github/last-commit/welpo/tabi?style=flat-square&labelColor=202b2d&color=087e96" alt="Last commit"></a>
<br>
<a href="https://github.com/welpo/tabi/releases">
<img src="https://img.shields.io/github/v/release/welpo/tabi?style=flat-square&labelColor=202b2d&color=087e96" alt="Latest release"></a>
<a href="https://welpo.github.io/tabi/blog/mastering-tabi-settings/">
<img src="https://img.shields.io/website?url=https%3A%2F%2Fwelpo.github.io%2Ftabi&style=flat-square&label=docs&labelColor=202b2d" alt="Documentation"></a>
<a href="https://github.com/welpo/tabi/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/welpo/tabi?style=flat-square&labelColor=202b2d&color=087e96" alt="License"></a>
<a href="https://github.com/welpo/git-sumi">
<img src="https://img.shields.io/badge/clean_commits-git--sumi-0?style=flat-square&labelColor=202b2d&color=087e96" alt="Clean commits"></a>
<a href="https://isitmaintained.com/project/welpo/tabi">
<img src="https://isitmaintained.com/badge/resolution/welpo/tabi.svg" alt="Average time to resolve an issue"></a>
<a href="https://isitmaintained.com/project/welpo/tabi">
<img src="https://isitmaintained.com/badge/open/welpo/tabi.svg" alt="Percentage of issues still open"></a>
</p>
A fast, lightweight, and modern [Zola](https://www.getzola.org) theme with multi-language support. It aims to be a personal page and home to blog posts.
# 🌱 tabi
An accessible [Zola](https://www.getzola.org) theme with [search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search), [multi-language support](https://welpo.github.io/tabi/blog/faq-languages/), [optional JavaScript](https://welpo.github.io/tabi/blog/javascript/), a perfect Lighthouse score, and [comprehensive documentation](https://welpo.github.io/tabi). Crafted for personal websites and blogs.
> [!TIP]
> Want to start blogging right away? Use the [tabi-start template](https://github.com/welpo/tabi-start) to get a complete site up and running in minutes.
See a live preview (and the theme's documentation) [here](https://welpo.github.io/tabi).
Explore the [Sites Using tabi section](#sites-using-tabi) to see real-world applications.
> tabi (旅): Journey.
> tabi (旅, /<span title="/t/: 't' in 'sty'">t</span><span title="/ɐ/: a sound between 'a' in 'sofa' and 'u' in 'nut'">ɐ</span><span title="/ˈ/: primary stress mark, indicating that the following syllable is pronounced with greater emphasis">ˈ</span><span title="/b/: 'b' in 'cab'">b</span><span title="/i/: 'i' in 'fleece'">i</span>/): Journey.
![tabi](https://github.com/welpo/tabi/raw/main/light_dark_screenshot.png)
@ -17,13 +44,19 @@ tabi has a perfect score on Google's Lighthouse audit:
## Features
- [X] [Set any language as default](https://welpo.github.io/tabi/blog/faq-languages/#how-do-i-set-a-default-language-for-my-site). Set your base site to Chinese, Spanish, French, Hindi… or any [other supported language](/i18n). The theme's interface will be translated accordingly.
- [X] [Integration with remote repositories](https://welpo.github.io/tabi/mastering-tabi-settings/#git-repository-integration) on GitHub, GitLab, Gitea & Codeberg for commit history and showing the site source.
- [X] [Integration with remote repositories](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#git-repository-integration) on GitHub, GitLab, Gitea & Codeberg for commit history and showing the site source.
- [X] [Series support](https://welpo.github.io/tabi/blog/series/) for creating sequential content like tutorials, courses, and multi-part stories.
- [X] Dark and light themes. Defaults to the OS setting, with a switcher in the navigation bar.
- [X] Thorough documentation. See [Mastering tabi Settings: A Comprehensive Guide](https://welpo.github.io/tabi/blog/mastering-tabi-settings/).
- [X] Perfect Lighthouse score (Performance, Accessibility, Best Practices and SEO).
- [X] [Comprehensive multi-language support](https://welpo.github.io/tabi/blog/faq-languages/#how-does-tabi-handle-multilingual-support). Add as many languages as you wish.
- [X] Support for [comments using giscus, utterances, Hyvor Talk, or Isso](https://welpo.github.io/tabi/blog/comments/).
- [X] [Indieweb](https://indieweb.org/) ready with microformats, [hcard](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#representative-h-card) and [webmentions](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#webmentions) support.
- [X] Code syntax highlighting with colours based on [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé.
- [X] [Mermaid support](https://welpo.github.io/tabi/blog/shortcodes/#mermaid-diagrams) to create diagrams and charts with text.
- [X] [Local search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search) with an accessible, multi-lingual interface.
- [X] [Custom Twitter card](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-cards) and automatic Open Graph tags.
- [X] Anonymous [like buttons](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#iine) powered by [iine](https://iine.to).
- [X] [KaTeX](https://katex.org/) support for mathematical notation.
- [X] [Stylized and human readable Atom feed](https://welpo.github.io/tabi/atom.xml).
- [X] [Stylized and human readable sitemap](https://welpo.github.io/tabi/sitemap.xml).
@ -35,30 +68,23 @@ tabi has a perfect score on Google's Lighthouse audit:
- [X] [Quick navigation buttons](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#quick-navigation-buttons).
- [X] [Custom copyright notice](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#copyright).
- [X] [Custom canonical URLs](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#canonical-url).
- [X] [Customizable skins](https://welpo.github.io/tabi/blog/customise-tabi/).
- [X] [Custom shortcodes](https://welpo.github.io/tabi/blog/shortcodes/).
- [X] [Footnote backlinks](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#footnote-backlinks).
- [X] [Customizable skins](https://welpo.github.io/tabi/blog/customise-tabi/).
- [X] [Social media cards](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-cards).
- [X] Responsive design.
- [X] [Projects page](https://welpo.github.io/tabi/projects/).
- [X] [Archive page](https://welpo.github.io/tabi/archive/).
- [X] [Pinned posts](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#pinning-posts).
- [X] [Social links](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-icons).
- [X] [Tags](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#tags).
## Quick start
Once you have installed Zola 0.17.0 or newer:
```bash
git clone https://github.com/welpo/tabi.git
cd tabi
zola serve
```
Open http://127.0.0.1:1111 in the browser.
## Installation
> [!NOTE]
> The fastest way to create a new site is to use the [tabi-start template](https://github.com/welpo/tabi-start). This gives you a complete blog setup with all the essential configuration ready to go.
### Manual installation
To add tabi to you existing Zola site:
0. Initialize a Git repository in your project directory (if you haven't already):
@ -93,24 +119,50 @@ theme = "tabi"
title = "Your Site Title"
```
4. Create a `content/_index.md` file with the following content:
4. Configure code block highlighting in your `config.toml`:
```
+++
title = "Home"
paginate_by = 5 # Set the number of posts per page
template = "index.html"
+++
```toml
[markdown]
highlight_code = true
highlight_theme = "css"
```
If you want to serve your blog posts from a different path, such as `blog/`, add a `section_path` in the `[extra]` section of `content/_index.md` (this file will need pagination):
5. Create a `content/_index.md` file. This file controls how your home page looks and behaves. Choose one of the following options:
```
[extra]
section_path = "blog/_index.md"
```
**Option A: Serve posts from `/`**:
5. If you want an introduction section (see screenshot above), add these lines to `content/_index.md`:
```
+++
title = "Home"
paginate_by = 5 # Show 5 posts per page.
+++
```
- This will display posts in `content/` with pagination.
**Option B: Serve posts from a different path (e.g., `blog/`)**:
```
+++
title = "Home"
# Note we're not setting `paginate_by` here.
[extra]
section_path = "blog/_index.md" # Where to find your posts.
max_posts = 5 # Show 5 posts on the home page.
+++
```
- This will display the latest 5 posts from the `blog/` section.
- Do not set `paginate_by` if you choose this option.
- Use the full path to the section's `_index.md` file. Using `section_path = "blog/"` will not work.
> [!WARNING]
> Do not set both `paginate_by` and `section_path` in `content/_index.md`.
>
> These settings are mutually exclusive and using both may result in no posts being displayed.
6. If you want an introduction section (see screenshot above), add these lines to `content/_index.md`:
```
[extra]
@ -119,7 +171,7 @@ header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Your Nam
The content outside the front matter will be rendered between the header title and the posts listing. In the screenshot above, it's the text that reads "tabi is a fast, lightweight, and modern Zola theme…".
6. If you want a multilingual site, you will need to set up each language. In `config.toml`, set the title and taxonomies for each language, like:
7. If you want a multilingual site, you will need to set up each language. In `config.toml`, set the title and taxonomies for each language, like:
```toml
[languages.es]
@ -135,26 +187,57 @@ This configuration allows the language switcher to take the user to the translat
To learn more about multilingual support, see the [Frequently Asked Questions](https://welpo.github.io/tabi/blog/faq-languages/).
## Sites Using tabi
### Updating tabi
If you added the theme as a git submodule, run:
```bash
git submodule update --remote themes/tabi
```
If you cloned it:
```bash
cd themes/tabi
git pull
```
## Sites using tabi
| Website | Creator | Description | Site Source |
| - | - | - | - |
| [osc.garden](https://osc.garden) | Óscar Fernández ([welpo](https://github.com/welpo)) | Data science, psychology, and Zola | [Source](https://github.com/welpo/osc.garden) |
| [sandip.live](https://sandip.live) | Sandip G ([sandman](https://github.com/sandman)) | Startups, tech and the good life | [Source](https://github.com/sandman/sandman.github.io) |
| [seadve.github.io](https://seadve.github.io/) | Dave Patrick Caberto ([SeaDve](https://github.com/SeaDve/)) | Personal blog and portfolio with custom CSS | [Source](https://github.com/SeaDve/seadve.github.io) |
| [donovan.is](https://donovan.is) | [Donovan Glover](https://github.com/donovanglover) | Linux, Rust, and Full Stack Web Development | [Source](https://github.com/donovanglover/donovan.is) |
| [mikufan.page](https://mikufan.page) | [Nadia](https://github.com/nyadiia) | Personal blog | [Source](https://github.com/nyadiia/mikufan.page) |
| [tim-boettcher.online](https://tim-boettcher.online/) | [Tim Böttcher](https://codeberg.org/Tim-Boettcher/) | Insights and ramblings of a deafblind programmer | [Source](https://codeberg.org/Tim-Boettcher/tim-boettcher-online/) |
| [www.richtman.au](https://www.richtman.au) | [Ariel Richtman](https://github.com/arichtman) | Personal tech blog | [Source](https://github.com/arichtman/www.richtman.au) |
| [Ponderosa Games](https://ponderosagames.com/) | John Burak ([JVimes](https://github.com/jvimes)) | A friendly indie game company | &mdash; |
| [jmbhughes.com](https://jmbhughes.com/) | Marcus Hughes ([jmbhughes](https://github.com/jmbhughes)) | Personal blog | [Source](https://github.com/jmbhughes/jmbhughes.github.io) |
| [szabolcs.me](https://szabolcs.me) | Szabolcs Fazekas ([szabolcsf](https://github.com/szabolcsf)) | Personal blog | [Source](https://github.com/szabolcsf/szabolcs.me) |
| [Nizzlay](https://nizzlay.com) | Niels Gouman ([Nizzlay](https://github.com/Nizzlay)) | Personal blog | [Source](https://github.com/Nizzlay/nizzlay.com) |
| [ZzMzaw's blog](https://zzmzaw.github.io/) | ZzMzaw ([ZzMzaw](https://github.com/ZzMzaw)) | Personal blog | [Source](https://github.com/ZzMzaw/zzmzaw.github.io) |
| [idle-ti.me](https://idle-ti.me/) | Jérôme Ramette ([be-next](https://github.com/be-next)) | Personal blog | [Source](https://github.com/be-next/idle-ti.me) |
| [tzinm.me](https://tzinm.me/) | [Tzinm](https://github.com/tzinm) | Personal blog | [Source](https://codeberg.org/tzinm/blog) |
| [b1n.io](https://b1n.io) | [b1nhack](https://github.com/b1nhack) | Linux kernel vulnerability researcher | [Source](https://github.com/b1nhack/blog) |
| [posixlycorrect.com](https://posixlycorrect.com/) | [Fabian Montero](https://git.posixlycorrect.com/fabian) | Personal homepage | [Source](https://git.posixlycorrect.com/fabian/homepage) |
Using tabi? Feel free to create a PR and add your site to this list.
## Inspiration
This theme was inspired by:
- [shadharon](https://github.com/syedzayyan/shadharon) — tabi started as a fork of [syedzayyan](https://github.com/syedzayyan)'s theme;
- [tailwind-nextjs-starter-blog](https://github.com/timlrx/tailwind-nextjs-starter-blog);
- [abridge](https://github.com/Jieiku/abridge);
- [internetVin's blog](https://internetvin.ghost.io).
- [shadharon](https://github.com/syedzayyan/shadharon) — tabi started as a fork of [syedzayyan](https://github.com/syedzayyan)'s theme
- [tailwind-nextjs-starter-blog](https://github.com/timlrx/tailwind-nextjs-starter-blog)
- [abridge](https://github.com/Jieiku/abridge)
## Support
Something not working? Have an idea? Let us know!
- Questions? → [Start a discussion](https://github.com/welpo/tabi/discussions)
- Found a bug? → [Report it here](https://github.com/welpo/tabi/issues/new?&labels=bug&template=2_bug_report.yml)
- Feature request? → [Tell us more!](https://github.com/welpo/tabi/issues/new?&labels=feature&template=3_feature_request.yml)
## Contributing

148
cliff.toml Normal file
View file

@ -0,0 +1,148 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.
[remote.github]
owner = "welpo"
repo = "tabi"
[changelog]
# changelog header
header = """
# Changelog
Welcome to the changelog for tabi. This document aims to provide a comprehensive list of all notable changes made to the project, organised chronologically by release version.
We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR.MINOR.PATCH. Major version changes involve significant (breaking) changes, minor versions introduce features and improvements in a backward compatible manner, and patch versions are for bug fixes and minor tweaks.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
{% if version %}\
{% if previous.version %}\
## [{{ version | trim_start_matches(pat="v") }}]({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif %}\
{% else %}\
## unreleased
{% endif %}\
{% macro commit(commit, in_breaking_section=false) -%}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}{% if commit.breaking and not in_breaking_section %}[**BREAKING**] {% endif %}\
{{ commit.message | upper_first }}\
{% if not commit.remote.pr_number %} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }})){%- endif -%}{% if commit.remote.username %} by @{{ commit.remote.username }} \
{%- set co_authors = commit.footers | filter(attribute="token", value="Co-authored-by") | map(attribute="value") -%}
{%- set number_of_co_authors = co_authors | length -%}
{%- for co_author in co_authors -%}
{%- if not loop.last %}, {% else %} and {% endif %}@{{ co_author | split(pat=" <") | first | trim }}
{%- endfor -%}
{%- endif -%}
{% endmacro -%}
{%- set breaking_header_shown = false -%}
{% for commit in commits -%}
{% if commit.breaking and not breaking_header_shown -%}
{% raw %}\n### 💥 BREAKING CHANGES 💥\n{% endraw %}
{%- set_global breaking_header_shown = true -%}
{%- endif -%}
{%- if commit.breaking %}
{{ self::commit(commit=commit, in_breaking_section=true) -}}
{% endif -%}
{%- endfor -%}
{%- if breaking_header_shown == true -%}
{% raw %}\n{% endraw %}\
{%- endif -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits
| filter(attribute="scope")
| sort(attribute="scope") %}
{{ self::commit(commit=commit) }}
{%- endfor -%}
{% raw %}\n{% endraw %}\
{%- for commit in commits %}
{%- if not commit.scope -%}
{{ self::commit(commit=commit) }}
{% endif -%}
{% endfor -%}
{% endfor %}
{%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 -%}
{% raw %}\n{% endraw %}### 👥 New contributors
{% raw -%}\n{% endraw -%}
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
🫶 @{{ contributor.username }} made their first contribution
{%- if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
{%- endif %}
{% endfor %}
{%- endif %}
{% raw -%}\n{% endraw -%}
"""
# remove the leading and trailing whitespace from the template
trim = true
# changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# postprocessors
postprocessors = [
# { pattern = " @([a-zA-Z0-9](?:[a-zA-Z0-9]+-?)*[a-zA-Z0-9])", replace = " [@$1](https://github.com/$1)"}, # add link to GitHub usernames (done in release script instead)
]
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# Replace the issue number with the link.
{ pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](https://github.com/welpo/tabi/issues/${1}))" },
# Remove trailing whitespace.
{ pattern = ' +$', replace = "" },
# Replace multiple spaces with a single space.
{ pattern = ' +', replace = " " },
# Remove gitmoji, both actual UTF emoji and :emoji:
{ pattern = ' *(:\w+:|[\p{Emoji_Presentation}\p{Extended_Pictographic}](?:\u{FE0F})?\u{200D}?) *', replace = "" },
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->✨ Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug fixes" },
{ message = "^style", group = "<!-- 2 -->💄 Styling" },
{ message = "^doc", group = "<!-- 3 -->📝 Documentation" },
{ message = "^refactor", group = "<!-- 4 -->♻️ Refactor" },
{ message = "^test", group = "<!-- 5 -->✅ Testing" },
{ message = "^misc", group = "<!-- 6 -->🔧 Miscellaneous tasks" },
{ message = "^deprecate", group = "<!-- 7 -->🗑️️ Deprecations" },
{ message = "^chore", skip = true },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = true
# filter out the commits that are not matched by commit parsers
filter_commits = true
# regex for matching git tags
tag_pattern = "v[0-9].*"
# regex for skipping tags
skip_tags = "v0.1.0-beta.1"
# regex for ignoring tags
ignore_tags = ""
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "newest"
# limit the number of commits included in the changelog.
# limit_commits = 42

View file

@ -1,13 +1,14 @@
base_url = "https://welpo.github.io/tabi"
title = "~/tabi"
description = "tabi is a fast, lightweight, and modern Zola theme with multi-language support, optional JavaScript, and a perfect Lighthouse score."
description = "tabi is an accessible Zola theme with search, multi-language support, optional JavaScript, a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs."
author = "welpo"
generate_feed = true
generate_feeds = true
compile_sass = true
minify_html = true
build_search_index = true
# To translate the entire theme, there must be a file with the same ISO 639-1
# (or IETF BCP 47) Code in the `i18n` folder of your site or the tabi theme
# To translate the entire theme, there must be a file with the same language code
# in the `i18n` folder of your site or the tabi theme.
# For example, "i18n/fr.toml" for French or "i18n/zh-Hans.toml" for Simplified Chinese.
# Otherwise the theme will be in English.
# See https://welpo.github.io/tabi/blog/faq-languages/ for more details.
@ -15,40 +16,81 @@ default_language = "en"
taxonomies = [{name = "tags", feed = true}]
[search]
# Whether to include the title of the page/section in the index.
include_title = true
# Whether to include the description of the page/section in the index.
include_description = true
# Whether to include the path of the page/section in the index.
include_path = true
# Whether to include the rendered content of the page/section in the index.
include_content = true
# At which character to truncate the content to. Useful if you have a lot of pages and the index would
# become too big to load on the site. Defaults to not being set.
# truncate_content_length = 100
# Whether to produce the search index as a javascript file or as a JSON file.
# Accepted value "elasticlunr_javascript" or "elasticlunr_json".
index_format = "elasticlunr_json"
[markdown]
highlight_code = true
bottom_footnotes = true
# To use a Zola built-in theme, CSP needs to allow unsafe-inline for style-src.
highlight_theme = "css"
smart_punctuation = true
# Set to 'external' to add an indicator next to external links.
external_links_class = "external"
[link_checker]
internal_level = "warn"
skip_prefixes = [
"https://www.vultr.com/",
]
skip_anchor_prefixes = [
"https://github.com/",
]
[languages.es]
title = "~/tabi"
description = "tabi es un tema de Zola rápido, liviano y moderno con JavaScript opcional y una puntuación perfecta en Lighthouse."
generate_feed = true
compile_sass = true
minify_html = true
description = "tabi es un tema accesible para Zola con búsqueda, soporte multilingüe, JavaScript opcional, una puntuación perfecta en Lighthouse y documentación exhaustiva. Diseñado para sitios web y blogs personales."
generate_feeds = true
taxonomies = [{name = "tags", feed = true}]
build_search_index = true
[languages.ca]
title = "~/tabi"
description = "tabi és un tema de Zola ràpid, lleuger i modern amb JavaScript opcional i una puntuació perfecta a Lighthouse."
generate_feed = true
compile_sass = true
minify_html = true
description = "tabi és un tema accessible per a Zola amb cerca, suport multilingüe, JavaScript opcional, una puntuació perfecta a Lighthouse i documentació exhaustiva. Dissenyat per a llocs web i blogs personals."
generate_feeds = true
taxonomies = [{name = "tags", feed = true}]
[languages.ar]
title = "~/تابي"
description = "تابي هو قالب Zola سريع وحديث مع دعم متعدد اللغات و JavaScript اختياري ودرجة Lighthouse مثالية."
generate_feeds = true
taxonomies = [{name = "tags", feed = true}]
build_search_index = false
[extra]
# Check out the documentation (or the comments below) to learn how to customise tabi:
# https://welpo.github.io/tabi/blog/mastering-tabi-settings/
# Search index format.
# For Zola 0.17.X users only.
# This MUST MATCH the setting in [search].index_format.
# Example: If [search].index_format is "elasticlunr_javascript", set:
# index_format = "elasticlunr_javascript"
# index_format = ""
# Use sans-serif font everywhere.
# By default, the serif font is only used in articles.
override_serif_with_sans = false
# Enable JavaScript theme toggler to allow users to switch between dark/light mode.
# If disabled, your site will only use the theme specified in the `default_theme` variable.
# If disabled, your site will use the theme specified in the `default_theme` variable.
theme_switcher = true
# This setting determines the default theme on load ("light" or "dark").
# To default to the user's OS-level theme, leave it empty or unset.
# To follow the user's OS theme, leave it empty or unset.
default_theme = ""
# Choose the colourscheme (skin) for the theme. Default is "teal".
@ -66,6 +108,9 @@ skin = ""
browser_theme_color = "#087e96"
# browser_theme_color = ["#ffffff", "#000000"] # Example of light/dark colours.
# For multilingual sites: show current language code on the language switcher.
show_selected_language_code_in_language_switcher = false
# List additional stylesheets to load site-wide.
# These stylesheets should be located in your site's `static` directory.
# Example: stylesheets = ["extra1.css", "path/extra2.css"]
@ -93,14 +138,57 @@ show_remote_changes = true # Defaults to true.
# Show a link to the repository of the site, right next to the "Powered by Zola & tabi" text.
show_remote_source = true # Defaults to true.
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
# Add a "copy" button to code blocks (loads ~700 bytes of JavaScript).
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
copy_button = true
# Make code block names clickable if they are URLs (loads ~400 bytes of JavaScript).
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
code_block_name_links = false
# Force left-to-right (LTR) direction for code blocks.
# Set to false to allow code to follow the document's natural direction.
# Can be set at page or section levels. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
force_codeblock_ltr = true
# Show the author(s) of a page.
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
show_author = false
# Show the reading time of a page.
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
show_reading_time = true
# Show the date of a page below its title.
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
show_date = true
# Determines how dates are displayed in the post listing (e.g. front page or /blog). Options:
# "date" - Show only the original date of the post (default if unset).
# "updated" - Show only the last updated date of the post. If there is no last updated date, it shows the original date.
# "both" - Show both the original date and the last updated date.
post_listing_date = "date"
# Enable iine like buttons on all posts: https://iine.to/
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
iine = true
iine_icon = "thumbs_up" # See https://iine.to/#customise
# Unify like counts across all language versions of the same page.
# When enabled, likes on /es/blog/hello/ will count towards /blog/hello/ (default language).
iine_unified_languages = true
# Show "Jump to posts" link next to series' title.
# By default, the link appears automatically when a series description exceeds 2000 characters.
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
# show_jump_to_posts = true
# Determines if indexes should be increasing (false) or decreasing (true) in series' posts list.
# It has only effect if the section uses indexes metadata (which is only the case for series as of now).
# Can be set at section levels, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
post_listing_index_reversed = false # Defaults to false.
# DEPRECATED!
# Use Zola's built-in `bottom_footnotes = true` in the [markdown] section instead. (Available since v0.19.0)
# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts).
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
footnote_backlinks = false
@ -109,6 +197,30 @@ footnote_backlinks = false
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
katex = false
# Enable Mermaid diagrams for all posts.
# Loads ~2.5MB of JavaScript.
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
mermaid = false
# Serve Mermaid JavaScript locally. Version bundled with tabi.
# If set to false, it will load the latest version from JSDelivr.
# Only relevant when `mermaid = true`.
serve_local_mermaid = true
# Show links to previous and next articles at the bottom of posts.
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
show_previous_next_article_links = false
# Invert order of the links to previous and next articles at the bottom of posts.
# By default, next articles are on the left side of the page and previous articles are on the right side.
# To reverse the order (next articles on the right and previous articles on the left), set it to true.
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
invert_previous_next_article_links = false
# Whether the navigation for previous/next article should match the full width of the site (same as the navigation bar at the top) or the article width.
# To match the navigation bar at the top, set it to true.
previous_next_article_links_full_width = true
# Quick navigation buttons.
# Adds "go up" and "go to comments" buttons on the bottom right (hidden for mobile).
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
@ -126,9 +238,36 @@ long_date_format = "%d %B %Y"
# Default is "6th July 2049" in English and "%-d %B %Y" in other languages.
short_date_format = ""
# Date format used for the archive page.
# Default is "06 July" in English and "%d %b" in other languages.
archive_date_format = ""
# Per-language date format overrides.
# Examples: Spanish uses "3 de febrero de 2024", German uses "3. Februar 2024"
date_formats = [
{ lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y" },
{ lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" },
]
# Custom separator used in title tag and posts metadata (between date, time to read, and tags).
separator = "•"
# Use a shorter layout for All tags listing.
# Default: tag_name n post[s]
# Compact: tag_name^n (superscript number)
compact_tags = false
# How tags are sorted in a Tags listing based on templates/tags/list.html.
# "name" for alphabetical, "frequency" for descending count of posts.
# Default: "name".
tag_sorting = "name"
# Show clickable tags above cards.html template (e.g. projects/) to filter the displayed items.
# Loads JS to filter. If JS is disabled, the buttons are links to the tag's page.
# Can be set at the section or config.toml level, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
# Default: true
enable_cards_tag_filtering = true
# Invert the order of the site title and page title in the browser tab.
# Example: true => "Blog • ~/tabi", false => "~/tabi • Blog"
invert_title_order = false
@ -144,7 +283,7 @@ favicon_emoji = "🌱"
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
# Learn how to create these images in batch and automatically:
# https://osc.garden/blog/automating-social-media-cards-zola/
social_media_card = "social_cards/index.jpg"
social_media_card = "index.jpg"
menu = [
{ name = "blog", url = "blog", trailing_slash = true },
@ -154,6 +293,7 @@ menu = [
]
# The RSS icon will be shown if (1) it's enabled and (2) the following variable is set to true.
# Note for Zola 0.19.X users: when `feed_filenames` has two filenames, only the first one will be linked in the footer.
feed_icon = true
# Show the full post content in the Atom feed.
@ -168,7 +308,9 @@ email = "dGFiaUBvc2MuZ2FyZGVu"
# Decoding requires ~400 bytes of JavaScript. If JS is disabled, the email won't be displayed.
encode_plaintext_email = true # Setting is ignored if email is already encoded.
# The icons available can be found in "social_icons" in the "static" folder.
# Social media links for the footer.
# Built-in icons: https://github.com/welpo/tabi/tree/main/static/social_icons
# To use a custom icon, add it to your site's `static/social_icons` directory.
socials = [
{ name = "github", url = "https://github.com/welpo/", icon = "github" },
{ name = "soundcloud", url = "https://soundcloud.com/oskerwyld", icon = "soundcloud" },
@ -177,6 +319,11 @@ socials = [
{ name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" },
]
# Fediverse profile.
# Adds metadata to feature the author's profile in Mastodon link previews.
# Example: for @username@example.com, use:
# fediverse_creator = { handle = "username", domain = "example.com" }
# Extra menu to show on the footer, below socials section.
footer_menu = [
{url = "about", name = "about", trailing_slash = true},
@ -204,18 +351,28 @@ footer_menu = [
# Default directive is self.
# Default config, allows for https remote images and embedding YouTube and Vimeo content.
# This configuration (along with the right webserver settings) gets an A+ in Mozilla's Observatory: https://observatory.mozilla.org
# Note: to use a Zola built-in syntax highlighting theme, allow unsafe-inline for style-src.
allowed_domains = [
{ directive = "font-src", domains = ["'self'", "data:"] },
{ directive = "img-src", domains = ["'self'", "https://*", "data:"] },
{ directive = "media-src", domains = ["'self'", "https://cdn.jsdelivr.net/"] },
{ directive = "script-src", domains = ["'self'"] },
{ directive = "style-src", domains = ["'self'"] },
{ directive = "frame-src", domains = ["player.vimeo.com", "https://www.youtube-nocookie.com"] },
]
# Custom subset of characters for the header.
# If set to true, the `static/custom_subset.css` file will be loaded first.
# This avoids a flashing text issue in Firefox.
# Please see https://welpo.github.io/tabi/blog/custom-font-subset/ to learn how to create this file.
# Enable the CSP directives configured (or default).
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
enable_csp = true
# Font subsetting configuration.
# This feature helps prevent text flashing in Firefox when using custom fonts.
# See: https://welpo.github.io/tabi/blog/custom-font-subset/
# Enable or disable font subsetting completely, both built-in and custom subsets.
enable_subset = true
# Use a custom subset of characters for the header.
# If true, tabi will load the `static/custom_subset.css` file.
# If false, tabi will use the default language-specific subset (English or Spanish).
custom_subset = true
[extra.analytics]
@ -227,7 +384,7 @@ service = "goatcounter"
# For GoatCounter, this is the code you choose during signup.
# For Umami, this is the website ID.
# For Plausible, this is the domain name (e.g. "example.com").
# Note: Leave this field empty if you're self-hosting.
# Note: Leave this field empty if you're self-hosting GoatCounter.
# id = "yourID"
# Optional: Specify the URL for self-hosted analytics instances.
@ -237,6 +394,9 @@ service = "goatcounter"
# Leave this field empty if you're using the service's default hosting.
self_hosted_url = "https://tabi-stats.osc.garden"
# Optional: For Umami, enable this option to respect users' Do Not Track (DNT) settings. The default is true.
do_not_track = true
# giscus support for comments. https://giscus.app
# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup
[extra.giscus]
@ -292,3 +452,69 @@ avatar = true
voting = true
page_author_hashes = "" # hash (or list of hashes) of the author.
lazy_loading = true # Loads when the comments are in the viewport (using the Intersection Observer API).
[extra.webmentions]
# To disable for a specific section or page, set webmentions = false in that page/section's front matter's [extra] section.
enable = false
# Specify the domain registered with webmention.io.
domain = ""
# 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 = 30
# 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"
# h-card configuration
# Will identify you on the indieweb (see https://microformats.org/wiki/h-card)
[extra.hcard]
# Enable home page h-card.
# enable = true
# Add your email to the card if extra.email is set and not encoded.
# with_mail = true
# Add your social links ('socials' config) to the card.
# with_social_links = true
# Homepage url. Defaults to the value of 'base_url'.
# homepage = "https://myhomepage.net"
# avatar = "img/profile.webp"
# Display name, default to the value of 'author'.
# full_name = "John Doe"
# Small bio, as shown on social media profiles.
# biography = "Fond of the indieweb"
#
# You can add any property from https://microformats.org/wiki/h-card#Properties
# Make sure to replace all '-' characters by '_'
# Examples:
# p_nickname = "nickname"
# p_locality = "Bordeaux"
# p_country_name = "France"

18
content/_index.ar.md Normal file
View file

@ -0,0 +1,18 @@
+++
title = "أخر التدوينات"
sort_by = "date"
template = "section.html"
[extra]
header = {title = "اهلاً انا تابي~", img = "img/main.webp", img_alt = "أوسكار فرنانديز, كاتب السمة" }
section_path = "blog/_index.ar.md"
max_posts = 4
projects_path = "projects/_index.ar.md"
max_projects = 3
show_projects_first = false
social_media_card = "ar.jpg"
+++
تابي هو قالب Zola سريع وعصري. يهدف ليكون صفحة ومدونة شخصية. يتميز بتقييم مثالي في Lighthouse، وتصميم متجاوب، وسمات داكنة وفاتحة، وشِفرات قصيرة مخصصة، والعديد من المميزات الأخرى.
> ملاحظة: هذه الصفحة هي عرض توضيحي لدعم اللغة العربية في تابي. للحصول على التوثيق الكامل، يرجى الرجوع إلى [النسخة الإنجليزية](@/_index.md).

View file

@ -1,14 +1,15 @@
+++
path = "/"
title = "Publicacions recents"
sort_by = "date"
template = "section.html"
[extra]
header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, l'autor de tabi" }
section_path = "blog/_index.ca.md"
max_posts = 4
social_media_card = "social_cards/ca.jpg"
projects_path = "projects/_index.ca.md"
max_projects = 3
show_projects_first = false
social_media_card = "ca.jpg"
+++
tabi és un tema de [Zola](https://www.getzola.org) ràpid, lleuger i modern. Té com a objectiu ser una pàgina personal i llar d'entrades de blog. Compta amb una puntuació perfecta de Lighthouse, disseny responsive, tema fosc i clar, shortcodes personalitzats i molt més.
tabi és un tema accessible per a Zola amb [cerca](@/blog/mastering-tabi-settings/index.ca.md#cerca), [suport multilingüe](@/blog/faq-languages/index.ca.md), [JavaScript opcional](@/blog/javascript/index.ca.md), una puntuació perfecta a Lighthouse i documentació exhaustiva. Dissenyat per a llocs web i blogs personals.

View file

@ -1,14 +1,15 @@
+++
path = "/"
title = "Publicaciones recientes"
sort_by = "date"
template = "section.html"
[extra]
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, el autor de tabi" }
section_path = "blog/_index.es.md"
max_posts = 4
social_media_card = "social_cards/es.jpg"
projects_path = "projects/_index.es.md"
max_projects = 3
show_projects_first = false
social_media_card = "es.jpg"
+++
tabi es un tema de [Zola](https://www.getzola.org) rápido, ligero y moderno. Su objetivo es ser una página personal y hogar para publicaciones de blogs. Cuenta con una puntuación perfecta en Lighthouse, diseño responsive, tema oscuro y claro, shortcodes personalizados y mucho más.
tabi es un tema accesible para [Zola](https://www.getzola.org) con [búsqueda](@/blog/mastering-tabi-settings/index.es.md#busqueda), [soporte multilingüe](@/blog/faq-languages/index.es.md), [JavaScript opcional](@/blog/javascript/index.es.md), una puntuación perfecta en Lighthouse y documentación exhaustiva. Diseñado para sitios web y blogs personales.

View file

@ -1,14 +1,15 @@
+++
path = "/"
title = "Latest posts"
sort_by = "date"
template = "section.html"
[extra]
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, the theme's author" }
section_path = "blog/_index.md"
max_posts = 4
social_media_card = "social_cards/index.jpg"
projects_path = "projects/_index.md"
max_projects = 3
show_projects_first = false
social_media_card = "index.jpg"
+++
tabi is a fast, lightweight, and modern [Zola](https://www.getzola.org) theme. It aims to be a personal page and home to blog posts. It features a perfect Lighthouse score, responsive design, dark and light themes, custom shortcodes, and much more.
tabi is an accessible [Zola](https://www.getzola.org) theme with [search](@/blog/mastering-tabi-settings/index.md#search), [multi-language support](@/blog/faq-languages/index.md), [optional JavaScript](@/blog/javascript/index.md), a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs.

BIN
content/ar.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View file

@ -0,0 +1,4 @@
+++
title = "الأرشيف"
template = "archive.html"
+++

View file

@ -3,5 +3,5 @@ title = "Arxiu"
template = "archive.html"
[extra]
social_media_card = "archive/social_cards/ca_archive.jpg"
social_media_card = "ca_archive.jpg"
+++

View file

@ -3,5 +3,5 @@ title = "Archivo"
template = "archive.html"
[extra]
social_media_card = "archive/social_cards/es_archive.jpg"
social_media_card = "es_archive.jpg"
+++

View file

@ -3,5 +3,5 @@ title = "Archive"
template = "archive.html"
[extra]
social_media_card = "archive/social_cards/archive.jpg"
social_media_card = "archive.jpg"
+++

View file

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before After
Before After

10
content/blog/_index.ar.md Normal file
View file

@ -0,0 +1,10 @@
+++
paginate_by = 5
title = "التدوينات"
sort_by = "date"
template = "section.html"
insert_anchor_links = "right"
[extra]
show_previous_next_article_links = true
+++

View file

@ -1,11 +1,10 @@
+++
paginate_by = 5
path = "/blog"
title = "Blog"
sort_by = "date"
template = "section.html"
insert_anchor_links = "left"
[extra]
social_media_card = "blog/social_cards/ca_blog.jpg"
social_media_card = "ca_blog.jpg"
show_previous_next_article_links = true
+++

View file

@ -1,11 +1,10 @@
+++
paginate_by = 5
path = "/blog"
title = "Blog"
sort_by = "date"
template = "section.html"
insert_anchor_links = "left"
[extra]
social_media_card = "blog/social_cards/es_blog.jpg"
social_media_card = "es_blog.jpg"
show_previous_next_article_links = true
+++

View file

@ -1,11 +1,10 @@
+++
paginate_by = 5
path = "/blog"
title = "Blog"
sort_by = "date"
template = "section.html"
insert_anchor_links = "left"
[extra]
social_media_card = "blog/social_cards/blog.jpg"
social_media_card = "blog.jpg"
show_previous_next_article_links = true
+++

View file

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Before After
Before After

View file

@ -1,7 +1,7 @@
+++
title = "Optimitza la càrrega amb un subconjunt de font personalitzat"
date = 2023-04-29
updated = 2023-07-08
updated = 2025-01-12
description = "Aprèn com crear un subconjunt personalitzat que només inclogui els glifs necessaris."
[taxonomies]
@ -21,7 +21,11 @@ Per solucionar això, tabi carrega un subconjunt de glifs per a l'encapçalament
Per defecte, tabi inclou fitxers de subconjunts per a caràcters en anglès i espanyol (amb alguns símbols). Aquests fitxers es carreguen quan la pàgina o el lloc web de Zola està en aquest idioma.
Per a una optimització addicional, pots crear un subconjunt de fonts personalitzat que només inclogui els caràcters utilitzats en el teu encapçalament.
{% admonition(type="tip") %}
Si estàs fent servir una font personalitzada, pots crear el teu propi subconjunt (segueix llegint) o desactivar completament els subconjunts predeterminats amb `enable_subset = false` a `config.toml`.
{% end %}
Per a una optimització addicional, a continuació t'expliquem com crear un subconjunt de fonts personalitzat que només inclogui els caràcters utilitzats en el teu encapçalament.
## Requisits

View file

@ -1,7 +1,7 @@
+++
title = "Optimiza la carga con un subconjunto de fuente personalizado"
date = 2023-04-29
updated = 2023-07-08
updated = 2025-01-12
description = "Aprende cómo crear un subconjunto personalizado que solo incluya los glifos necesarios."
[taxonomies]
@ -21,7 +21,11 @@ Para solucionar esto, tabi carga un subconjunto de glifos para el encabezado. Da
Por defecto, tabi incluye archivos de subconjuntos para caracteres en inglés y español (con algunos símbolos). Estos archivos se cargan cuando la página o el sitio de Zola está en ese idioma.
Para una optimización adicional, puedes crear un subconjunto de fuentes personalizado que solo incluya los caracteres utilizados en tu encabezado.
{% admonition(type="tip") %}
Si estás usando una fuente personalizada, puedes crear tu propio subconjunto (ver más abajo) o desactivar completamente los subconjuntos predeterminados con `enable_subset = false` en tu `config.toml`.
{% end %}
Para una optimización adicional, a continuación verás cómo crear un subconjunto de fuentes personalizado que solo incluya los caracteres utilizados en tu encabezado.
## Requisitos

View file

@ -1,7 +1,7 @@
+++
title = "Optimise loading times with a custom font subset"
date = 2023-04-29
updated = 2023-07-08
updated = 2025-01-12
description = "Learn how to create a custom subset that only includes the necessary glyphs."
[taxonomies]
@ -21,7 +21,11 @@ To fix this, tabi loads a subset of glyphs for the header. Since this (slightly)
By default, there are subset files for English and Spanish characters (with a few symbols). These files are loaded when the Zola page/site is set to that language.
For further optimisation, you can create a custom font subset that only includes the characters used in your header.
{% admonition(type="tip") %}
If you're using a custom font, either create your custom subset (see below) or disable the built-in subsets completely with `enable_subset = false` in your `config.toml`.
{% end %}
Here's how you can create a custom font subset that only includes the characters used in your header, for maximum efficiency.
## Requirements

View file

@ -1,7 +1,7 @@
+++
title = "Personalitza el color de tabi i el tema per defecte"
date = 2023-08-09
updated = 2023-11-24
updated = 2024-09-12
description = "Aprèn a personalitzar tabi fent servir skins i establint un tema per defecte, aconseguint un aspecte únic."
[taxonomies]
@ -19,6 +19,8 @@ tabi pot ser personalitzat de dues maneres: establint el tema per defecte (fosc
Utilitza `default_theme = "dark"` per establir el tema fosc com a predeterminat, o `default_theme = "light"` per establir el tema clar com a predeterminat.
Establir `default_theme = ""` (o comentar la variable) seguirà la preferència del sistema de l'usuari (mode clar o fosc).
Per configurar permanentment el teu lloc en el tema fosc o clar, necessites desactivar el `theme_switcher` a `config.toml` i establir el teu tema preferit (`light` o `dark`) a `default_theme`.
Per exemple, per tenir un tema fosc permanent:
@ -167,12 +169,33 @@ Pots guardar la teva nova skin en qualsevol d'aquests dos directoris:
Crea un nou arxiu `.scss` (per exemple, `la_teva_skin.scss`) a la ubicació que prefereixis. Aquest arxiu ha de contenir aquestes dues variables (aquesta és la skin predeterminada, "teal"):
```scss
// This defines theme-specific variables.
@mixin theme-variables($theme) {
@if $theme =='light' {
// Light theme colours.
--primary-color: #087e96; // Contrast ratio: 4.73:1
}
@else if $theme == 'dark' {
// Dark theme colours.
--primary-color: #91e0ee; // Contrast ratio: 11.06:1
}
}
// Apply light theme variables by default.
:root {
--primary-color: #087e96;
@include theme-variables('light');
}
[data-theme='dark'] {
--primary-color: #91e0ee;
@include theme-variables('dark');
}
// Apply dark theme variables when user's system prefers dark mode
// and the theme is not explicitly set to light.
@media (prefers-color-scheme: dark) {
:root:not([data-theme='light']) {
@include theme-variables('dark');
}
}
```

View file

@ -1,7 +1,7 @@
+++
title = "Personaliza el color de tabi y el tema predeterminado"
date = 2023-08-09
updated = 2023-11-24
updated = 2024-09-12
description = "Aprende a personalizar tabi usando skins y estableciendo un tema predeterminado, haciendo que tu sitio sea único."
[taxonomies]
@ -19,6 +19,8 @@ tabi puede ser personalizado de dos maneras: estableciendo el tema predeterminad
Usa `default_theme = "dark"` para establecer el tema oscuro como predeterminado, o `default_theme = "light"` para establecer el tema claro como predeterminado.
Establecer `default_theme = ""` (o no especificar la variable) seguirá las preferencias del sistema del usuario (modo claro u oscuro).
Para configurar permanentemente tu sitio en el tema oscuro o claro, necesitas desactivar el `theme_switcher` en `config.toml` y establecer tu tema preferido (`light` o `dark`) como el `default_theme`.
Por ejemplo, para tener un tema oscuro permanente:
@ -169,12 +171,34 @@ Puedes guardar tu nueva skin en cualquiera de estos dos directorios:
Crea un nuevo archivo `.scss` (por ejemplo, `tu_skin.scss`) en la ubicación que prefieras. Este archivo debe contener estas dos variables (esta es la skin predeterminada, "teal"):
```scss
:root {
--primary-color: #087e96;
// This defines theme-specific variables.
@mixin theme-variables($theme) {
@if $theme =='light' {
// Light theme colours.
--primary-color: #087e96; // Contrast ratio: 4.73:1
}
@else if $theme == 'dark' {
// Dark theme colours.
--primary-color: #91e0ee; // Contrast ratio: 11.06:1
}
}
// Apply light theme variables by default.
:root {
@include theme-variables('light');
}
// Apply dark theme variables when dark theme is explicitly set.
[data-theme='dark'] {
--primary-color: #91e0ee;
@include theme-variables('dark');
}
// Apply dark theme variables when user's system prefers dark mode
// and the theme is not explicitly set to light.
@media (prefers-color-scheme: dark) {
:root:not([data-theme='light']) {
@include theme-variables('dark');
}
}
```

View file

@ -1,7 +1,7 @@
+++
title = "Customise tabi with skins and a default theme"
date = 2023-08-09
updated = 2023-11-24
updated = 2024-09-12
description = "Learn how to customise tabi using skins and setting a default theme, making your site uniquely yours."
[taxonomies]
@ -19,6 +19,8 @@ tabi can be customised in two ways: by setting the default theme (dark or light)
Use `default_theme = "dark"` to set the dark theme as the default, or `default_theme = "light"` to set the light theme as the default.
Setting `default_theme = ""` (or commenting out the variable) will follow the user's system preference (light or dark mode).
To permanently set your site to either the dark or light theme, you need to disable the theme switcher in `config.toml` and set your preferred theme as the `default_theme`.
For example, to have a permanent dark theme:
@ -178,12 +180,34 @@ You can save your new skin it in either of these two directories:
Create a new `.scss` file (for example, `your_skin.scss`) in your preferred location. This file needs to have these two variables (this is the default skin, "teal"):
```scss
:root {
--primary-color: #087e96;
// This defines theme-specific variables.
@mixin theme-variables($theme) {
@if $theme =='light' {
// Light theme colours.
--primary-color: #087e96; // Contrast ratio: 4.73:1
}
@else if $theme == 'dark' {
// Dark theme colours.
--primary-color: #91e0ee; // Contrast ratio: 11.06:1
}
}
// Apply light theme variables by default.
:root {
@include theme-variables('light');
}
// Apply dark theme variables when dark theme is explicitly set.
[data-theme='dark'] {
--primary-color: #91e0ee;
@include theme-variables('dark');
}
// Apply dark theme variables when user's system prefers dark mode
// and the theme is not explicitly set to light.
@media (prefers-color-scheme: dark) {
:root:not([data-theme='light']) {
@include theme-variables('dark');
}
}
```

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

View file

@ -1,7 +1,7 @@
+++
title = "Lost in Translation? Explora les capacitats multilingües de tabi"
date = 2023-09-12
updated = 2023-10-27
updated = 2025-09-14
description = "Descobreix com tabi t'ajuda a connectar amb una audiència global gràcies a les seves funcions multilingües. Aprèn a canviar la llengua per defecte, afegir més llengües i aportar les teves pròpies traduccions."
[taxonomies]
@ -24,14 +24,19 @@ tabi simplifica el procés de creació de llocs web multilingües perquè puguis
tabi admet les següents llengües:
- Alemany
- Àrab
- Anglès
- Català
- Coreà
- Espanyol
- Estonià
- Finès
- Francès
- Hindi
- Italià
- Japonès
- Odia
- Persa
- Portuguès (Europeu)
- Rus
- Ucraïnès
@ -51,7 +56,7 @@ title = "~/tabi"
default_language = "zh"
```
tabi es traduirà a aquesta llengua, si està suportada.
Si el valor de `default_language` coincideix amb el nom d'un fitxer TOML al [directori `i18n`](https://github.com/welpo/tabi/tree/main/i18n), tots els textos de tabi es traduiran a aquest idioma.
## Com gestiona tabi el suport multilingüe?
@ -102,9 +107,22 @@ Per tant, si crees `i18n/ca.toml` al teu directori base, tabi llegirà les caden
Assegura't de copiar tot el fitxer per a aquest idioma primer, o el tema utilitzarà l'anglès per les claus que faltin.
## Com personalitzo els formats de data per a diferents idiomes?
Pots establir formats de data específics per idioma al teu `config.toml` utilitzant la matriu `date_formats`:
```toml
date_formats = [
{ lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" },
{ lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" },
]
```
Això permet que cada idioma mostri les dates segons les convencions locals. Per exemple, l'espanyol mostrarà «3 de febrero de 2024» mentre que l'alemany mostrarà «3. Februar 2024». Si no es defineix un format específic per a un idioma, tabi utilitzarà la configuració global `long_date_format`, `short_date_format` i `archive_date_format`.
## Què passa si falta una traducció o està incompleta?
Si una cadena no es troba en el fitxer d'idioma, tabi recorrerà a la cadena predeterminada en català.
Si una cadena no es troba en el fitxer d'idioma, tabi utilitzarà a la cadena predeterminada en anglès.
## El meu idioma no està suportat. Puc contribuir amb una traducció?
@ -129,3 +147,7 @@ Si ho vas fer, hauràs d'actualitzar manualment les traduccions. Pots fer-ho cop
## tabi tradueix el meu contingut?
No. tabi només tradueix les cadenes de text del tema. Hauràs de traduir el teu contingut tu mateix.
## Com puc mostrar el codi de l'idioma actual al commutador d'idioma?
Afegeix `show_selected_language_code_in_language_switcher = true` a la secció `[extra]` del teu `config.toml`.

View file

@ -1,7 +1,7 @@
+++
title = "¿Lost in Translation? Explora las capacidades multilingües de tabi"
date = 2023-09-12
updated = 2023-10-27
updated = 2025-09-14
description = "Descubre cómo tabi te ayuda a conectar con una audiencia global gracias a sus funciones multilingües. Aprende a cambiar el idioma por defecto, añadir más idiomas y aportar tus propias traducciones."
[taxonomies]
@ -24,15 +24,20 @@ tabi simplifica el proceso de crear sitios web multilingües para que puedas con
tabi admite los siguientes idiomas:
- Alemán
- Árabe
- Catalán
- Chino (Simplificado)
- Coreano
- Español
- Estonio
- Finlandés
- Francés
- Hindi
- Inglés
- Italiano
- Japonés
- Odia
- Persa
- Portugués (Europeo)
- Ruso
- Ucraniano
@ -51,7 +56,7 @@ title = "~/tabi"
default_language = "zh"
```
tabi se traducirá a ese idioma, si está soportado.
Si el valor de `default_language` coincide con el nombre de un archivo TOML en el [directorio `i18n`](https://github.com/welpo/tabi/tree/main/i18n), todos los textos de tabi se traducirán a ese idioma.
## ¿Cómo gestiona tabi el soporte multilingüe?
@ -102,6 +107,19 @@ Por lo tanto, si creas `i18n/en.toml` en tu directorio base, tabi leerá las cad
Asegúrate de copiar todo el archivo para ese idioma primero, o el tema usará el inglés para las claves faltantes.
## ¿Cómo personalizo los formatos de fecha para diferentes idiomas?
Puedes establecer formatos de fecha específicos por idioma en tu `config.toml` usando la matriz `date_formats`:
```toml
date_formats = [
{ lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" },
{ lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" },
]
```
Esto permite que cada idioma muestre las fechas según las convenciones locales. Por ejemplo, el español mostrará «3 de febrero de 2024» mientras que el alemán mostrará «3. Februar 2024». Si no se define un formato específico para un idioma, tabi usará la configuración global `long_date_format`, `short_date_format` y `archive_date_format`.
## ¿Qué pasa si falta una traducción o está incompleta?
Si una cadena no se encuentra en el archivo de idioma, tabi recurrirá a la cadena predeterminada en inglés.
@ -129,3 +147,7 @@ Si lo hiciste, tendrás que actualizar manualmente las traducciones. Puedes hace
## ¿tabi traduce el contenido de mi sitio?
No. tabi sólo traduce el tema. Los posts deberás traducirlos tú mismo.
## ¿Cómo puedo mostrar el código del idioma actual en el conmutador de idioma?
Añade `show_selected_language_code_in_language_switcher = true` en la sección `[extra]` de tu `config.toml`.

View file

@ -1,7 +1,7 @@
+++
title = "Lost in Translation? Not with tabi's Multilingual Capabilities"
date = 2023-09-12
updated = 2023-10-27
updated = 2025-09-14
description = "Master the art of serving a global audience through tabi's built-in multilingual features. Learn how to change the default language, add multilingual support, and contribute your own translations."
[taxonomies]
@ -23,15 +23,21 @@ To broaden your reach to a global audience, tabi streamlines the process of buil
tabi supports the following languages:
- Arabic
- Catalan
- Chinese (Simplified)
- Chinese (Traditional)
- English
- Estonian
- Finnish
- French
- German
- Hindi
- Italian
- Japanese
- Korean
- Odia
- Persian
- Portuguese (European)
- Russian
- Spanish
@ -48,10 +54,10 @@ For instance, if you want (Simplified) Chinese to be the primary language, simpl
```toml, hl_lines=03
base_url = "https://welpo.github.io/tabi"
title = "~/tabi"
default_language = "zh"
default_language = "zh-Hans"
```
All of tabi's text strings will be translated to that language, if supported.
If the value of `default_language` matches the name of a TOML file in the [`i18n` directory](https://github.com/welpo/tabi/tree/main/i18n), all of tabi's text strings will be translated to that language.
## How does tabi handle multilingual support?
@ -102,6 +108,19 @@ So if you create `i18n/en.toml` in your base directory, tabi will read the stri
Make sure to copy the entire file for that language first, or the theme will fall back to the default English strings.
## How do I customize date formats for different languages?
You can set language-specific date formats in your `config.toml` using the `date_formats` array:
```toml
date_formats = [
{ lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" },
{ lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" },
]
```
This allows each language to display dates according to local conventions. For example, Spanish will show "3 de febrero de 2024" while German will show "3. Februar 2024". If no language-specific format is defined, tabi will use the global `long_date_format`, `short_date_format` and `archive_date_format` settings.
## What happens if a translation is missing or incomplete?
If a string is not found in the language file, tabi will fall back to the default English string.
@ -129,3 +148,7 @@ If you did, you will need to manually update the translations. You can do this b
## Does tabi translate my content?
No. tabi only translates the theme's text strings. You will need to translate your content yourself.
# How to show current language code on the language switcher?
Add `show_selected_language_code_in_language_switcher = true` in your config extras.

View file

@ -1,14 +1,13 @@
+++
title = "Sense JavaScript obligatori"
date = 2023-01-06
updated = 2023-10-06
updated = 2025-02-21
description = "JavaScript només s'utilitza quan HTML i CSS no són suficients."
[taxonomies]
tags = ["funcionalitat", "tutorial"]
[extra]
footnote_backlinks = true
social_media_card = "social_cards/ca_blog_javascript.jpg"
+++
@ -16,6 +15,8 @@ Aquest tema no requereix JavaScript obligatori. Opcionalment, pot carregar una q
## Opcions habilitades globalment
- [**Cerca**](@/blog/mastering-tabi-settings/index.ca.md#cerca). Activada establint un idioma per defecte i `build_search_index = true` a la secció principal de `config.toml`. (~23KB de JavaScript)
- L'**interruptor de mode clar/fosc** es pot habilitar configurant `theme_switcher = true` a la secció `[extra]` del teu `config.toml` (~1KB de JavaScript).
- **Decodificació de correu electrònic** (~400 bytes). Per protegir contra robots de correu brossa, pots configurar `encode_plaintext_email = true`. Si el teu lloc web està en un repositori públic, considera utilitzar el teu `email` com una cadena codificada en base64[^1].
@ -24,9 +25,11 @@ Aquest tema no requereix JavaScript obligatori. Opcionalment, pot carregar una q
Les següents opcions es poden especificar per a publicacions, seccions i globalment, seguint la jerarquia de `pàgina > secció > config.toml`:
- [**Suport de KaTeX**](@/blog/markdown/index.ca.md#katex). Habilitat configurant `katex = true` (274 KB).
- [**Suport de KaTeX**](@/blog/markdown/index.ca.md#katex). Habilitat configurant `katex = true` (274 KB). Per renderitzar fórmules sense JS, prova [MathML](https://developer.mozilla.org/docs/Web/MathML/).
- [**Diagrames de Mermaid**](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid). Habilitat configurant `mermaid = true` (~2.5 MB).
- [**Còpia de blocs de codi amb un sol clic**](@/blog/markdown/index.ca.md#bloc-de-codi). Habilitada configurant `copy_button = true`. (~700 bytes)
- [**Enllaços de retorn per a notes a peu de pàgina**](@/blog/markdown/index.ca.md#1). Habilitats configurant `footnote_backlinks = true` (~500 bytes).
- [**Noms de blocs de codi clicables**](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url). S'activa configurant `code_block_name_links = true`. (~400 bytes)
- [**Filtratge per etiquetes** per a graelles de targetes](@/blog/mastering-tabi-settings/index.ca.md#filtrar-projectes) (p. ex. [projectes](@/projects/_index.ca.md)) (~2KB). S'habilita configurant `enable_cards_tag_filtering = true`.
Per especificar aquestes opcions:

View file

@ -1,14 +1,13 @@
+++
title = "Sin JavaScript obligatorio"
date = 2023-01-06
updated = 2023-10-06
updated = 2025-02-21
description = "JavaScript solo se utiliza cuando HTML y CSS no son suficientes."
[taxonomies]
tags = ["funcionalidad", "tutorial"]
[extra]
footnote_backlinks = true
social_media_card = "social_cards/es_blog_javascript.jpg"
+++
@ -16,6 +15,8 @@ Este tema no requiere JavaScript de manera obligatoria. Opcionalmente, puede car
## Opciones habilitadas globalmente
- [**Búsqueda**](@/blog/mastering-tabi-settings/index.es.md#busqueda). Habilitada estableciendo un idioma por defecto y `build_search_index = true` en la sección principal de `config.toml`. (~23KB de JavaScript)
- El **interruptor de modo claro/oscuro** puede habilitarse configurando `theme_switcher = true` en la sección `[extra]` de tu `config.toml` (~1KB de JavaScript).
- **Descodificación de correo electrónico** (~400 bytes). Para proteger contra bots que recopilan correos electrónicos desde tu sitio web, puedes configurar `encode_plaintext_email = true`. Si tu sitio está en un repositorio público, para mayor protección, considera configurar tu `email` como una cadena codificada en base64[^1].
@ -24,9 +25,11 @@ Este tema no requiere JavaScript de manera obligatoria. Opcionalmente, puede car
Las siguientes opciones pueden especificarse para publicaciones, secciones y a nivel global, siguiendo la jerarquía de `página > sección > config.toml`:
- [**Soporte de KaTeX**](@/blog/markdown/index.es.md#katex). Habilitado al configurar `katex = true` (274 KB).
- [**Soporte de KaTeX**](@/blog/markdown/index.es.md#katex). Habilitado al configurar `katex = true` (274 KB). Para renderizar fórmulas sin JS, prueba [MathML](https://developer.mozilla.org/docs/Web/MathML/).
- [**Diagramas de Mermaid**](@/blog/shortcodes/index.es.md#diagramas-de-mermaid). Habilitado al configurar `mermaid = true` (~2.5 MB).
- [**Copia de bloques de código con un solo clic**](@/blog/markdown/index.es.md#bloque-de-codigo). Habilitado al configurar `copy_button = true` (~700 bytes).
- [**Enlaces de retorno de notas al pie**](@/blog/markdown/index.es.md#1). Habilitado al configurar `footnote_backlinks = true` (~500 bytes).
- [**Nombres de bloques de código clicables**](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url). Se activa configurando `code_block_name_links = true`. (~400 bytes)
- [**Filtraje por etiquetas** para cuadrículas de tarjetas](@/blog/mastering-tabi-settings/index.es.md#filtrar-proyectos) (p. ej. [proyectos](@/projects/_index.es.md)) (~2KB). Habilitado al configurar `enable_cards_tag_filtering = true`.
Para especificar estas opciones:

View file

@ -1,14 +1,13 @@
+++
title = "No mandatory JavaScript"
date = 2023-01-06
updated = 2023-10-06
updated = 2025-02-21
description = "JavaScript is only used when HTML and CSS aren't enough."
[taxonomies]
tags = ["showcase", "tutorial"]
[extra]
footnote_backlinks = true
social_media_card = "social_cards/blog_javascript.jpg"
+++
@ -16,6 +15,8 @@ This theme has no mandatory JavaScript. Optionally, it can load a minimal amount
## Globally enabled settings
- [**Search**](@/blog/mastering-tabi-settings/index.md#search). Enabled by setting a default language and `build_search_index = true` on the main section of `config.toml`. (~23KB of JavaScript)
- The **light/dark mode switch** can be enabled by setting `theme_switcher = true` in the `[extra]` section of your `config.toml` (~1KB of JavaScript).
- **E-mail decoding** (~400 bytes). To protect against spambots scraping your e-mail from your website, you can set `encode_plaintext_email = true`. If your site is on a public repository, for extra protection, consider setting your `email` as a base64-encoded string[^1] directly.
@ -24,9 +25,11 @@ This theme has no mandatory JavaScript. Optionally, it can load a minimal amount
The following settings can be specified for posts, sections and globally, following the hierarchy of `page > section > config.toml`:
- [**KaTeX support**](@/blog/markdown/index.md#katex). Enabled by setting `katex = true` (274 KB).
- [**KaTeX support**](@/blog/markdown/index.md#katex). Enabled by setting `katex = true` (274 KB). To render math without JS, check out [MathML](https://developer.mozilla.org/docs/Web/MathML/).
- [**Mermaid diagrams**](@/blog/shortcodes/index.md#mermaid-diagrams). Enabled by setting `mermaid = true` (~2.5 MB).
- [**One-click copy of code blocks**](@/blog/markdown/index.md#code-block). Enabled by setting `copy_button = true`. (~700 bytes)
- [**Footnote backlinks**](@/blog/markdown/index.md#1). Enabled by setting `footnote_backlinks = true` (~500 bytes).
- [**Clickable code block names**](@/blog/shortcodes/index.md#show-source-or-path). Enabled by setting `code_block_name_links = true`. (~300 bytes)
- [**Tag filtering** for card grids](@/blog/mastering-tabi-settings/index.md#filtering-projects) (e.g. [projects](@/projects/_index.md)) (~2KB). Enabled by setting `enable_cards_tag_filtering = true`.
To specify these settings:

View file

@ -0,0 +1,93 @@
+++
title = "أمثلة على ماركداون"
date = 2023-01-31
updated = 2023-09-01
description = "تعرض هذه التدوينة بعض الأمثلة على تنسيق ماركداون، بما في ذلك الجداول، والشِفرات البرمجية والوسوم، والاقتباسات، والهوامش."
[taxonomies]
tags = ["ماركداون", "توضيحي"]
[extra]
katex = true
+++
{% admonition(type="note", title="ملاحظة عن الاتجاه", icon="info") %}
يدعم تابي الكتابة من اليمين إلى اليسار (RTL) بشكل كامل، مما يجعله مثالياً للغة العربية.
الشفرات البرمجية والمعادلات الرياضية تبقى من اليسار إلى اليمين كما هو متوقع.
{% end %}
## الرياضيات مع $\KaTeX$
{{ aside(text="تأتي كلمة *ماركداون* من الإنجليزية *Markdown*، وهي لغة ترميز بسيطة صممها جون غروبر وآرون سوارتز في عام 2004.") }}
[$\KaTeX$](https://katex.org/) هي مكتبة سريعة وسهلة الاستخدام تمكن من عرض الرموز الرياضية باستخدام صيغة LaTeX.
يمكنك استخدام $\KaTeX$ **ضمن السطر** عن طريق وضع التعبير بين `$` أو بين `\\(` و `\\)`.
على سبيل المثال، `$ \sin(x) = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n + 1)!} x^{2n + 1} $` سيظهر هكذا: $ \sin(x) = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n + 1)!} x^{2n + 1} $
لعرض التعبير **في سطر منفصل ومتوسط**، ضعه بين `$$` أو بين `\\[` و `\\]`.
على سبيل المثال، `\\[ r = \frac{\sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n}(x_i - \bar{x})^2}\sqrt{\sum_{i=1}^{n}(y_i - \bar{y})^2}} \\]` سيظهر هكذا: \\[ r = \frac{\sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n}(x_i - \bar{x})^2}\sqrt{\sum_{i=1}^{n}(y_i - \bar{y})^2}} \\]
لتفعيل $\KaTeX$ لتدوينة أو قسم كامل، أضف `katex = true` داخل قسم `[extra]` في المقدمة. على سبيل المثال:
```toml,hl_lines=5-6
title = "تجربة KaTeX"
date = 2002-11-30
[extra]
katex = true
```
يمكنك أيضاً تفعيله بشكل عام عن طريق تعيين `katex = true` في قسم `[extra]` في ملف `config.toml` الخاص بك.
لتحسين الأداء والأمان، يتم استضافة ملفات جافا سكريبت و CSS والخطوط الخاصة بـ $\KaTeX$ محلياً.
**ملاحظة**: بعد تفعيل $\KaTeX$، إذا أردت استخدام \$ بدون عرض تعبير رياضي، استخدم شرطة مائلة للخلف قبلها: `\$`.
## جدول
هذا مثال على جدول[^1]. تتغير ألوانه حسب سمة التدوينة.
| الرمز | العنصر | العدد الذري |
|--------|----------|--------------|
| H | هيدروجين| 1 |
| C | كربون | 6 |
| Fe | حديد | 26 |
| Au | ذهب | 79 |
## الشِفرات البرمجية
```rust
fn main() {
println!("مرحباً يا عالم") -> ();
}
```
### من اليمين إلى اليسار
{% force_text_direction(direction="rtl") %}
```
نص قل_مرحباً(نص الاسم) {
أرجع تنسيق("مرحباً {الاسم}")؛
}
```
{% end %}
## سطر برمجي
في Rust، تعلن عن متغير متغير باستخدام `let mut x = 5`، بينما في Python، تستخدم ببساطة `x = 5`. وبالمثل، لطباعة قيمة في Rust، تستخدم `println!("القيمة: {}", x)`، ولكن في Python، الأمر بسيط مثل `print(f"القيمة: {x}")`
وفي لغة البرمجة العربية هو `مهنة = "صائد فئران"`
## اقتباس
> وابِطُكَ قابِضِ الأَرواحِ يَرمي ... بِسَهمِ المَوتِ مِن تَحتِ الثِيابِ
>
> شَرابُكَ في السَرابِ إِذا عَطِشنا ... وَخُبزُكَ عِندَ مُنقَطِعِ التُرابِ
>
> — أبو الشمقمق، العصر العباسي
[^1]: وهذا مثال على الهامش!

View file

@ -1,7 +1,7 @@
+++
title = "Exemples de Markdown"
date = 2023-01-31
updated = 2023-09-01
updated = 2025-02-21
description = "Aquesta publicació mostra alguns exemples de format en Markdown, incloent-hi una taula, blocs de codi i etiquetes, citacions, taules i notes a peu de pàgina."
[taxonomies]
@ -9,7 +9,6 @@ tags = ["markdown", "funcionalitat"]
[extra]
katex = true
footnote_backlinks = true
social_media_card = "social_cards/ca_blog_markdown.jpg"
+++
@ -60,6 +59,42 @@ fn main() {
}
```
### Amb numeració de línies
```rust,linenos
use std::collections::HashMap;
#[derive(Debug)]
struct TwinPeaksCharacter {
name: String,
coffee_rating: f32,
pie_preference: String,
}
fn main() {
let mut black_lodge = HashMap::new();
black_lodge.insert("agent", TwinPeaksCharacter {
name: String::from("Dale Cooper"),
coffee_rating: 9999.99,
pie_preference: String::from("Damn Fine Cherry"),
});
black_lodge.insert("giant", TwinPeaksCharacter {
name: String::from("The Fireman"),
coffee_rating: 42.424242,
pie_preference: String::from("Garmonbozia"),
});
// Calculate total appreciation of damn fine coffee
let total_coffee: f32 = black_lodge.values()
.map(|character| character.coffee_rating)
.sum();
println!("☕ Total coffee appreciation: {:.2} cups", total_coffee);
}
```
## Etiquetes de codi
A Rust, declares una variable mutable amb `let mut x = 5;`, mentre que a Python, simplement fas `x = 5`. De manera similar, per imprimir un valor a Rust, utilitzaries `println!("Valor: {}", x);`, però a Python, és tan senzill com `print(f"Valor: {x}")`.
@ -70,6 +105,6 @@ A Rust, declares una variable mutable amb `let mut x = 5;`, mentre que a Python,
>
> — Mercè Rodoreda, La plaça del Diamant
<hr>
---
[^1]: I aquí tens un exemple de nota a peu de pàgina!

View file

@ -1,7 +1,7 @@
+++
title = "Ejemplos de Markdown"
date = 2023-01-31
updated = 2023-09-01
updated = 2025-02-21
description = "Esta publicación muestra algunos ejemplos de formato Markdown, incluyendo una tabla, bloques de código y etiquetas, citas, tablas y notas al pie de página."
[taxonomies]
@ -9,7 +9,6 @@ tags = ["markdown", "funcionalidad"]
[extra]
katex = true
footnote_backlinks = true
social_media_card = "social_cards/es_blog_markdown.jpg"
+++
@ -60,6 +59,42 @@ fn main() {
}
```
### Con números de línea
```rust,linenos
use std::collections::HashMap;
#[derive(Debug)]
struct TwinPeaksCharacter {
name: String,
coffee_rating: f32,
pie_preference: String,
}
fn main() {
let mut black_lodge = HashMap::new();
black_lodge.insert("agent", TwinPeaksCharacter {
name: String::from("Dale Cooper"),
coffee_rating: 9999.99,
pie_preference: String::from("Damn Fine Cherry"),
});
black_lodge.insert("giant", TwinPeaksCharacter {
name: String::from("The Fireman"),
coffee_rating: 42.424242,
pie_preference: String::from("Garmonbozia"),
});
// Calculate total appreciation of damn fine coffee
let total_coffee: f32 = black_lodge.values()
.map(|character| character.coffee_rating)
.sum();
println!("☕ Total coffee appreciation: {:.2} cups", total_coffee);
}
```
## Etiquetas de código
En Rust, declaras una variable mutable con `let mut x = 5;`, mientras que en Python, simplemente usas `x = 5`. De manera similar, para imprimir un valor en Rust, utilizarías `println!("Valor: {}", x);`, pero en Python, es tan sencillo como `print(f"Valor: {x}")`.
@ -70,6 +105,6 @@ En Rust, declaras una variable mutable con `let mut x = 5;`, mientras que en Pyt
>
> — Miguel de Unamuno, Niebla
<hr>
---
[^1]: ¡Y aquí tienes un ejemplo de una nota al pie de página!

View file

@ -1,7 +1,7 @@
+++
title = "Markdown examples"
date = 2023-01-31
updated = 2023-09-01
updated = 2025-02-21
description = "This post showcases some examples of Markdown formatting, including a table, code blocks and tags, quotes, tables, and footnotes."
[taxonomies]
@ -9,7 +9,6 @@ tags = ["markdown", "showcase"]
[extra]
katex = true
footnote_backlinks = true
social_media_card = "social_cards/blog_markdown.jpg"
+++
@ -60,6 +59,42 @@ fn main() {
}
```
### With line numbers
```rust,linenos
use std::collections::HashMap;
#[derive(Debug)]
struct TwinPeaksCharacter {
name: String,
coffee_rating: f32,
pie_preference: String,
}
fn main() {
let mut black_lodge = HashMap::new();
black_lodge.insert("agent", TwinPeaksCharacter {
name: String::from("Dale Cooper"),
coffee_rating: 9999.99,
pie_preference: String::from("Damn Fine Cherry"),
});
black_lodge.insert("giant", TwinPeaksCharacter {
name: String::from("The Fireman"),
coffee_rating: 42.424242,
pie_preference: String::from("Garmonbozia"),
});
// Calculate total appreciation of damn fine coffee
let total_coffee: f32 = black_lodge.values()
.map(|character| character.coffee_rating)
.sum();
println!("☕ Total coffee appreciation: {:.2} cups", total_coffee);
}
```
## Code tags
In Rust, you declare a mutable variable with `let mut x = 5;`, whereas in Python, you simply use `x = 5`. Similarly, to print a value in Rust, you would use `println!("Value: {}", x);`, but in Python, it's as straightforward as `print(f"Value: {x}")`.
@ -70,6 +105,6 @@ In Rust, you declare a mutable variable with `let mut x = 5;`, whereas in Python
>
> — Charlie Kaufman, Synecdoche, New York
<hr>
---
[^1]: And here's an example of a footnote!

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View file

@ -1,20 +1,19 @@
+++
title = "Domina la configuració de tabi: guia completa"
date = 2023-09-18
updated = 2023-12-04
updated = 2025-08-07
description = "Descobreix les múltiples maneres en què pots personalitzar tabi."
[taxonomies]
tags = ["funcionalitat", "tutorial", "preguntes freqüents"]
[extra]
giscus = true
footnote_backlinks = true
pinned = true
quick_navigation_buttons = true
social_media_card = "social_cards/ca_blog_mastering_tabi_settings.jpg"
+++
Aquesta és la guia completa sobre la configuració a tabi. Si tens alguna pregunta, pots utilitzar els [comentaris](#comments) al final d'aquesta pàgina o [obrir un issue a GitHub](https://github.com/welpo/tabi/issues/new).
Aquesta és la guia completa sobre la configuració a tabi. Si tens alguna pregunta, pots [obrir un issue a GitHub](https://github.com/welpo/tabi/issues/new) o [iniciar una discussió](https://github.com/welpo/tabi/discussions).
<details>
<summary><b>Taula de continguts</b></summary>
@ -27,17 +26,69 @@ tabi té una jerarquia que permet personalitzar el teu lloc a diferents nivells.
1. **Configuracions globals**: Aquestes són les configuracions que s'apliquen a tot el teu lloc. Es configuren a `config.toml`.
2. **Configuracions de secció**: Aquestes són les configuracions que s'apliquen a una secció del teu lloc (per exemple, `/blog` o `/projects`). Es configuren a la metainformació de l'arxiu `_index.md` de la secció.
3. **Configuracions de pàgina**: Aquestes són les configuracions que s'apliquen a una sola pàgina. Es configuren a la metainformació de la pàgina.
3. **Configuració de la pàgina «pare»**: Per a pàgines anidades (pàgines dins de pàgines), aquestes són les configuracions de la pàgina que les conté.
4. **Configuracions de pàgina**: Aquestes són les configuracions que s'apliquen a una sola pàgina. Es configuren a la metainformació de la pàgina.
En tots els casos, les opcions de tabi es configuren a la secció `[extra]`.
Per a les configuracions que segueixen aquesta jerarquia, el valor establert a una pàgina reemplaça el valor d'una secció, que al seu torn reemplaça el valor global. En resum: com més específica sigui la configuració, més prioritat tindrà, o `pàgina > secció > config.toml`.
Per a les configuracions que segueixen aquesta jerarquia, el valor establert a una pàgina reemplaça el valor d'una secció, que al seu torn reemplaça el valor global. En resum: com més específica sigui la configuració, més prioritat tindrà, o `pàgina > pàgina pare/secció > config.toml`.
---
## Cerca
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:--------------------:|:--------------------:|
| ❌ | ❌ | ✅ | ❌ | ✅ |
tabi permet cerca local accessible i multilingüe amb [Elasticlunr](http://elasticlunr.com/). Per activar-la, necessites:
1. Establir un `default_language` a `config.toml`.
2. Establir `build_search_index = true`.
3. Opcionalment, configurar la secció `[search]`.
Per exemple:
```toml
base_url = "https://example.com"
default_language = "en"
build_search_index = true
[search]
index_format = "elasticlunr_json" # O el menys eficient "elasticlunr_javascript".
include_title = true
include_description = true
include_path = true
include_content = true
```
**Nota**: per suport de cerca en Xinès/Japonès, necessites utilitzar una [build personalitzada de Zola](https://github.com/getzola/zola/blob/master/Cargo.toml#L54-L55). Addicionalment, actualment no hi ha suport per a la cerca en català.
### Consideracions per a usuaris de Zola 0.17.X
Zola 0.17.X no proporciona accés a la variable `search.index_format` ([informe del bug](https://github.com/getzola/zola/issues/2165)). En utilitzar tabi, s'assumeix l'ús de l'índex JSON, que és més eficient. No obstant això, a causa d'[un altre bug](https://github.com/getzola/zola/issues/2193) solucionat en 0.18.0, l'índex JSON per a llocs multilingües no es genera correctament.
Els usuaris amb versions de Zola anteriors a 0.18.0 que vulguin utilitzar l'índex JavaScript necessiten establir la variable `index_format` a dos llocs:
```toml
[search]
index_format = "elasticlunr_javascript"
[extra]
index_format = "elasticlunr_javascript"
```
Això assegura que tabi carregui els arxius correctes. Recomanem actualitzar a Zola 0.18.0 o posterior per a una funcionalitat òptima.
### Detalls d'implementació
Per a detalls tècnics sobre la implementació de la cerca, incloent quan es carrega l'índex, característiques d'accessibilitat i altres detalls, consulta el [Pull Request #250](https://github.com/welpo/tabi/pull/250).
---
## Suport multilingüe
tabi ofereix suport multilingüe complet per al teu lloc Zola, des de configurar un idioma predeterminat fins a afegir tots els que vulguis. Consulta les [preguntes freqüents sobre idiomes](/ca/blog/faq-languages/) per a més informació.
tabi ofereix suport multilingüe complet per al teu lloc Zola, des de configurar un idioma predeterminat fins a afegir tots els que vulguis. Consulta les [preguntes freqüents sobre idiomes](@/blog/faq-languages/index.ca.md) per a més informació.
---
@ -49,6 +100,8 @@ La [pàgina principal](/) d'aquesta demo té una capçalera amb una imatge, un t
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/header_light.webp", dark_src="blog/mastering-tabi-settings/img/header_dark.webp", alt="Capçalera de la pàgina principal") }}
#### Capçalera
Per configurar la imatge i el títol, pots utilitzar la variable `header` al front matter de l'arxiu `_index.md` de la secció. Per exemple:
```toml
@ -58,35 +111,91 @@ header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "Óscar Fe
La descripció és contingut Markdown normal, escrit fora del front matter.
Si vols mostrar publicacions a la pàgina principal, primer necessites decidir si la seva ruta serà `/` o quelcom diferent, com ara `/blog/`.
#### Llistant publicacions recents
Si vols servir les publicacions des de `/`, necessites configurar `paginate_by = 5` al front matter del teu arxiu `_index.md`. **Nota**: això no es configura a l'apartat `[extra]`, sinó al front matter principal. Exemple:
Per mostrar publicacions a la pàgina principal, primer has de decidir d'on es serviran: de la ruta arrel (`/`) o d'un subdirectori (per exemple, `/blog`).
**Opció A: Servir publicacions des de la ruta arrel (`/`)**
Configura `paginate_by` al front matter del teu arxiu `content/_index.md`:
```toml
title = "Últimes publicacions"
sort_by = "date"
template = "section.html"
paginate_by = 5
paginate_by = 5 # Mostra 5 publicacions per pàgina.
[extra]
header = {title = "Hola! Sóc tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, l'autor del tema" }
header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "El teu nom" }
```
Si prefereixes servir les publicacions des de `/blog`, pots configurar `section_path = "/blog"` a la secció `[extra]`. Aquesta és la configuració d'aquesta demo:
{{ admonition(type="note", text="La configuració `paginate_by` va al front matter principal, no a la secció `[extra]`.") }}
**Opció B: Servir publicacions des d'un subdirectori (per exemple, `/blog`)**
Utilitza `section_path` a la secció `[extra]` del teu arxiu `content/_index.md`:
```toml
title = "Publicacions recents"
title = "Últimes publicacions"
sort_by = "date"
template = "section.html"
# No configuris `paginate_by` aquí.
[extra]
header = {title = "Hola! Sóc tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, l'autor del tema" }
section_path = "blog/_index.es.md"
max_posts = 4
header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "El teu nom" }
section_path = "blog/_index.md" # On trobar les teves publicacions.
max_posts = 5 # Mostra fins a 5 publicacions a la pàgina principal.
```
Fixa't que si configures `section_path`, no cal que configuris `paginate_by`. Pots establir `max_posts` per determinar el nombre de publicacions que vols mostrar a la pàgina principal.
{{ admonition(type="warning", title="ALERTA", text="No configuris `paginate_by` i `section_path` alhora. Aquestes configuracions són mútuament excloents i usar ambdues pot fer que no es mostrin publicacions.") }}
El `title` és el títol que apareix a sobre de les publicacions.
Notes addicionals:
- El `title` al front matter estableix el títol que apareix sobre les publicacions.
- Utilitza la ruta completa a l'arxiu `_index.md` de la secció per a `section_path`. Usar `section_path = "blog/"` no funcionarà.
##### Fixar entrades
Pots fixar entrades per mantenir-les a la part superior de la pàgina principal. En aquesta demo, aquesta entrada està fixada, així que apareix primera amb una icona i etiqueta de "fixada":
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/pinned_post_light.webp", dark_src="blog/mastering-tabi-settings/img/pinned_post_dark.webp", alt="Entrada fixada", full_width=true) }}
Les entrades fixades es mostren primer, mantenint el seu ordre relatiu segons el `sort_by` de la secció, seguides per les entrades regulars.
Per fixar una entrada, afegeix el següent al seu front matter:
```toml
[extra]
pinned = true
```
{{ admonition(type="info", text="Aquesta configuració només afecta les pàgines principals del lloc (com `/`, `/es/`, `/fr/`). Altres seccions com `blog/`, `tags/` o `archive/` mostren les publicacions en el seu ordre habitual.") }}
{{ admonition(type="warning", text='Quan s'utilitza la paginació (`paginate_by`), les entrades fixades poden aparèixer dues vegades: una vegada a la part superior de la primera pàgina, i una altra en la seva posició cronològica normal en pàgines posteriors.') }}
##### Mostrar la data dels articles al llistat
Per defecte, quan es llisten els articles, es mostra la data de creació. Pots configurar quina(es) data(es) mostrar utilitzant l'opció `post_listing_date`. Configuracions disponibles:
- `date`: Mostra només la data de publicació original de l'article (opció per defecte).
- `updated`: Mostra només la data de l'última actualització de l'article. Si no hi ha data d'actualització, es mostra la data de publicació original.
- `both`: Mostra tant la data de publicació original com la data de l'última actualització.
{% admonition(type="tip") %}
Aquesta configuració segueix la jerarquia: pots establir un valor global a `config.toml` o canviar-lo per a seccions específiques al seu arxiu `_index.md`. En ambdós casos, afegeix-lo a la secció `[extra]`.
{% end %}
#### Llistat de Projectes
Pots mostrar una selecció de projectes a la teva pàgina principal. Per fer això, primer necessitaràs configurar el directori `projects`.
Un cop fet això, configura la ruta als projectes a la secció `[extra]` del teu fitxer `_index.md`:
```toml
[extra]
projects_path = "projects/_index.md"
```
Això mostrarà els 3 projectes de major prioritat (amb menor pes; el mateix ordre que a Projectes). Per mostrar més o menys projectes, configura `max_projects` a `[extra]`.
Per defecte, la secció de projectes es mostrarà a la part inferior de la pàgina principal, sota les publicacions. Si prefereixes mostrar-la a la part superior, configura `show_projects_first = true`.
### Commutador de mode clar i fosc
@ -114,7 +223,38 @@ Les skins («pells») de tabi canvien el color principal del lloc web. Pots conf
{{ image_toggler(default_src="blog/customise-tabi/skins/lavender_light.webp", toggled_src="blog/customise-tabi/skins/lavender_dark.webp", default_alt="pell lavender en mode clar", toggled_alt="pell lavender en mode fosc", full_width=true) }}
Explora les skins disponibles i aprèn com crear la teva pròpia consultant [la documentació](/ca/blog/customise-tabi/#skins).
Explora les skins disponibles i aprèn com crear la teva pròpia consultant [la documentació](@/blog/customise-tabi/index.ca.md#skins).
### Font sans serif (pal sec)
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:---------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
tabi utilitza una font serif per als paràgrafs dels articles (la que estàs veient ara). Pots canviar a una font sans-serif (la que veus als encapçalaments/menú) a tot el teu lloc configurant `override_serif_with_sans = true` a `config.toml`.
Fes clic a la imatge a continuació per comparar les fonts:
{{ image_toggler(default_src="blog/mastering-tabi-settings/img/serif.webp", toggled_src="blog/mastering-tabi-settings/img/sans-serif.webp", default_alt="Font serif", toggled_alt="Font sans-serif", full_width=true) }}
### Indicador d'enllaços externs
| Pàgina | Secció | `config.toml` | Segueix Jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
{{ admonition(type="info", text="Requereix Zola 0.20.0 o posterior.") }}
Si vols afegir una icona als enllaços externs, configura la secció `[markdown]` (no `[extra]`) al teu `config.toml`:
```toml
[markdown]
external_links_class = "external"
```
Això afegirà una petita icona al costat dels enllaços externs:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/external_link_light.webp", dark_src="blog/mastering-tabi-settings/img/external_link_dark.webp", alt="Icona d'enllaç extern", full_width=true) }}
### Estils CSS personalitzats
@ -136,12 +276,63 @@ stylesheets = ["css/custom.css", "css/another.css"]
El color del tema del navegador és el color que apareix a la barra de pestanyes del navegador:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/browser_theme_colour_light.webp", dark_src="blog/mastering-tabi-settings/img/browser_theme_colour_dark.webp" alt="pestanyes amb un tema de navegador de color") }}
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/browser_theme_color_light.webp", dark_src="blog/mastering-tabi-settings/img/browser_theme_color_dark.webp" alt="pestanyes amb un tema de navegador de color") }}
Pots establir-ho a `config.toml` com a `browser_theme_colour = "#087e96"`. Si vols diferents colors per als modes clar/obscur, pots establir un conjunt de colors amb `browser_theme_colour = ["#ffffff", "#000000"]`. El primer color és per al mode clar, el segon per al fosc.
Pots establir-ho a `config.toml` com a `browser_theme_color = "#087e96"`. Si vols diferents colors per als modes clar/obscur, pots establir un conjunt de colors amb `browser_theme_color = ["#ffffff", "#000000"]`. El primer color és per al mode clar, el segon per al fosc.
Aquesta variable accepta qualsevol color CSS vàlid, així que pots utilitzar paraules clau (per exemple, `blue`), codis hexadecimals (per exemple, `#087e96`) o valors RGB/HSL (per exemple, `rgb(8, 126, 150)`).
### Etiquetes compactes
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:-----------------:|:--------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
Per defecte, la [pàgina d'etiquetes](/ca/tags) mostra les etiquetes com:
[NomEtiqueta](#) — n entrada[es]
Establir `compact_tags = true` les mostrarà com:
[NomEtiqueta](#) <sup>n</sup>
### Ordre de les etiquetes
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:-----------------:|:--------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
Per defecte, la [pàgina d'etiquetes](/ca/tags) ordena les etiquetes alfabèticament, donada la configuració predeterminada de `tag_sorting = "name"`.
Si configures `tag_sorting = "frequency"`, s'ordenaran segons el nombre de publicacions (de més a menys).
---
## Sèries
Per a una explicació detallada, consulta la [documentació de sèries](@/blog/series/index.ca.md).
### Enllaç per saltar a les publicacions
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
| ❌ | ✅ | ✅ | ✅ | ❌ |
Per defecte, apareix automàticament un enllaç "Salta a les publicacions" al costat del títol de la sèrie quan una sèrie té un contingut de més de 2000 caràcters:
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enllaç per saltar a les publicacions de la sèrie", full_width=true) }}
Estableix `show_jump_to_posts = true` per forçar l'activació de la funció i `show_jump_to_posts = false` per desactivar-la.
### Indexació de pàgines de sèries
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
| ❌ | ✅ | ✅ | ✅ | ❌ |
Per defecte, les pàgines de sèries s'indexen (usant una indexació basada en 1) segons el `sort_by` de la secció de sèries.
Estableix `post_listing_index_reversed = true` per invertir aquest índex.
---
## Integració amb repositoris Git
@ -202,7 +393,7 @@ quick_navigation_buttons = true
- `show_reading_time = false` amaga el temps estimat de lectura.
- `quick_navigation_buttons = true` mostra els botons de navegació ràpida.
Al costat del fitxer `_index.md`, pots crear un fitxer per a cada projecte. Per exemple, aquest és el bloc de metadades per a la pàgina del projecte [tabi](/ca/projects/tabi/):
Al costat del fitxer `_index.md`, pots crear un fitxer per a cada projecte. Per exemple, aquest és el bloc de metadades per a la pàgina del projecte [tabi](@/projects/tabi/index.ca.md):
```toml
title = "tabi"
@ -222,16 +413,61 @@ Quan un usuari faci clic a la imatge o al títol d'un projecte, serà portat a l
La pàgina del projecte individual es renderitza amb la plantilla predeterminada, tret que estableixis una altra, per exemple, `template = "info-page.html"`.
### Archivo
#### Filtrar projectes
Agregar una página de archivo es similar a agregar una página de proyectos. Puedes crear un directorio en `content/archive/`. Allí, puedes crear un archivo `_index.md` con el siguiente bloque de metadatos:
Si afegeixes etiquetes als teus projectes, veuràs un filtre d'etiquetes:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/projects_tag_filter_light.webp", dark_src="blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp", alt="Pàgina de projectes amb filtre d'etiquetes", full_width=true) }}
El sistema de filtratge d'etiquetes utilitza millora progressiva:
- Sense JavaScript: Les etiquetes enllacen directament a pàgines d'etiquetes dedicades (per exemple, `/tags/nom-de-l-etiqueta`).
- Amb JavaScript: Filtratge instantani, sincronització d'URL (#nom-etiqueta) i navegació amb el teclat.
Per desactivar aquesta funció, estableix `enable_cards_tag_filtering = false` a la secció `[extra]` del fitxer `projects/_index.md` o a `config.toml`.
{% admonition(type="tip") %}
Per filtrar projectes per etiquetes, necessites establir etiquetes a la front matter de cada projecte. Per exemple:
```toml
title = "Archivo"
title = "nom del projecte"
weight = 40
[taxonomies]
tags = ["etiqueta", "etiqueta 2", "tercera etiqueta"]
```
{% end %}
### Arxiu
Afegir una pàgina d'arxiu és similar a afegir una pàgina de projectes. Pots crear un directori a `content/archive/`. Allà, pots crear un fitxer `_index.md` amb el següent encapçalament:
```toml
title = "Arxiu"
template = "archive.html"
```
De forma predeterminada, el archivo listará las publicaciones ubicadas en `/blog/`. Si deseas cambiar esto, puedes establecer `section_path = "/otra-ruta/"` en la sección `[extra]` del archivo `_index.md`. Asegúrate de incluir la barra inclinada al final.
Per defecte, l'arxiu llistarà les publicacions situades a `blog/`. Per personalitzar això, pots modificar la secció `[extra]` de l'arxiu `_index.md`:
- **Per a un sol directori**: Estableix `section_path = "directori/"` per llistar publicacions d'un directori específic. Assegura't d'incloure la barra inclinada al final.
- **Per a múltiples directoris**: Si vols agregar publicacions de diversos directoris, especifica la llista a `section_path`. Per exemple:
```toml
[extra]
section_path = ["blog/", "notes/", "camí-tres/"]
```
L'arxiu mostra les publicacions en ordre cronològic invers (les més recents primer). Pots invertir aquest ordre establint `archive_reverse = true` a la secció `[extra]`:
```toml
[extra]
archive_reverse = true # mostra les publicacions més antigues primer
```
{{ admonition(type="note", title="nota" text="La pàgina d'arxiu només llistarà publicacions que tinguin data al seu encapçalament.") }}
### Etiquetes
@ -280,6 +516,17 @@ path = "about"
Fixa't com s'estableix `path = "about"`. Zola situarà la pàgina a `$base_url/about/`. Si vols que la pàgina estigui disponible a `/contacte/`, hauries d'establir `path = "contacte"`.
La plantilla `info-page.html` també es pot utilitzar per crear landing pages a la ruta arrel (`"/"`). Per fer-ho, l'arxiu `content/_index.md` hauria de ser així:
```markdown
+++
title = "Títol de la pàgina"
template = "info-page.html"
+++
Contingut amb Markdown.
```
---
## SEO
@ -328,7 +575,7 @@ Per exemple, si configures `base_canonical_url = "https://example.com"`, l'URL c
Les targetes per a xarxes socials són les imatges que es mostren quan comparteixes un enllaç a les xarxes socials:
![Una captura de pantalla de WhatsApp mostrant un enllaç amb una targeta per a xarxes socials](/blog/mastering-tabi-settings/img/with_social_media_card.webp)
{{ dimmable_image(src="img/with_social_media_card.webp", alt="Una captura de pantalla de WhatsApp mostrant un enllaç amb una targeta per a xarxes socials") }}
Pots establir la imatge per a xarxes socials amb `social_media_card = "img/social_media_card.png"`.
@ -342,7 +589,19 @@ Si ambdues rutes, relativa i absoluta, són vàlides, la ruta relativa tindrà p
Ja que segueix la [jerarquia](#jerarquia-de-configuracio), si no està configurat en una pàgina, però sí ho està en una secció, s'utilitzarà la imatge de la secció. Si no està configurat en una pàgina o secció, però sí en `config.toml`, s'utilitzarà la imatge global.
**Consell**: automatitza la seva creació amb un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [De reservat a rei de les xarxes: automatitzant les vistes prèvies dels enllaços amb Zola](https://osc.garden/ca/blog/automating-social-media-cards-zola/).
{{ admonition(type="tip", title="CONSELL", text="Automatitza la seva creació amb un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [Automatitzant les vistes prèvies dels enllaços amb Zola](https://osc.garden/ca/blog/automating-social-media-cards-zola/).") }}
### Creador del fedivers
| Pàgina | Secció | `config.toml` | Segueix jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:-----------------:|:--------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
Pots mostrar el perfil del fedivers de l'autor en les previsualitzacions d'enllaços de Mastodon configurant la variable `fediverse_creator` al teu `config.toml`. Per exemple, per a @username@example.com, fes servir:
```toml
fediverse_creator = { handle = "username", domain = "example.com" }
```
---
@ -354,7 +613,9 @@ Ja que segueix la [jerarquia](#jerarquia-de-configuracio), si no està configura
|:------:|:------:|:-------------:|:---------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
La barra de navegació és la franja a la part superior de la pàgina que conté el títol del lloc i el menú de navegació. Pots personalitzar els elements que apareixen configurant `menu` en `config.toml`. Per exemple:
La barra de navegació és la franja a la part superior de la pàgina que conté el títol del lloc i el menú de navegació. Pots personalitzar els elements que apareixen configurant `menu` en `config.toml`.
Soporta links relatius per a pàgines internes i links absoluts per a enllaços externs. Per exemple:
```toml
menu = [
@ -363,6 +624,7 @@ menu = [
{ name = "etiquetes", url = "tags", trailing_slash = true },
{ name = "projectes", url = "projects", trailing_slash = true },
{ name = "sobre nosaltres", url = "about", trailing_slash = true },
{ name = "github", url = "https://github.com/welpo/tabi", trailing_slash = false },
]
```
@ -386,10 +648,31 @@ Per activar-los, estableix `quick_navigation_buttons = true`.
Activa l'índex de continguts just sota del títol i metadades de l'article amb `toc = true`.
Per saber més sobre com personalitzar-ho, consulta [la documentació sobre la Taula de continguts](/ca/blog/toc/).
Per saber més sobre com personalitzar-ho, consulta [la documentació sobre la Taula de continguts](@/blog/toc/index.ca.md).
### Enllaços als articles anterior i següent
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:--------------------:|:--------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Mostra enllaços als articles anterior i següent a la part inferior dels posts. Es veu així:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_light.webp", dark_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_dark.webp", alt="Enllaços als articles anterior i següent", full_width=true) }}
Per activar aquesta funció, estableix `show_previous_next_article_links = true` i assegura't que la secció té un valor `sort_by` (per exemple `sort_by = "date"`).
Per defecte, els articles següents estaran al costat esquerre de la pàgina i els articles anteriors al costat dret.
Per invertir l'ordre (articles següents al costat dret i articles anteriors al costat esquerre), configura `invert_previous_next_article_links = true`.
Per defecte, aquesta secció de navegació tindrà l'amplada completa del lloc (igual que la barra de navegació de la part superior). Per fer-la més estreta, coincidint amb l'amplada de l'article, configura `previous_next_article_links_full_width = false`.
Totes aquestes configuracions segueixen la jerarquia.
### Enllaços de retorn a les notes a peu de pàgina
{{ admonition(type="warning", title="ADVERTÈNCIA DE DEPRECACIÓ", text="Zola v0.19.0 i posterior pot fer això de forma nativa. Estableix `bottom_footnotes = true` a la secció `[markdown]` de la teva configuració.") }}
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:------------------:|:--------------------:|
| ✅ | ✅ | ✅ | ✅ | ✅ |
@ -414,6 +697,22 @@ Establir `copy_button = true` afegirà un petit botó de copiar a la part superi
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_light.webp", dark_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_dark.webp", alt="Botó de copiar en blocs de codi", full_width=true) }}
### Nom del bloc de codi clicable
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ✅ |
En establir `code_block_name_links = true` s'habiliten els enllaços clicables als noms dels blocs de codi. Consulta la [documentació](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url) per veure exemples i ús.
### Forçar blocs de codi d'esquerra a dreta
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:-----------------:|:--------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Per defecte, els blocs de codi es renderitzen d'esquerra a dreta, independentment de la direcció general del text. Estableix `force_codeblock_ltr = false` per permetre que els blocs de codi segueixin la direcció del document. Útil per a idiomes de dreta a esquerra que necessiten blocs de codi de dreta a esquerra.
### Suport per a KaTeX
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
@ -422,17 +721,31 @@ Establir `copy_button = true` afegirà un petit botó de copiar a la part superi
KaTeX és una biblioteca JavaScript ràpida i fàcil d'usar per a la representació de matemàtiques TeX a la web. Pots habilitar-ho amb `katex = true`. Mira com es veu en tabi [aquí](/ca/blog/markdown/#katex).
### Suport per a Mermaid
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:-----------------:|:--------------------:|
| ✅ | ✅ | ✅ | ✅ | ✅ |
[Mermaid](https://github.com/mermaid-js/mermaid) és una eina de diagramació i gràfics basada en JavaScript. Pots activar-la amb `mermaid = true`.
Per defecte, la biblioteca Mermaid es serveix localment. Si prefereixes utilitzar un CDN, estableix `serve_local_mermaid = false` a `config.toml`. L'ús d'un CDN servirà la versió més recent de Mermaid; l'opció local servirà la versió inclosa amb tabi.
Consulta la [documentació de Mermaid](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid) per a instruccions d'ús i exemples.
### Subconjunt de tipus de lletra personalitzat
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:------------------:|:--------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
Les tipus de lletra personalitzades causen parpalleig del text en Firefox. Per resoldre això, tabi carrega un subconjunt de glifs per a la capçalera. Donat que això (lleugerament) augmenta el temps de càrrega inicial, és una bona idea intentar minimitzar la mida d'aquest subconjunt.
Les tipus de lletra personalitzades causen parpalleig del text en Firefox. Per resoldre això, tabi carrega un subconjunt de glifs per a la capçalera. Donat que això (lleugerament) augmenta el temps de càrrega inicial, és una bona idea intentar minimitzar la mida d'aquest subconjunt, o desactivar-lo completament si no estàs fent servir un tipus de lletra personalitzat al teu tema.
Pots crear un subconjunt personalitzat adaptat al teu lloc, guardar-lo com a `static/custom_subset.css`, i fer que es carregui amb `custom_subset = true`.
Per obtenir més informació, incloent instruccions sobre com crear un subconjunt personalitzat, consulta la [documentació](/ca/blog/custom-font-subset/).
Per desactivar el subconjunt, utilitza `enable_subset = false`.
Per obtenir més informació, incloent instruccions sobre com crear un subconjunt personalitzat, consulta la [documentació](@/blog/custom-font-subset/index.ca.md).
### Contingut complet al feed
@ -448,7 +761,10 @@ Per defecte, el feed Atom només conté el resum o descripció de les teves publ
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Pots amagar pàgines específiques o seccions senceres del feed amb `hide_from_feed = true`.
Pots controlar com apareix el contingut als feeds utilitzant dues configuracions:
- `hide_from_feed = true`: Amaga el contingut de tots els feeds (feed principal, feeds de secció i feeds d'etiquetes)
- `hide_from_main_feed = true`: Amaga el contingut només del feed principal mentre el manté visible als feeds de secció i d'etiquetes
### Comentaris {#afegir-comentaris}
@ -462,7 +778,36 @@ Si vols activar els comentaris de forma global, pots fer-ho establint `enabled_f
Si has activat un sistema de forma global i vols desactivar-lo per a una pàgina específica, pots fer-ho establint el nom del sistema com a `false` al front matter. Per exemple, `utterances = false`.
Llegeix la [documentació](/ca/blog/comments/) per a més informació sobre els sistemes disponibles i la seva configuració.
Llegeix la [documentació](@/blog/comments/index.ca.md) per a més informació sobre els sistemes disponibles i la seva configuració.
### Botons d'iine {#iine}
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:--------------------:|:--------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
tabi permet botons d'[iine](https://iine.to/) per mostrar apreciació anònima pel teu contingut. Aquests botons centrats en la privadesa funcionen sense JavaScript i no rastegen usuaris.
Per activar els botons iine globalment:
```toml
[extra]
iine = true
```
Pots personalitzar la icona usada als botons (segueix la jerarquia):
```toml
[extra]
iine_icon = "thumbs_up" # Opcions: "heart", "thumbs_up", "upvote", o qualsevol emoji
```
Per a llocs multilingües, pots unificar els recomptes de likes entre versions en diferents idiomes del mateix contingut (configuració només de config; valor per defecte és `true`):
```toml
[extra]
iine_unified_languages = true # Els likes a /ca/blog/hello/ compten cap a /blog/hello/
```
### Anàlisi web
@ -477,7 +822,7 @@ Pots configurar-los en la secció `[extra.analytics]` del teu arxiu `config.toml
- `service`: el servei a utilitzar. Les opcions disponibles són `"goatcounter"`, `"umami", i "plausible"`.
- `id`: l'identificador únic per al teu servei d'anàlisi. Això varia segons el servei:
- Per a GoatCounter, és el codi triat durant el registre. Instàncies auto-allotjades no requereixen aquest camp.
- Per a GoatCounter, és el codi triat durant el registre. Instàncies auto-allotjades de GoatCounter no requereixen aquest camp.
- Per a Umami, és l'ID del lloc web.
- Per a Plausible, és el nom de domini.
@ -486,6 +831,8 @@ Pots configurar-los en la secció `[extra.analytics]` del teu arxiu `config.toml
- Per a Umami: `"https://umami.example.com"`
- Per a Plausible: `"https://plausible.example.com"`
- `do_not_track`: (només per a Umami) opcional. Quan s'estableix com a `true`, es desactiva el seguiment per als usuaris els navegadors dels quals envien una capçalera "Do Not Track".
Un exemple de configuració per a GoatCounter no auto-allotjada seria:
```toml
@ -493,9 +840,7 @@ Un exemple de configuració per a GoatCounter no auto-allotjada seria:
service = "goatcounter"
id = "tabi"
self_hosted_url = ""
---
```
## Icones al peu de pàgina
@ -517,7 +862,17 @@ socials = [
]
```
Le icones provenen de Font Awesome. Per veure una llista de tots els icones disponibles, fes una ullada al [directori `static/social_icons`](https://github.com/welpo/tabi/tree/main/static/social_icons).
Per veure una llista de totes les icones integrades, fes un cop d'ull al directori [`static/social_icons` a GitHub](https://github.com/welpo/tabi/tree/main/static/social_icons).
Trobes a faltar algun icona? Si creus que seria una bona addició a tabi, no dubtis en [obrir un issue](https://github.com/welpo/tabi/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=) o enviar una pull request ([exemple](https://github.com/welpo/tabi/pull/333)).
Per utilitzar una icona personalitzada, pots afegir-la al directori `static/social_icons` del teu lloc web. Per exemple, si afegeixes `custom.svg`, la pots referenciar així:
```
{ name = "custom", url = "https://example.com", icon = "custom" }
```
{{ admonition(type="note", title="NOTA", text="Tots els enllaços a xarxes socials inclouen l'[atribut](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me) `rel='me'`. Això ajuda els motors de cerca i serveis web a verificar que les comptes de xarxes socials et pertanyen.") }}
### Icona de feed
@ -527,6 +882,8 @@ Le icones provenen de Font Awesome. Per veure una llista de tots els icones disp
Pots afegir un enllaç al teu feed RSS/Atom al peu de pàgina amb `feed_icon = true`.
Nota pels usuaris de Zola 0.19.X: quan hi ha dos noms de fitxer a `feed_filenames`, només s'enllaçarà el primer al peu de pàgina.
#### Menú de peu de pàgina
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
@ -575,6 +932,16 @@ copyright_translations.es = "© $CURRENT_YEAR $AUTHOR $SEPARATOR A menos que se
## Metadades
### Mostrar autoria
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:-------:|:-------------:|:---------------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Per mostrar l'autoria d'un article, estableix `show_author = true`.
Això mostrarà els autors establerts a la variable `authors = []` al front matter del post. Si aquest camp no està configurat, mostrarà l'autor de `config.toml` (`author = ""`).
### Temps de lectura
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
@ -587,18 +954,39 @@ Pots activar o desactivar el temps estimat de lectura d'un article amb `show_rea
Com que segueix [la jerarquia](#jerarquia-de-configuracio), pots activar-lo o desactivar-lo per a pàgines o seccions específiques. Per exemple, aquesta demo desactiva `show_reading_time = false` a la secció [projectes](https://welpo.github.io/tabi/ca/projects/) a l'arxiu [`_index.md`](https://github.com/welpo/tabi/blob/main/content/projects/_index.es.md?plain=1), de manera que les seves publicacions individuals no mostren el temps de lectura.
### Mostrar la data
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:--------------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Per defecte, la data es mostra sota el títol de la publicació. Pots amagar-la amb `show_date = false`. Aquest ajust segueix [la jerarquia](#jerarquia-de-configuracio).
### Format de data
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:-------:|:-------------:|:---------------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
tabi té dos formats de data: `long_date_format` i `short_date_format`. El format curt s'utilitza a les metadades d'una publicació, mentre que el format llarg s'utilitza al llistar les publicacions (és a dir, a la [secció de blog](/ca/blog/) o a la [pàgina principal](/ca/)).
tabi té tres formats de data: `long_date_format`, `short_date_format` i `archive_data_format`. El format curt s'utilitza a les metadades d'una publicació, mentre que el format llarg s'utilitza al llistar les publicacions (és a dir, a la [secció de blog](/ca/blog/) o a la [pàgina principal](/ca/)). El format d'arxiu s'utilitza per mostrar el dia i el mes a la pàgina d'arxiu.
Per defecte és "6th July 2049" per a ambdós formats en anglès. Per a altres idiomes, el predeterminat és `"%d %B %Y"` per al format llarg i `"%-d %b %Y"` per al format curt.
Per defecte és "6th July 2049" per als formats curt i llarg en anglès. Per a altres idiomes, el predeterminat és `"%d %B %Y"` per al format llarg i `"%-d %b %Y"` per al format curt. El format d'arxiu predeterminat universal és `"%d %b"`.
A Zola, la sintaxi per al format de temps està inspirada en strftime. Una referència completa està disponible a la [documentació de chrono](https://docs.rs/chrono/0.4.31/chrono/format/strftime/index.html).
#### Formats de data per idioma
Pots personalitzar els formats de data per idiomes específics utilitzant la matriu `date_formats` a `config.toml`:
```toml
date_formats = [
{ lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" },
{ lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" },
]
```
Això permet que diferents idiomes utilitzin formats de data culturalment apropiats (per exemple, "6. Juli 2049" per a alemany VS "6 de julio de 2049" per a espanyol).
### Separador personalitzat
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
@ -657,7 +1045,69 @@ allowed_domains = [
]
```
Per a més informació, consulta la [pàgina de documentació de CSP](/ca/blog/security/).
Aquesta opció està habilitada per defecte. Per desactivar-la per una pàgina, secció o globalment, estableix `enable_csp = false`. La configuració de `enable_csp` segueix la jerarquia.
Per a més informació, consulta la [pàgina de documentació de CSP](@/blog/security/index.ca.md).
---
## Indieweb
### Webmentions
| Pàgina | Secció | `config.toml` | Segueix jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:-----------------:|:--------------------:|
| ❓ | ❓ | ✅ | ❓ | ✅ |
Com es descriu en l'estàndard W3C recomanat, [Webmention](https://www.w3.org/TR/webmention/#abstract-p-1) és una manera senzilla de notificar qualsevol URL quan la menciones al teu lloc web. Des de la perspectiva del receptor, és una manera de sol·licitar notificacions quan altres llocs web la mencionen.
Per a llocs web estàtics, [webmention.io](https://webmention.io/) allotja un punt final de webmention que es pot utilitzar per rebre webmentions. Aquesta funcionalitat recupera les webmentions emmagatzemades a webmention.io i les mostra per a una pàgina. Hauràs de configurar un compte per al teu lloc web a webmention.io. Quan habilitis la funcionalitat de webmention, anunciarà el teu punt final de webmention.io i mostrarà les webmentions per a qualsevol pàgina.
Habilita les webmentions per al teu lloc web afegint el següent al teu fitxer `config.toml`.
```toml
[extra.webmentions]
enable = true
# Especifica el domini registrat amb webmention.io.
domain = "www.example.com"
```
❓: Per desactivar les webmentions per a una secció o pàgina específica, estableix `webmentions = false` a la secció `[extra]` del front matter d'aquesta secció o pàgina.
La secció de webmentions es veu així:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Captura de pantalla de webmentions mostrant republications, m'agrada, marcadors i comentaris", full_width=true) }}
### h-card representativa
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
| :--: | :-----: | :-----------: | :---------------: | :-----------------: |
| ❌ | ❌ | ✅ | ❌ | ❌ |
Per defecte, tabi afegeix una h-card representativa [h-card](https://microformats.org/wiki/h-card) **oculta** a la pàgina d'inici. Tot i que és invisible per als visitants, està disponible per als analitzadors de microformats. Pots comprovar la validesa de la targeta amb l'eina [Indiewebify.me](https://indiewebify.me/validate-h-card/).
Per desactivar l'h-card, estableix `enable = false` a la secció `[extra.hcard]` de `config.toml`.
L'h-card predeterminada inclou el teu nom, l'URL del lloc web i els enllaços a les xarxes socials.
Pots establir una imatge de perfil i una petita biografia amb els paràmetres `avatar` i `biography`.
Totes les altres [propietats h-card](https://microformats.org/wiki/h-card#Properties) es poden afegir llistant-les a la secció `[extra.hcard]` del fitxer de configuració. Simplement substitueix tots els caràcters `-` per `_`.
---
## Estenent elements HTML a tabi
Alguns elements HTML a tabi es poden estendre per admetre casos d'ús addicionals, com ara afegir JavaScript personalitzat per a comportaments a tot el lloc al final de l'etiqueta `<body>` o incloure contingut addicional al final de l'element `<head>` que no estigui suportat per altres configuracions de tabi.
Consulta la taula a continuació per veure els elements que es poden estendre:
| Element | Plantilla |
| :------: | :-------------------------------: |
| `<head>` | `templates/tabi/extend_head.html` |
| `<body>` | `templates/tabi/extend_body.html` |
No hi ha configuracions explícites que hagis d'establir per al teu lloc o pàgines. Simplement crea el fitxer de plantilla corresponent per al teu lloc, i tabi l'inclourà automàticament.
---

View file

@ -1,20 +1,19 @@
+++
title = "Domina la configuración de tabi: guía completa"
date = 2023-09-18
updated = 2023-12-04
updated = 2025-08-07
description = "Descubre las múltiples maneras en que puedes personalizar tabi."
[taxonomies]
tags = ["funcionalidad", "tutorial", "preguntas frecuentes"]
[extra]
giscus = true
footnote_backlinks = true
pinned = true
quick_navigation_buttons = true
social_media_card = "social_cards/es_blog_mastering_tabi_settings.jpg"
+++
Esta es la guía completa sobre la configuración en tabi. Si tienes alguna pregunta, puedes usar los [comentarios](#comments) al final de esta página o [abrir un issue en GitHub](https://github.com/welpo/tabi/issues/new).
Esta es la guía completa sobre la configuración en tabi. Si tienes alguna pregunta, puedes [abrir un issue en GitHub](https://github.com/welpo/tabi/issues/new) o [inciar una discusión](https://github.com/welpo/tabi/discussions).
<details>
<summary><b>Tabla de contenido</b></summary>
@ -27,15 +26,69 @@ tabi tiene una jerarquía que te permite personalizar tu sitio en diferentes niv
1. **Configuraciones globales**: Estas son las configuraciones que se aplican a todo tu sitio. Se establecen en `config.toml`.
2. **Configuraciones de sección**: Estas son las configuraciones que se aplican a una sección de tu sitio (por ejemplo, `/blog` o `/projects`). Se establecen en la metainformación del archivo `_index.md` de la sección.
3. **Configuraciones de página**: Estas son las configuraciones que se aplican a una sola página. Se establecen en la metainformación de la página.
3. **Configuración de la página «padre»**: Para páginas anidadas (páginas dentro de páginas), estas son las configuraciones de la página que las contiene.
4. **Configuraciones de página**: Estas son las configuraciones que se aplican a una sola página. Se establecen en la metainformación de la página.
En todos los casos, las opciones de tabi se establecen en la sección `[extra]`.
Para las configuraciones que siguen esta jerarquía, el valor establecido en una página reemplaza el valor de una sección, que a su vez reemplaza el valor global. En resumen: cuanto más específica sea la configuración, mayor prioridad tendrá, o `página > sección > config.toml`.
Para las configuraciones que siguen esta jerarquía, el valor establecido en una página reemplaza el valor de una sección, que a su vez reemplaza el valor global. En resumen: cuanto más específica sea la configuración, mayor prioridad tendrá, o `página > página padre/sección > config.toml`.
---
## Búsqueda
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ✅ |
tabi soporta búsqueda local accesible y multilingüe con [Elasticlunr](http://elasticlunr.com/). Para activarla, necesitas:
1. Establecer un `default_language` en `config.toml`.
2. Establecer `build_search_index = true`.
3. Opcionalmente, configurar la sección `[search]`.
Por ejemplo:
```toml
base_url = "https://example.com"
default_language = "en"
build_search_index = true
[search]
index_format = "elasticlunr_json" # O el menos eficiente "elasticlunr_javascript".
include_title = true
include_description = true
include_path = true
include_content = true
```
**Nota**: para soporte de búsqueda en Chino/Japonés, necesitas usar una [build personalizada de Zola](https://github.com/getzola/zola/blob/master/Cargo.toml#L54-L55).
### Consideraciones para usuarios de Zola 0.17.X
Zola 0.17.X no proporciona acceso a la variable `search.index_format` ([reporte del bug](https://github.com/getzola/zola/issues/2165)). Al usar tabi, se asume el uso del índice JSON, que es más eficiente. Sin embargo, debido a [otro bug](https://github.com/getzola/zola/issues/2193) solucionado en 0.18.0, el índice JSON para sitios multilingües no se genera correctamente.
Los usuarios con versiones de Zola anteriores a 0.18.0 que quieran usar el índice JavaScript necesitan establecer la variable `index_format` en dos lugares:
```toml
[search]
index_format = "elasticlunr_javascript"
[extra]
index_format = "elasticlunr_javascript"
```
Esto asegura que tabi cargue los archivos correctos. Recomendamos actualizar a Zola 0.18.0 o posterior para una funcionalidad óptima.
### Detalles de implementación
Para detalles técnicos sobre la implementación de la búsqueda en tabi, incluyendo cuándo se carga el índice, características de accesibilidad y otros detalles, consulta el [Pull Request #250](https://github.com/welpo/tabi/pull/250).
---
## Soporte multilingüe
tabi ofrece soporte multilingüe completo para tu sitio Zola, desde configurar un idioma predeterminado hasta añadir todos los que desees. Consulta la [preguntas frecuentes sobre idiomas](/es/blog/faq-languages/) para más información.
tabi ofrece soporte multilingüe completo para tu sitio Zola, desde configurar un idioma predeterminado hasta añadir todos los que desees. Consulta la [preguntas frecuentes sobre idiomas](@/blog/faq-languages/index.es.md) para más información.
---
@ -47,6 +100,8 @@ La [página principal](/) de esta demo tiene un encabezado con una imagen, un t
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/header_light.webp", dark_src="blog/mastering-tabi-settings/img/header_dark.webp", alt="Encabezado de la página principal") }}
#### Cabecera
Para configurar la imagen y el título, puedes usar la variable `header` en el front matter del archivo `_index.md` de la sección. Por ejemplo:
```toml
@ -56,35 +111,92 @@ header = {title = "¡Hola! Soy tabi~", img = "blog/mastering-tabi-settings/img/m
La descripción es contenido Markdown normal, escrito fuera del front matter.
Si deseas mostrar publicaciones en la página principal, primero necesitas decidir si su ruta será `/` o algo como `/blog`.
#### Listando publicaciones recientes
Si quieres servir las publicaciones desde `/`, necesitas configurar `paginate_by = 5` en el front matter de tu archivo `_index.md`. **Nota**: esto no se configura en el apartado `[extra]`, sino en el front matter principal. Ejemplo:
Para mostrar publicaciones en la página principal, primero debes decidir de dónde se servirán: de la ruta raíz (`/`) o de un subdirectorio (por ejemplo, `/blog`).
**Opción A: Servir publicaciones desde la ruta raíz (`/`)**
Configura `paginate_by` en el front matter de tu archivo `content/_index.md`:
```toml
title = "Últimas publicaciones"
sort_by = "date"
template = "section.html"
paginate_by = 5
paginate_by = 5 # Muestra 5 publicaciones por página.
[extra]
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, el autor del tema" }
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Tu nombre" }
```
Si prefieres servir las publicaciones desde `/blog`, puedes configurar `section_path = "/blog"` en la sección `[extra]`. Esta es la configuración de esta demo:
{{ admonition(type="note", text="La configuración `paginate_by` va en el front matter principal, no en la sección `[extra]`.") }}
**Opción B: Servir publicaciones desde un subdirectorio (por ejemplo, `/blog`)**
Utiliza `section_path` en la sección `[extra]` de tu archivo `content/_index.md`:
```toml
title = "Publicaciones recientes"
title = "Últimas publicaciones"
sort_by = "date"
template = "section.html"
# No configures `paginate_by` aquí.
[extra]
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, el autor del tema" }
section_path = "blog/_index.es.md"
max_posts = 4
header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Tu nombre" }
section_path = "blog/_index.md" # Dónde encontrar tus publicaciones.
max_posts = 5 # Muestra hasta 5 publicaciones en la página principal.
```
Fíjate que si configuras `section_path`, no necesitas configurar `paginate_by`. Puedes establecer `max_posts` para determinar el número de publicaciones que deseas mostrar en la página principal.
{{ admonition(type="warning", title="ALERTA", text="No configures `paginate_by` y `section_path` a la vez. Estas configuraciones son mutuamente excluyentes y usarlas juntas puede resultar en que no se muestren publicaciones.") }}
El `title` es el encabezado que aparece sobre las publicaciones.
Notas adicionales:
- El `title` en el front matter establece el título que aparece sobre las publicaciones.
- Usa la ruta completa al archivo `_index.md` de la sección para `section_path`. Usar `section_path = "blog/"` no funcionará.
##### Fijar publicaciones
Puedes fijar publicaciones para mantenerlas en la parte superior de la página principal. En esta demo, esta publicación está fijada, por lo que aparece primera con un icono y etiqueta de "fijada":
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/pinned_post_light.webp", dark_src="blog/mastering-tabi-settings/img/pinned_post_dark.webp", alt="Entrada fijada", full_width=true) }}
Las publicaciones fijadas se muestran primero, manteniendo su orden relativo según el `sort_by` de la sección, seguidas por el resto de las publicaciones.
Para fijar una publicación, añade lo siguiente a su front matter:
```toml
[extra]
pinned = true
```
{{ admonition(type="info", text="Este ajuste solo afecta a las páginas principales del sitio (como `/`, `/es/`, `/fr/`). Otras secciones como `blog/`, `tags/` o `archive/` muestran las publicaciones en su orden habitual.") }}
{{ admonition(type="warning", text='Cuando se utiliza la paginación (`paginate_by`), las publicaciones destacadas pueden aparecer dos veces: una vez en la parte superior de la primera página, y otra en su posición cronológica normal en páginas posteriores.') }}
##### Mostrar la fecha de los artículos en el listado
Por defecto, cuando se listan los artículos, se muestra la fecha de creación. Puedes configurar qué fecha(s) mostrar usando la opción `post_listing_date`. Configuraciones disponibles:
- `date`: Muestra solo la fecha de publicación original del artículo (opción por defecto).
- `updated`: Muestra solo la fecha de la última actualización del artículo. Si no hay fecha de actualización, muestra la fecha de publicación original.
- `both`: Muestra tanto la fecha de publicación original como la fecha de la última actualización.
{% admonition(type="tip") %}
Esta configuración sigue la jerarquía: puedes establecer un valor global en `config.toml` o configurarlo para secciones específicas en su archivo `_index.md`. En ambos casos, añádelo a la sección `[extra]`.
{% end %}
#### Listado de proyectos
Puedes mostrar una selección de proyectos en tu página principal. Para hacer esto, primero necesitarás configurar el directorio `projects`.
Una vez hecho esto, configura la ruta a los proyectos en la sección `[extra]` de tu archivo `_index.md`:
```toml
[extra]
projects_path = "projects/_index.md"
```
Esto mostrará los 3 proyectos de mayor prioridad (con menor peso; el mismo orden que en Proyectos). Para mostrar más o menos proyectos, puedes establecer `max_projects` en `[extra]`.
Por defecto, la sección de proyectos se mostrará en la parte inferior de la página principal, bajo los posts. Si prefieres que aparezca en la parte superior, establece `show_projects_first = true`.
### Interruptor de modo claro y oscuro
@ -112,7 +224,38 @@ Las pieles de tabi cambian el color principal del sitio. Puedes configurar la pi
{{ image_toggler(default_src="blog/customise-tabi/skins/lavender_light.webp", toggled_src="blog/customise-tabi/skins/lavender_dark.webp", default_alt="piel lavender en modo claro", toggled_alt="piel lavender en modo oscuro", full_width=true) }}
Explora las pieles disponibles y aprende cómo crear la tuya propia consultando [la documentación](/es/blog/customise-tabi/#skins).
Explora las pieles disponibles y aprende cómo crear la tuya propia consultando [la documentación](@/blog/customise-tabi/index.es.md#skins).
### Fuente sans serif (paloseco)
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
tabi utiliza una fuente serif para los párrafos de los artículos (la que estás viendo ahora). Puedes cambiar a una fuente sans serif (la que ves en los encabezados/menú) en todo tu sitio configurando `override_serif_with_sans = true` en `config.toml`.
Haz clic en la imagen para comparar las fuentes:
{{ image_toggler(default_src="blog/mastering-tabi-settings/img/serif.webp", toggled_src="blog/mastering-tabi-settings/img/sans-serif.webp", default_alt="Fuente serif", toggled_alt="Fuente sans-serif", full_width=true) }}
### Indicador de enlaces externos
| Página | Sección | `config.toml` | Sigue Jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:----------------:|:------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
{{ admonition(type="info", text="Requiere Zola 0.20.0 o posterior.") }}
Si deseas añadir un icono a los enlaces externos, configura la sección `[markdown]` (no `[extra]`) en tu `config.toml`:
```toml
[markdown]
external_links_class = "external"
```
Esto añadirá un pequeño icono junto a los enlaces externos:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/external_link_light.webp", dark_src="blog/mastering-tabi-settings/img/external_link_dark.webp", alt="Icono de enlace externo", full_width=true) }}
### Estilos CSS personalizados
@ -134,12 +277,63 @@ stylesheets = ["css/custom.css", "css/another.css"]
El color del tema del navegador es el color que aparece en la barra de pestañas del navegador:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/browser_theme_colour_light.webp", dark_src="blog/mastering-tabi-settings/img/browser_theme_colour_dark.webp" alt="pestañas con un tema de navegador de color") }}
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/browser_theme_color_light.webp", dark_src="blog/mastering-tabi-settings/img/browser_theme_color_dark.webp" alt="pestañas con un tema de navegador de color") }}
Puedes establecerlo en `config.toml` como `browser_theme_colour = "#087e96"`. Si deseas diferentes colores para los modos oscuro/claro, puedes establecer un conjunto de colores con `browser_theme_colour = ["#ffffff", "#000000"]`. El primer color es para el modo claro, el segundo para el oscuro.
Puedes establecerlo en `config.toml` como `browser_theme_color = "#087e96"`. Si deseas diferentes colores para los modos oscuro/claro, puedes establecer un conjunto de colores con `browser_theme_color = ["#ffffff", "#000000"]`. El primer color es para el modo claro, el segundo para el oscuro.
Esta variable acepta cualquier color CSS válido, así que puedes usar palabras clave (por ejemplo, `blue`), códigos hexadecimales (por ejemplo, `#087e96`) o valores RGB/HSL (por ejemplo, `rgb(8, 126, 150)`).
### Etiquetas compactas
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
Por defecto, la [página de etiquetas](/es/tags) muestra las etiquetas así:
[NombreEtiqueta](#) — n publicación[es]
Establecer `compact_tags = true` mostrará las mismas de este modo:
[NombreEtiqueta](#) <sup>n</sup>
### Orden de las etiquetas
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
Por defecto, la [página de etiquetas](/es/tags) ordena las etiquetas alfabéticamente, dada la configuración predeterminada de `tag_sorting = "name"`.
Si configuras `tag_sorting = "frequency"`, se ordenarán según el número de publicaciones (de mayor a menor).
---
## Series
Para una explicación detallada, consulta la [documentación de series](@/blog/series/index.es.md).
### Enlace para saltar a las publicaciones
| Página | Sección | `config.toml` | Sigue jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
| ❌ | ✅ | ✅ | ✅ | ❌ |
Por defecto, aparece automáticamente un enlace "Saltar a publicaciones" junto al título de la serie cuando una serie tiene un contenido de más de 2000 caracteres:
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enlace para saltar a las publicaciones de la serie", full_width=true) }}
Establece `show_jump_to_posts = true` para forzar la activación de la función y `show_jump_to_posts = false` para desactivarla.
### Indexación de páginas de series
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
| ❌ | ✅ | ✅ | ✅ | ❌ |
Por defecto, las páginas de series se indexan (usando una indexación basada en 1) según el `sort_by` de la sección de series.
Establece `post_listing_index_reversed = true` para invertir el índice.
---
## Integración con repositorios Git
@ -200,7 +394,7 @@ quick_navigation_buttons = true
- `show_reading_time = false` oculta el tiempo estimado de lectura.
- `quick_navigation_buttons = true` muestra los botones de navegación rápida.
Junto al archivo `_index.md`, puedes crear un archivo para cada proyecto. Por ejemplo, este es el bloque de metadatos para la página del proyecto [tabi](/es/projects/tabi/):
Junto al archivo `_index.md`, puedes crear un archivo para cada proyecto. Por ejemplo, este es el bloque de metadatos para la página del proyecto [tabi](@/projects/tabi/index.es.md):
```toml
title = "tabi"
@ -220,16 +414,61 @@ Cuando un usuario haga clic en la imagen o el título de un proyecto, será llev
La página del proyecto individual se renderiza con la plantilla predeterminada, a menos que establezcas otra, por ejemplo, `template = "info-page.html"`.
#### Filtrar proyectos
Si agregas etiquetas a tus proyectos, verás un filtro de etiquetas:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/projects_tag_filter_light.webp", dark_src="blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp", alt="Página de proyectos con filtro de etiquetas", full_width=true) }}
El sistema de filtrado de etiquetas utiliza mejora progresiva:
- Sin JavaScript: Las etiquetas enlazan directamente a páginas de etiquetas dedicadas (por ejemplo, `/tags/nombre-etiqueta`).
- Con JavaScript: Filtrado instantáneo, sincronización de URL (#nombre-etiqueta) y navegación por teclado.
Para desactivar esta función, establece `enable_cards_tag_filtering = false` en la sección `[extra]` del archivo `projects/_index.md` o en `config.toml`.
{% admonition(type="tip") %}
Para filtrar proyectos por etiquetas, necesitas establecer etiquetas en el front matter de cada proyecto. Por ejemplo:
```toml
title = "nombre del proyecto"
weight = 40
[taxonomies]
tags = ["etiqueta uno", "etiqueta 2", "tercera etiqueta"]
```
{% end %}
### Archivo
Agregar una página de archivo es similar a agregar una página de proyectos. Puedes crear un directorio en `content/archive/`. Allí, puedes crear un archivo `_index.md` con el siguiente bloque de metadatos:
Agregar una página de archivo es similar a agregar una página de proyectos. Puedes crear un directorio en `content/archive/`. Allí, puedes crear un archivo `_index.md` con el siguiente encabezado:
```toml
title = "Archivo"
template = "archive.html"
```
De forma predeterminada, el archivo listará las publicaciones ubicadas en `/blog/`. Si deseas cambiar esto, puedes establecer `section_path = "/otra-ruta/"` en la sección `[extra]` del archivo `_index.md`. Asegúrate de incluir la barra inclinada al final.
Por defecto, el archivo mostrará las publicaciones ubicadas en `blog/`. Para personalizar esto, puedes modificar la sección `[extra]` del archivo `_index.md`:
- **Para una sola ruta**: Establece `section_path = "tu-ruta/"` para listar publicaciones de un directorio específico. Asegúrate de incluir la barra inclinada al final.
- **Para múltiples rutas**: Si deseas agregar publicaciones de varios directorios, `section_path` puede especificarse como una lista de rutas. Por ejemplo:
```toml
[extra]
section_path = ["blog/", "notas/", "ruta-tres/"]
```
El archivo muestra las publicaciones en orden cronológico inverso (las más recientes primero). Puedes invertir este orden estableciendo `archive_reverse = true` en la sección `[extra]`:
```toml
[extra]
archive_reverse = true # muestra las publicaciones más antiguas primero
```
{{ admonition(type="note", title="nota" text="La página de Archivo sólo listará publicaciones que tengan fecha en su encabezado.") }}
### Etiquetas
@ -278,6 +517,17 @@ path = "about"
Fíjate cómo se establece `path = "about"`. Zola colocará la página en `$base_url/about/`. Si deseas que la página esté disponible en `/contacto/`, tendrías que establecer `path = "contacto"`.
La plantilla `info-page.html` también se puede utilizar para crear lading pages en la ruta raíz (`"/"`). Para hacerlo, el archivo `content/_index.md` debería verse así:
```markdown
+++
title = "Título de la página"
template = "info-page.html"
+++
Contenido con Markdown.
```
---
## SEO
@ -326,7 +576,7 @@ Por ejemplo, si configuras `base_canonical_url = "https://example.com"`, la URL
Las tarjetas para redes sociales son las imágenes que se muestran cuando compartes un enlace en redes sociales:
![Una captura de pantalla de WhatsApp mostrando un enlace con una tarjeta para redes sociales](/blog/mastering-tabi-settings/img/with_social_media_card.webp)
{{ dimmable_image(src="img/with_social_media_card.webp", alt="Una captura de pantalla de WhatsApp mostrando un enlace con una tarjeta para redes sociales") }}
Puedes establecer la imagen para redes sociales con `social_media_card = "img/social_media_card.png"`.
@ -340,7 +590,19 @@ Si ambas rutas, relativa y absoluta, son válidas, la ruta relativa tendrá prio
Dado que sigue la [jerarquía](#jerarquia-de-configuracion), si no está configurado en una página, pero sí lo está en una sección, se utilizará la imagen de la sección. Si no está configurado en una página o sección, pero sí en `config.toml`, se usará la imagen global.
**Consejo**: automatiza su creación con un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [De reservado a rey de las redes: automatizando las vistas previas de los enlaces con Zola](https://osc.garden/es/blog/automating-social-media-cards-zola/).
{{ admonition(type="tip", title="CONSEJO", text="Automatiza su creación con un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [Automatizando las vistas previas de los enlaces con Zola](https://osc.garden/es/blog/automating-social-media-cards-zola/).") }}
### Creador del fediverso
| Página | Sección | `config.toml` | Sigue jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
Puedes mostrar tu perfil del fediverso en las vistas previas de enlaces de Mastodon configurando la variable `fediverse_creator` en tu `config.toml`. Por ejemplo, para @username@example.com, usa:
```toml
fediverse_creator = { handle = "username", domain = "example.com" }
```
---
@ -352,7 +614,9 @@ Dado que sigue la [jerarquía](#jerarquia-de-configuracion), si no está configu
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
La barra de navegación es la barra en la parte superior de la página que contiene el título del sitio y el menú de navegación. Puedes personalizar los elementos que aparecen configurando `menu` en `config.toml`. Por ejemplo:
La barra de navegación es la barra en la parte superior de la página que contiene el título del sitio y el menú de navegación. Puedes personalizar los elementos que aparecen configurando `menu` en `config.toml`.
Soporta links relativos para páginas internas y links absolutos para enlaces externos. Por ejemplo:
```toml
menu = [
@ -361,6 +625,7 @@ menu = [
{ name = "etiquetas", url = "tags", trailing_slash = true },
{ name = "proyectos", url = "projects", trailing_slash = true },
{ name = "acerca de", url = "about", trailing_slash = true },
{ name = "github", url = "https://github.com/welpo/tabi", trailing_slash = false },
]
```
@ -384,10 +649,31 @@ Para activarlos, establece `quick_navigation_buttons = true`.
Habilita el índice de contenidos justo debajo del título y metadatos del artículo con `toc = true`.
Para saber más sobre cómo personalizarlo, consulta [la documentación sobre la Tabla de contenido](/es/blog/toc/).
Para saber más sobre cómo personalizarlo, consulta [la documentación sobre la Tabla de contenido](@/blog/toc/index.es.md).
### Enlace a los artículos anterior y siguiente
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Muestra enlaces a los artículos anterior y siguiente en la parte inferior de los posts. Se ve así:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_light.webp", dark_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_dark.webp", alt="Enlaces a los artículos anterior y siguiente", full_width=true) }}
Para activar esta función, configura `show_previous_next_article_links = true` y asegúrate de que tu sección tiene `sort_by` (por ejemplo, `sort_by = "date"`).
Por defecto, los artículos siguientes estarán en el lado izquierdo de la página y los artículos anteriores en el lado derecho.
Para invertir el orden (artículos siguientes en el lado derecho y artículos anteriores en el lado izquierdo), establece `invert_previous_next_article_links = true`.
Por defecto, esta sección de navegación tendrá el ancho completo del sitio (igual que la barra de navegación de la parte superior). Para hacerla más estrecha, coincidiendo con el ancho del artículo, establece `previous_next_article_links_full_width = false`.
Todas estas configuraciones siguen la jerarquía.
### Enlaces de retorno en notas al pie
{{ admonition(type="warning", title="ADVERTENCIA DE DEPRECACIÓN", text="Zola v0.19.0 y posterior puede hacer esto de forma nativa. Establece `bottom_footnotes = true` en la sección `[markdown]` de tu configuración.") }}
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ✅ |
@ -412,6 +698,22 @@ Establecer `copy_button = true` añadirá un pequeño botón de copiar en la par
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_light.webp", dark_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_dark.webp", alt="Botón de copiar en bloques de código", full_width=true) }}
### Nombres de bloques de código clicables
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ✅ |
Establece `code_block_name_links = true` para habilitan los enlaces clickables en los nombres de bloques de código. Consulta la [documentación](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url) para ver ejemplos y uso.
### Forzar bloques de código de izquierda a derecha
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Por defecto, los bloques de código se renderizan de izquierda a derecha, independientemente de la dirección general del texto. Establece `force_codeblock_ltr = false` para permitir que los bloques de código sigan la dirección del documento. Útil para idiomas de derecha a izquierda que necesitan bloques de código de derecha a izquierda.
### Soporte para KaTeX
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
@ -420,17 +722,31 @@ Establecer `copy_button = true` añadirá un pequeño botón de copiar en la par
KaTeX es una biblioteca JavaScript rápida y fácil de usar para la representación de matemáticas TeX en la web. Puedes habilitarlo con `katex = true`. Mira cómo se ve en tabi [aquí](/es/blog/markdown/#katex).
### Soporte para Mermaid
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ✅ |
[Mermaid](https://github.com/mermaid-js/mermaid) es una herramienta de diagramación y gráficos basada en JavaScript. Puedes activarla con `mermaid = true`.
Por defecto, la biblioteca Mermaid se sirve localmente. Si prefieres usar un CDN, establece `serve_local_mermaid = false` en `config.toml`. El uso de un CDN servirá la versión más reciente de Mermaid; la opción local servirá la versión incluida con tabi.
Consulta la [documentación de Mermaid](@/blog/shortcodes/index.es.md#diagramas-de-mermaid) para instrucciones de uso y ejemplos.
### Subconjunto de fuente personalizada
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
Las fuentes personalizadas causan parpadeo del texto en Firefox. Para solucionar esto, tabi carga un subconjunto de glifos para el encabezado. Dado que esto (ligeramente) aumenta el tiempo de carga inicial, es una buena idea intentar minimizar el tamaño de este subconjunto.
Las fuentes personalizadas causan parpadeo del texto en Firefox. Para solucionar esto, tabi carga un subconjunto de glifos para el encabezado. Dado que esto (ligeramente) aumenta el tiempo de carga inicial, es una buena idea intentar minimizar el tamaño de este subconjunto, o desactivarlo por completo si no estás usando una fuente personalizada en tu tema.
Puedes crear un subconjunto personalizado adaptado a tu sitio, guardarlo como `static/custom_subset.css`, y hacer que se cargue con `custom_subset = true`.
Para obtener más información, incluyendo instrucciones sobre cómo crear un subconjunto personalizado, consulta la [documentación](/es/blog/custom-font-subset/).
Para desactivar el subconjunto, puedes usar `enable_subset = false`.
Para obtener más información, incluyendo instrucciones sobre cómo crear un subconjunto personalizado, consulta la [documentación](@/blog/custom-font-subset/index.es.md).
### Contenido completo en el feed
@ -446,7 +762,10 @@ Por defecto, el feed Atom solo contiene el resumen/descripción de tus publicaci
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Puedes ocultar páginas específicas o secciones enteras del feed con `hide_from_feed = true`.
Puedes controlar cómo aparece el contenido en los feeds usando dos configuraciones:
- `hide_from_feed = true`: Oculta el contenido de todos los feeds (feed principal, feeds de sección y feeds de etiquetas)
- `hide_from_main_feed = true`: Oculta el contenido solo del feed principal mientras lo mantiene visible en los feeds de sección y de etiquetas
### Comentarios {#añadir-comentarios}
@ -460,7 +779,38 @@ Si quieres activar los comentarios de forma global, puedes hacerlo estableciendo
Si has activado un sistema globalmente, pero quieres desactivarlo en una página específica, puedes hacerlo estableciendo el nombre del sistema como `false` en el front matter. Por ejemplo, `utterances = false`.
Lee la [documentación](/es/blog/comments/) para obtener más información sobre los sistemas disponibles y su configuración.
Lee la [documentación](@/blog/comments/index.es.md) para obtener más información sobre los sistemas disponibles y su configuración.
### Botones de iine {#iine}
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:-------------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
tabi soporta botones de [iine](https://iine.to/) para mostrar apreciación anónima por tu contenido. Estos botones centrados en la privacidad funcionan sin JavaScript y no rastrean usuarios.
Para activar los botones iine globalmente:
```toml
[extra]
iine = true
```
Puedes personalizar el icono usado en los botones (esta configuración sigue la jerarquía):
```toml
[extra]
iine_icon = "thumbs_up" # Opciones: "heart", "thumbs_up", "upvote", o cualquier emoji
```
Para sitios multilingües, puedes unificar los conteos de likes entre versiones en diferentes idiomas del mismo contenido (configuración solo de config; valor predeterminado: `true`):
```toml
[extra]
iine_unified_languages = true # Los likes en /es/blog/hello/ cuentan hacia /blog/hello/
```
También puedes activar los botones iine en páginas o secciones individuales estableciendo `iine = true` en su front matter, o personalizar el icono con `iine_icon = "🚀"`.
### Análisis web
@ -475,7 +825,7 @@ Puedes configurarlos en la sección `[extra.analytics]` de tu archivo `config.to
- `service`: el servicio a utilizar. Las opciones disponibles son `"goatcounter"`, `"umami"`, y `"plausible"`.
- `id`: el identificador único para tu servicio de análisis. Esto varía según el servicio:
- Para GoatCounter, es el código elegido durante el registro. Instancias auto-alojadas no requieren este campo.
- Para GoatCounter, es el código elegido durante el registro. Instancias auto-alojadas de GoatCounter no requieren este campo.
- Para Umami, es la ID del sitio web.
- Para Plausible, es el nombre de dominio.
@ -484,6 +834,8 @@ Puedes configurarlos en la sección `[extra.analytics]` de tu archivo `config.to
- Para Umami: `"https://umami.example.com"`
- Para Plausible: `"https://plausible.example.com"`
- `do_not_track`: (sólo para Umami) opcional. Cuando se establece en `true`, se desactiva el seguimiento para los usuarios cuyos navegadores envían un encabezado "Do Not Track".
Un ejemplo de configuración para GoatCounter no auto-alojada sería:
```toml
@ -515,7 +867,17 @@ socials = [
]
```
Los iconos provienen de Font Awesome. Para ver una lista de todos los iconos disponibles, echa un vistazo al [directorio `static/social_icons`](https://github.com/welpo/tabi/tree/main/static/social_icons).
Para ver una lista de todos los iconos integrados, echa un vistazo al directorio [`static/social_icons` en GitHub](https://github.com/welpo/tabi/tree/main/static/social_icons).
¿Echas en falta algún icono? Si crees que sería una buena adición a tabi, no dudes en [abrir un issue](https://github.com/welpo/tabi/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=) o enviar un pull request ([ejemplo](https://github.com/welpo/tabi/pull/333)).
Para usar un icono personalizado, puedes añadirlo al directorio `static/social_icons` de tu sitio. Por ejemplo, si añades `custom.svg`, puedes referenciarlo así:
```
{ name = "custom", url = "https://example.com", icon = "custom" }
```
{{ admonition(type="note", title="NOTA", text="Todos los enlaces sociales incluyen el [atributo](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me) `rel='me'`. Esto ayuda a los motores de búsqueda y servicios web a verificar que las cuentas de redes sociales te pertenecen.") }}
### Icono de feed
@ -525,6 +887,8 @@ Los iconos provienen de Font Awesome. Para ver una lista de todos los iconos dis
Puedes añadir un enlace a tu feed RSS/Atom en el pie de página con `feed_icon = true`.
Nota para usuarios de Zola 0.19.X: cuando hay dos nombres de archivo en `feed_filenames`, solo se enlazará el primero en el pie de página.
### Menú de pie de página
| Página | Sección | `config.toml` | Respeta jerarquía | Requiere JavaScript |
@ -573,6 +937,16 @@ copyright_translations.es = "© $CURRENT_YEAR $AUTHOR $SEPARATOR A menos que se
## Metadatos
### Mostrar autoría
| Página | Sección | `config.toml` | Respeta jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Para mostrar la autoría de un artículo, usa `show_author = true`.
Esto mostrará lxs autorxs establecidxs en la variable `authors = []` en el front matter del artículo. Si esto no está disponible, se usará `author = ""` en `config.toml`.
### Tiempo de lectura
| Página | Sección | `config.toml` | Respeta jerarquía | Requiere JavaScript |
@ -585,18 +959,39 @@ Puedes activar o desactivar el tiempo estimado de lectura de un artículo con `s
Dado que sigue [la jerarquía](#jerarquia-de-configuracion), puedes activarlo o desactivarlo para páginas o secciones específicas. Por ejemplo, esta demo desactiva `show_reading_time = false` en la sección [proyectos](https://welpo.github.io/tabi/es/projects/) en el archivo [`_index.md`](https://github.com/welpo/tabi/blob/main/content/projects/_index.es.md?plain=1), por lo que sus publicaciones individuales no muestran el tiempo de lectura.
### Mostrar la fecha
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Por defecto, la fecha se muestra debajo del título de la publicación. Puedes ocultarla con `show_date = false`. Esta configuración sigue [la jerarquía](#jerarquia-de-configuracion).
### Formato de fecha
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:------------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
tabi tiene dos formatos de fecha: `long_date_format` y `short_date_format`. El formato corto se utiliza en los metadatos de una publicación, mientras que el formato largo se utiliza al listar las publicaciones (es decir, en la [sección de blog](/es/blog/) o en la [página principal](/es/)).
tabi tiene tres formatos de fecha: `long_date_format`, `short_date_format` y `archive_date_format`. El formato corto se utiliza en los metadatos de una publicación, mientras que el formato largo se utiliza al listar las publicaciones (es decir, en la [sección de blog](/es/blog/) o en la [página principal](/es/)). El formato de archivo se usa para mostrar el día y el mes en la página de archivo.
Por defecto es "6th July 2049" para ambos formatos en inglés. Para otros idiomas, el predeterminado es `"%d %B %Y"` para el formato largo y `"%-d %b %Y"` para el formato corto.
Por defecto es "6th July 2049" para los formatos corto y largo en inglés. Para otros idiomas, el predeterminado es `"%d %B %Y"` para el formato largo y `"%-d %b %Y"` para el formato corto. El formato de archivo predeterminado universal es `"%d %b"`.
En Zola, la sintaxis para el formateo de tiempo está inspirada en strftime. Una referencia completa está disponible en la [documentación de chrono](https://docs.rs/chrono/0.4.31/chrono/format/strftime/index.html).
#### Formatos de fecha por idioma
Puedes personalizar los formatos de fecha para idiomas específicos usando la matriz `date_formats` en `config.toml`:
```toml
date_formats = [
{ lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" },
{ lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" },
]
```
Esto permite que diferentes idiomas usen formatos de fecha culturalmente apropiados (por ejemplo, "6 de julio de 2049" en español o "6. Juli 2049" en alemán).
### Separador personalizado
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
@ -653,7 +1048,69 @@ allowed_domains = [
]
```
Para obtener más información, consulta la [página de documentación de CSP](/es/blog/security/).
Esta función está habilitada por defecto. Para deshabilitarla (y permitir todo), configura `enable_csp = false` en una página, sección o globalmente. La opción `enable_csp` sigue [la jerarquía](#jerarquia-de-configuracion).
Para obtener más información, consulta la [página de documentación de CSP](@/blog/security/index.es.md).
---
## Indieweb
### Webmentions
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ❓ | ❓ | ✅ | ❓ | ✅ |
Como se describe en el estándar W3C recomendado, [Webmention](https://www.w3.org/TR/webmention/#abstract-p-1) es una manera sencilla de notificar cualquier URL cuando la mencionas en tu sitio web. Desde la perspectiva del receptor, es una forma de solicitar notificaciones cuando otros sitios web la mencionan.
Para sitios web estáticos, [webmention.io](https://webmention.io/) aloja un punto final de webmention que se puede utilizar para recibir webmentions. Esta función recupera las webmentions almacenadas en webmention.io y las muestra para una página. Necesitarás configurar una cuenta para tu sitio web en webmention.io. Cuando habilites la función, anunciará tu punto final de webmention.io y mostrará las webmentions para cualquier página.
Habilita las webmentions para tu sitio web agregando lo siguiente a tu archivo `config.toml`.
```toml
[extra.webmentions]
enable = true
# Especifica el dominio registrado con webmention.io.
domain = "www.example.com"
```
❓: Para desactivar las webmentions para una sección o página específica, establece `webmentions = false` en la sección `[extra]` del front matter de esa sección o página.
La sección de webmentions se ve así:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Captura de pantalla de webmentions mostrando reposts, me gusta, marcadores y comentarios", full_width=true) }}
### h-card representativa
| Página | Sección | `config.toml` | Sigue Jerarquía | Requiere JavaScript |
| :--: | :-----: | :-----------: | :---------------: | :-----------------: |
| ❌ | ❌ | ✅ | ❌ | ❌ |
Por defecto, tabi añade una [h-card](https://microformats.org/wiki/h-card) representativa **oculta** a la página de inicio. Aunque es invisible para los visitantes, está disponible para los analizadores de microformatos. Puedes comprobar la validez de la tarjeta con la herramienta [Indiewebify.me](https://indiewebify.me/validate-h-card/).
Para desactivar la h-card, establece `enable = false` en la sección `[extra.hcard]` de `config.toml`.
La h-card predeterminada incluye tu nombre, la URL del sitio web y los enlaces a redes sociales.
Puedes establecer una imagen de perfil y una pequeña biografía con los ajustes `avatar` y `biography`.
Todas las demás [propiedades de h-card](https://microformats.org/wiki/h-card#Properties) se pueden añadir listándolas en la sección `[extra.hcard]` del archivo de configuración. Simplemente reemplaza todos los caracteres `-` por `_`.
---
## Extendiendo elementos HTML en tabi
Algunos elementos HTML en tabi pueden extenderse para admitir casos de uso adicionales, como agregar JavaScript personalizado para comportamientos en todo el sitio al final de la etiqueta `<body>` o incluir contenido adicional al final del elemento `<head>` que no esté soportado por otras configuraciones de tabi.
Consulta la tabla a continuación para ver los elementos que pueden extenderse:
| Elemento | Plantilla |
| :------: | :-------------------------------: |
| `<head>` | `templates/tabi/extend_head.html` |
| `<body>` | `templates/tabi/extend_body.html` |
No hay configuraciones explícitas que debas establecer para tu sitio o páginas. Simplemente crea el archivo de plantilla correspondiente para tu sitio, y tabi lo incluirá automáticamente.
---

View file

@ -1,20 +1,19 @@
+++
title = "Mastering tabi Settings: A Comprehensive Guide"
date = 2023-09-18
updated = 2023-12-04
updated = 2025-08-07
description = "Discover the many ways you can customise your tabi site."
[taxonomies]
tags = ["showcase", "tutorial", "FAQ"]
[extra]
giscus = true
footnote_backlinks = true
pinned = true
quick_navigation_buttons = true
social_media_card = "social_cards/blog_mastering_tabi_settings.jpg"
+++
This aims to be a comprehensive guide to every setting in tabi. If you have any questions, feel free to ask in the [comments below](#comments) or [open an issue on GitHub](https://github.com/welpo/tabi/issues/new).
This aims to be a comprehensive guide to every setting in tabi. If you have any questions, feel free to [open an issue on GitHub](https://github.com/welpo/tabi/issues/new) or [start a discussion](https://github.com/welpo/tabi/discussions).
<details>
<summary><b>Table of Contents</b></summary>
@ -27,17 +26,69 @@ tabi has a hierarchy that allows you to customise your site at different levels.
1. **Global settings**: These are the settings that apply to your entire site. They are set in `config.toml`.
2. **Section settings**: These are the settings that apply to a section of your site (e.g.`/blog` or `/projects`). They are set in the front matter of the `_index.md` file of the section.
3. **Page settings**: These are the settings that apply to a single page. They are set in the front matter of the page.
3. **Parent page settings**: For nested pages (pages within pages), these are the settings from the parent page.
4. **Page settings**: These are the settings that apply to a single page. They are set in the front matter of the page.
In all cases, tabi's settings are set in the `[extra]` section.
For settings which follow this hierarchy, the value set on a page overrides the value for a section, which overrides the global value. In short: the more specific the setting, the higher priority it has, or `page > section > config.toml`.
For settings which follow this hierarchy, the value set on a page overrides the value for a section, which overrides the global value. In short: the more specific the setting, the higher priority it has, or `page > parent page/section > config.toml`.
---
## Search
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ✅ |
tabi supports accessible, local multi-lingual search with [Elasticlunr](http://elasticlunr.com/). To enable it, you need to:
1. Set a `default_language` in `config.toml`.
2. Set `build_search_index = true`.
3. Optionally, configure the `[search]`.
Here's an example configuration:
```toml
base_url = "https://example.com"
default_language = "en"
build_search_index = true
[search]
index_format = "elasticlunr_json" # Or the less efficient "elasticlunr_javascript".
include_title = true
include_description = true
include_path = true
include_content = true
```
**Note**: for Chinese/Japanese search support, you need to use a [custom Zola build](https://github.com/getzola/zola/blob/master/Cargo.toml#L54-L55).
### Considerations for Zola 0.17.X Users
Zola 0.17.X doesn't provide access to the `search.index_format` variable ([bug report](https://github.com/getzola/zola/issues/2165)). When using tabi, this variable defaults to the more efficient JSON index. However, due to [another bug](https://github.com/getzola/zola/issues/2193) fixed in 0.18.0, the JSON index for multi-language sites is not generated correctly.
Users with Zola versions prior to 0.18.0 who want to use the JavaScript index need to set the `index_format` variable in two places:
```toml
[search]
index_format = "elasticlunr_javascript"
[extra]
index_format = "elasticlunr_javascript"
```
This ensures tabi loads the right files. We recommend upgrading to Zola 0.18.0 or later for optimal functionality.
### Implementation Details
For technical details about the search implementation in tabi, including when the index loads, accessibility features, and other specifics, see the [Pull Request #250](https://github.com/welpo/tabi/pull/250).
---
## Multilingual Support
tabi offers comprehensive multilingual support for your Zola site, from setting a default language to adding as many as you wish. Refer to the [multilingual FAQ](blog/faq-languages/) for more information.
tabi offers comprehensive multilingual support for your Zola site, from setting a default language to adding as many as you wish. Refer to the [multilingual FAQ](@/blog/faq-languages/index.md) for more information.
---
@ -49,6 +100,8 @@ The [main page](/) of this demo has a header with an image, a title and descript
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/header_light.webp", dark_src="blog/mastering-tabi-settings/img/header_dark.webp", alt="Main page header") }}
#### Heading
To set the image and title, you can use the `header` variable in the front matter of the section's `_index.md` file. For example:
```toml
@ -58,35 +111,96 @@ header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar F
The description is regular Markdown content, set outside the front matter.
If you'd like to show posts on the main page, you first need to decide whether their path will be `/` or something like `/blog`.
#### Listing Recent Posts
If you want to serve the posts from `/`, you need to set `paginate_by = 5` in the front matter of your `_index.md` file. **Note**: this is not in the `[extra]` section, but in the main front matter. Example:
To show posts on your main page, you first need to decide where these posts will be served from: the root path (`/`) or a subdirectory (e.g., `/blog`).
```toml
sort_by = "date"
template = "section.html"
paginate_by = 5
**Option A: Serve posts from the root path (`/`)**
[extra]
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, the theme's author" }
```
If you'd rather serve the posts from `/blog`, you can set `section_path = "/blog"` in the `[extra]` section. This is the setup or this demo:
Set `paginate_by` in the front matter of your `content/_index.md` file:
```toml
title = "Latest posts"
sort_by = "date"
template = "section.html"
paginate_by = 5 # Show 5 posts per page.
[extra]
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, the theme's author" }
section_path = "blog/_index.md"
max_posts = 4
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Your Name" }
```
Notice how if you set `section_path`, you don't need to set `paginate_by`. You can set `max_posts` to the determine the number of posts you want to show on the main page.
{{ admonition(type="note", text="The `paginate_by` setting goes in the main front matter, not in the `[extra]` section.") }}
The `title` is the header that appears above the posts.
**Option B: Serve posts from a subdirectory (e.g., `/blog`)**
Use `section_path` in the `[extra]` section of your `content/_index.md` file:
```toml
title = "Latest posts"
sort_by = "date"
# Do not set `paginate_by` here.
[extra]
header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Your Name" }
section_path = "blog/_index.md" # Where to find your posts.
max_posts = 5 # Show up to 5 posts on the main page.
```
{{ admonition(type="warning", text="Do not set both `paginate_by` and `section_path`. These settings are mutually exclusive and using both may result in no posts being displayed.") }}
Additional notes:
- The `title` in the front matter sets the header that appears above the posts.
- Use the full path to the section's `_index.md` file for `section_path`. Using `section_path = "blog/"` will not work.
##### Pinning Posts
You can pin posts to keep them at the top of the main page listing. In this demo, this post is pinned, so it appears first with a "pinned" icon and label:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/pinned_post_light.webp", dark_src="blog/mastering-tabi-settings/img/pinned_post_dark.webp", alt="Pinned post", full_width=true) }}
Pinned posts are shown first, maintaining their relative order of the section's `sort_by`, followed by regular posts.
To pin a post, add the following to its front matter:
```toml
[extra]
pinned = true
```
{{ admonition(type="info", text="This setting only affects your site's main pages (like `/`, `/es/`, `/fr/`). Other sections like `blog/`, `tags/`, or `archive/` show posts in their normal order.") }}
{{ admonition(type="warning", text='When using pagination (`paginate_by`), pinned posts may appear twice: once on top of page 1, and again in their normal chronological position on subsequent pages.') }}
##### Display the Date of Posts in Listing
By default, when listing posts, the date of post creation is shown. You can configure which date(s) to display using the `post_listing_date` option. Available settings:
- `date`: Show only the original date of the post (default).
- `updated`: Show only the last updated date of the post. If there is no last updated date, it shows the original date.
- `both`: Show both the original date and the last updated date.
```toml
post_listing_date = "date"
```
{% admonition(type="tip") %}
This setting follows the hierarchy: you can set a global value in `config.toml` or override it for specific sections in their `_index.md` file. In both cases, add it to the `[extra]` section.
{% end %}
#### Listing Projects
You can showcase a selection of projects on your main page. To do this, you'll need to set up the `projects` directory first.
Once that's done, you configure the path to the projects in the `[extra]` section of your `_index.md` file:
```toml
[extra]
projects_path = "projects/_index.md"
```
By default, this will show the 3 projects with the highest priority (smallest weight; same sorting as Projects page). To show more or fewer projects, you can set `max_projects` in the `[extra]` section.
By default, the featured projects will be shown after the posts. If you want to show the projects before the posts, set `show_projects_first = true`.
### Light and Dark Mode Switcher
@ -114,7 +228,38 @@ tabi's skins change the main colour of the site. You can set the skin in `config
{{ image_toggler(default_src="blog/customise-tabi/skins/lavender_light.webp", toggled_src="blog/customise-tabi/skins/lavender_dark.webp", default_alt="lavender skin in light mode", toggled_alt="lavender skin in dark mode", full_width=true) }}
Explore the available skins and learn how to create your own reading [the documentation](/blog/customise-tabi/#skins).
Explore the available skins and learn how to create your own reading [the documentation](@/blog/customise-tabi/index.md#skins).
### Sans-serif Font
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
tabi uses a serif font for article paragraphs (the one you're seeing now). You can switch to using a sans-serif font (the one on the headers/menu) throughout your entire site by setting `override_serif_with_sans = true` in your `config.toml`.
Click on the image below to compare the two looks:
{{ image_toggler(default_src="blog/mastering-tabi-settings/img/serif.webp", toggled_src="blog/mastering-tabi-settings/img/sans-serif.webp", default_alt="Serif font", toggled_alt="Sans-serif font", full_width=true) }}
### External Link Indicator
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
{{ admonition(type="info", text="Requires Zola 0.20.0 or later.") }}
If you'd like to add an icon to external links, configure the `[markdown]` (not `[extra]`) section in your `config.toml`:
```toml
[markdown]
external_links_class = "external"
```
This will add a small icon next to external links:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/external_link_light.webp", dark_src="blog/mastering-tabi-settings/img/external_link_dark.webp", alt="External link icon", full_width=true) }}
### Custom CSS
@ -136,12 +281,64 @@ stylesheets = ["css/custom.css", "css/another.css"]
The browser theme colour is the colour that appears in the browser's tab bar:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/browser_theme_colour_light.webp", dark_src="blog/mastering-tabi-settings/img/browser_theme_colour_dark.webp" alt="tabi with a coloured browser theme") }}
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/browser_theme_color_light.webp", dark_src="blog/mastering-tabi-settings/img/browser_theme_color_dark.webp" alt="tabi with a coloured browser theme") }}
You can set it in `config.toml` like `browser_theme_colour = "#087e96"`. If you'd like different colours for dark/light mode, you can set an array of colours with `browser_theme_colour = ["#ffffff", "#000000"]`. The first colour will be used for light mode, the second for dark mode.
You can set it in `config.toml` like `browser_theme_color = "#087e96"`. If you'd like different colours for dark/light mode, you can set an array of colours with `browser_theme_color = ["#ffffff", "#000000"]`. The first colour will be used for light mode, the second for dark mode.
This variable accepts any valid CSS colour, so you can use keywords (e.g. `blue`), hex codes (e.g. `#087e96`) or RGB/HSL values (e.g. `rgb(8, 126, 150)`).
### Compact Tags
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
By default, the [tags page](/tags) displays tags as:
[TagName](#) — n post[s]
Setting `compact_tags = true` will display them as:
[TagName](#) <sup>n</sup>
### Tags Sorting
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
By default, the [tags page](/tags) sorts tags alphabetically, given the default setting of `tag_sorting = "name"`.
Setting `tag_sorting = "frequency"` will sort them by number-of-posts (descending).
---
## Series
For a detailed explanation of the series feature, see the [series documentation](@/blog/series/index.md).
### Jump to posts link
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ✅ | ✅ | ✅ | ❌ |
By default, a "Jump to posts" link automatically appears next to the series title when a series has a content over 2000 characters:
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="jump to series posts link", full_width=true) }}
Set `show_jump_to_posts = true` to force the feature on and `show_jump_to_posts = false` to force it off.
### Series pages indexation
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ✅ | ✅ | ✅ | ❌ |
By default, series page are indexed (using a 1-based indexing) as per the series section `sort_by`.
Set `post_listing_index_reversed = true` to reverse this index.
---
## Git Repository Integration
@ -182,7 +379,7 @@ Clicking on this link will take you to the commit history of the post, where you
### Projects
tabi has a built-in projects template. To enable it, you can create a directory in `content/projects/`. There, you can create a `_index.md` file with the following front matter:
tabi has a built-in projects (cards) template. To enable it, you can create a directory in `content/projects/`. There, you can create a `_index.md` file with the following front matter:
```toml
title = "Projects"
@ -202,11 +399,11 @@ quick_navigation_buttons = true
- `show_reading_time = false` hides the [reading time](#reading-time).
- `quick_navigation_buttons = true` shows the [quick navigation buttons](#quick-navigation-buttons) are shown.
Alongside the `_index.md` file, you can create a file for each project. For example, this is the front matter for the [tabi project page](/projects/tabi/):
Alongside the `_index.md` file, you can create a file for each project. For example, this is the front matter for the [tabi project page](@/projects/tabi/index.md):
```toml
title = "tabi"
description = "A fast, lightweight, and modern Zola theme with multi-language support."
description = "A feature-rich modern Zola theme with first-class multi-language support."
weight = 1
[extra]
@ -222,6 +419,33 @@ When a user clicks on the image or title of a project, they will be taken to the
The individual project's page is rendered with the default template, unless you set another one, e.g. `template = "info-page.html"`.
#### Filtering Projects
If you add tags to your projects, you will see a tag filter:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/projects_tag_filter_light.webp", dark_src="blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp", alt="Projects page with tag filter", full_width=true) }}
The tag filtering system uses progressive enhancement:
- Without JavaScript: Tags link directly to dedicated tag pages (e.g. `/tags/tag-name`)
- With JavaScript: Instant filtering, URL syncing (#tag-name), and keyboard navigation
To disable this feature, set `enable_cards_tag_filtering = false` in the `[extra]` section of the `projects/_index.md` file or in `config.toml`.
{% admonition(type="tip") %}
To filter projects by tags, you need to set tags in the front matter of each project. For example:
```toml
title = "project name"
weight = 40
[taxonomies]
tags = ["tag one", "tag 2", "third tag"]
```
{% end %}
### Archive
Adding an archive page is similar to adding a projects page. You can create a directory in `content/archive/`. There, you can create a `_index.md` file with the following front matter:
@ -231,7 +455,25 @@ title = "Archive"
template = "archive.html"
```
By default, the archive will list posts located in `/blog/`. If you'd like to change this, you can set `section_path = "/another-path/"` in the `[extra]` section of the `_index.md` file. Make sure to include the trailing slash.
By default, the archive will list posts located in `blog/`. To customise this, you can modify the `[extra]` section of the `_index.md` file:
- **For a single source path**: Set `section_path = "your-path/"` to list posts from a specific directory. Make sure to include the trailing slash.
- **For multiple source paths**: If you want to aggregate posts from various directories, `section_path` can be specified as a list of paths. For example:
```toml
[extra]
section_path = ["blog/", "notes/", "path-three/"]
```
The archive displays posts in reverse chronological order (newest first). You can reverse this order by setting `archive_reverse = true` in the `[extra]` section:
```toml
[extra]
archive_reverse = true # displays oldest posts first.
```
{{ admonition(type="note", text="The Archive page will only list posts that have a date in their front matter.") }}
### Tags
@ -280,6 +522,17 @@ path = "about"
Notice how the `path` is set to `about`. Zola will place the page at `$base_url/about/`. If you'd like to have the page available at `/contact/`, you'd set `path = "contact"`.
The `info-page.html` template can also be used to create landing pages at the path root (`"/"`). To do that, the `content/_index.md` file should look like this:
```markdown
+++
title = "Landing Page Title"
template = "info-page.html"
+++
Place your landing page Markdown content here.
```
---
## SEO
@ -328,7 +581,7 @@ For example, if you set `base_canonical_url = "https://example.com"`, the canoni
Social media cards are the images that are displayed when you share a link on social media:
![A screenshot of WhatsApp showing a link with a social media card](/blog/mastering-tabi-settings/img/with_social_media_card.webp)
{{ dimmable_image(src="img/with_social_media_card.webp", alt="A screenshot of WhatsApp showing a link with a social media card") }}
You can set the social media image with `social_media_card = "img/social_media_card.png"`.
@ -342,7 +595,21 @@ If both relative and absolute paths are valid, the relative path will take prece
Since it follows the [hierarchy](#settings-hierarchy), if it's not set on a page, but is set on a section, the section's image will be used. If it's not set on a page or section, but is set in `config.toml`, the global image will be used.
**Protip**: automate their creation with a [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [From Bashful to Social Butterfly: Automating Link Previews for Zola Sites](https://osc.garden/blog/automating-social-media-cards-zola/).
{{ admonition(type="tip", title="PROTIP", text="Automate their creation with a [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [Automating Link Previews for Zola Sites](https://osc.garden/blog/automating-social-media-cards-zola/).") }}
### Fediverse Creator
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
You can highlight your fediverse profile in Mastodon link previews by setting the `fediverse_creator` variable in your `config.toml`. For example, for @username@example.com, use:
```toml
fediverse_creator = { handle = "username", domain = "example.com" }
```
This adds metadata to your HTML, allowing Mastodon to display the author's fediverse profile when your content is shared.
---
@ -354,7 +621,9 @@ Since it follows the [hierarchy](#settings-hierarchy), if it's not set on a page
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
The navigation bar is the bar at the top of the page that contains the site title and the navigation menu. You can customise which items appear by setting `menu` in `config.toml`. For example:
The navigation bar is the bar at the top of the page that contains the site title and the navigation menu. You can customise which items appear by setting `menu` in `config.toml`.
The menu supports both relative URLs for internal pages and absolute URLs for external links. For example:
```toml
menu = [
@ -363,6 +632,7 @@ menu = [
{ name = "tags", url = "tags", trailing_slash = true },
{ name = "projects", url = "projects", trailing_slash = true },
{ name = "about", url = "about", trailing_slash = true },
{ name = "github", url = "https://github.com/welpo/tabi", trailing_slash = false },
]
```
@ -388,10 +658,32 @@ To enable them, set `quick_navigation_buttons = true`.
Enable the table of contents right below the post's title and metadata with `toc = true`.
Read more about the table of contents and how to customise it by reading [the docs](/blog/toc/).
Read more about the table of contents and how to customise it by reading [the docs](@/blog/toc/index.md).
### Previous and Next Article Links
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
Displays links to the previous and next articles at the bottom of posts. It looks like this:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_light.webp", dark_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_dark.webp" alt="Previous and next article links", full_width=true) }}
To activate this feature, set `show_previous_next_article_links = true` and ensure your section has a `sort_by` value (e.g. `sort_by = "date"`).
By default, next articles will be on the left side of the page and previous articles will be on the right side.
To reverse the order (next articles on the right and previous articles on the left), set `invert_previous_next_article_links = true`.
By default, this navigation section will have the full width of the site (same as the navigation bar at the top).
To make it narrower, matching the article width, set `previous_next_article_links_full_width = false`.
All of these settings follow the hierarchy.
### Footnote Backlinks
{{ admonition(type="warning", title="DEPRECATION WARNING", text="Zola v0.19.0 and later can do this natively. Set `bottom_footnotes = true` in your config's `[markdown]` section.") }}
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ✅ |
@ -416,6 +708,22 @@ Setting `copy_button = true` will add a small copy button to the top right of co
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_light.webp", dark_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_dark.webp" alt="Copy button on code blocks", full_width=true) }}
### Clickable Code Block Names
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ✅ |
Setting `code_block_name_links = true` enables URLs in code block names to become clickable links. Check out the [documentation](@/blog/shortcodes/index.md#show-source-or-path) for examples and usage.
### Force Code Blocks LTR
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
By default, code blocks are rendered left-to-right, regardless of the overall text direction. Set `force_codeblock_ltr = false` to allow code blocks to follow the document's text direction. Useful for RTL languages needing RTL code blocks.
### KaTeX Support
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
@ -424,17 +732,29 @@ Setting `copy_button = true` will add a small copy button to the top right of co
KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. You can enable it with `katex = true`. See what it looks like in tabi [here](/blog/markdown/#katex).
### Mermaid Support
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ✅ |
[Mermaid](https://github.com/mermaid-js/mermaid) is a JavaScript-based diagramming and charting tool. You can enable it with `mermaid = true`.
By default, the Mermaid library is served locally. If you prefer to use a CDN, set `serve_local_mermaid = false` in `config.toml`. Using a CDN will serve the latest version of Mermaid; the local option will serve the version bundled with tabi.
See the [Mermaid documentation](@/blog/shortcodes/index.md#mermaid-diagrams) for usage instructions and examples.
### Custom Font Subset
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
Custom fonts cause flashing text in Firefox. To amend this, tabi loads a subset of glyphs for the header. Since this (slightly) increases the initial load time, it's a good idea to try and minimise the size of this subset.
Custom fonts cause flashing text in Firefox. To amend this, tabi loads a subset of glyphs for the header. Since this (slightly) increases the initial load time, it's a good idea to try and minimise the size of this subset, or disable it completely if you're not using a custom font in your skin.
You can create a custom subset tailored to your site, save it as `static/custom_subset.css`, and have it load with `custom_subset = true`.
You can create a custom subset tailored to your site, save it as `static/custom_subset.css`, and have it load with `custom_subset = true`. Disabling the subset can be done with `enable_subset = false`.
For more information, including instructions on how to create a custom subset, see the [docs](/blog/custom-font-subset/).
For more information, including instructions on how to create a custom subset, see the [docs](@/blog/custom-font-subset/index.md).
### Full Content in Feed
@ -450,7 +770,10 @@ By default, the Atom feed only contains the summary/description of your posts. Y
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
You can hide specific pages or entire sections from your feed by setting `hide_from_feed = true`.
You can control how content appears in your feeds using two settings:
1. `hide_from_feed = true`: Hides content from all feeds (main, section, and tag feeds)
2. `hide_from_main_feed = true`: Hides content only from the main feed while keeping it visible in section and tag feeds
### Comments {#adding-comments}
@ -464,7 +787,38 @@ To enable a system globally (on all pages), set `enabled_for_all_posts = true` i
If you have enabled a system globally, but want to disable it on a specific page, set the name of the system to `false` in the front matter of that page. For example, `utterances = false`.
Read [the docs](/blog/comments/) 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.
### iine Like Buttons {#iine}
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
tabi supports [iine](https://iine.to/) like buttons for anonymous appreciation of your content. These privacy-focused buttons work without JavaScript and don't track users.
To enable iine buttons globally:
```toml
[extra]
iine = true
```
You can customise the icon used for the buttons (follows the hierarchy):
```toml
[extra]
iine_icon = "thumbs_up" # Options: "heart", "thumbs_up", "upvote", or any emoji
```
For multilingual sites, you can unify like counts across language versions of the same content (config-only setting; true by default):
```toml
[extra]
iine_unified_languages = true # Likes on /es/blog/hello/ count towards /blog/hello/
```
You can also enable iine buttons on individual pages or sections by setting `iine = true` in their front matter, or override the icon with `iine_icon = "🚀"`.
### Analytics
@ -479,7 +833,7 @@ You can set them up in the `[extra.analytics]` section of your `config.toml`.
- `service`: Specifies which analytics service to use. Supported options are `"goatcounter"`, `"umami"`, and `"plausible"`.
- `id`: The unique identifier for your analytics service. This varies based on the service:
- For GoatCounter, it's the code chosen during signup. Self-hosted instances don't require this field.
- For GoatCounter, it's the code chosen during signup. Self-hosted instances of GoatCounter don't require this field.
- For Umami, it's the website ID.
- For Plausible, it's the domain name.
@ -488,6 +842,8 @@ You can set them up in the `[extra.analytics]` section of your `config.toml`.
- For Umami: `"https://umami.example.com"`
- For Plausible: `"https://plausible.example.com"`
- `do_not_track`: (Umami only) Optional. When set to `true`, the generated tracking script will include the `data-do-not-track="true"` attribute, which disables tracking for users whose browsers send a "Do Not Track" header.
An example configuration for non-self-hosted GoatCounter would look like this:
```toml
@ -519,7 +875,17 @@ socials = [
]
```
The icons are from Font Awesome. To see a list of all the available icons, take a look at the [`static/social_icons` directory](https://github.com/welpo/tabi/tree/main/static/social_icons).
To see a list of all the built-in icons, take a look at the [`static/social_icons` directory on GitHub](https://github.com/welpo/tabi/tree/main/static/social_icons).
Missing an icon? If you think it would be a good addition to tabi, feel free to [open an issue](https://github.com/welpo/tabi/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=) or submit a pull request ([example](https://github.com/welpo/tabi/pull/333)).
To use a custom icon, you can add it to your site's `static/social_icons` directory. For example, if you add `custom.svg`, you can reference it like this:
```
{ name = "custom", url = "https://example.com", icon = "custom" }
```
{{ admonition(type="note", text="All social links include the `rel='me'` [attribute](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me). This helps search engines and web services verify that the social media accounts are owned by you.") }}
### Feed Icon
@ -529,6 +895,8 @@ The icons are from Font Awesome. To see a list of all the available icons, take
You can add a link to your RSS/Atom feed to the footer with `feed_icon = true`.
Note for Zola 0.19.X users: when there are two filenames in `feed_filenames`, only the first one will be linked in the footer.
### Footer Menu
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
@ -579,6 +947,16 @@ copyright_translations.es = "© $CURRENT_YEAR $AUTHOR $SEPARATOR A menos que se
## Metadata
### Show author
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
To show the author(s) below the post title, set `show_author = true`.
This will display the authors set on `authors = []` in the front matter of the post. If this is not available, it will fall back to `author = ""`in `config.toml`.
### Reading Time
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
@ -591,18 +969,39 @@ You can enable or hide the reading time of a post with `show_reading_time`. If y
Since it follows [the hierarchy](#settings-hierarchy), you can enable it or hide it for specific pages or sections. For example, this demo sets `show_reading_time = false` in the [projects](https://welpo.github.io/tabi/projects/) section's [`_index.md`](https://github.com/welpo/tabi/blob/main/content/projects/_index.md?plain=1), so their individual posts don't show the reading time.
### Show Date
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
By default, the date is shown below the post title. You can hide it with `show_date = false`. This setting follows [the hierarchy](#settings-hierarchy).
### Date Format
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
tabi has two date formats: `long_date_format` and `short_date_format`. The short format is used in a post's metadata, while the long format is used when listing posts (i.e. on the [blog section](/blog/) or the [main page](/)).
tabi has three date formats: `long_date_format`, `short_date_format` and `archive_date_format`. The short format is used in a post's metadata, while the long format is used when listing posts (i.e. on the [blog section](@/blog/_index.md) or the [main page](@/_index.md)). The archive format is used to display day and month on the archive page.
The default is "6th July 2049" for both formats in English. For other languages, the defaut is `"%d %B %Y"` for the long format and `"%-d %b %Y"` for the short format.
The default is "6th July 2049" for `long_date_format` and `short_date_format` in English. For other languages, the defaut is `"%d %B %Y"` for the long format and `"%-d %b %Y"` for the short format. The universal default for the archive format is `"%d %b"`.
In Zola, time formatting syntax is inspired fom strftime. A full reference is available in the [chrono docs](https://docs.rs/chrono/0.4.31/chrono/format/strftime/index.html).
#### Per-language date formats
You can customise date formats for specific languages using the `date_formats` array in `config.toml`:
```toml
date_formats = [
{ lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" },
{ lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" },
]
```
This allows different languages to use culturally appropriate date formatting (e.g. Spanish "3 de febrero de 2024" vs German "3. Februar 2024").
### Custom Separator
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
@ -659,7 +1058,69 @@ allowed_domains = [
]
```
See the [CSP documentation page](/blog/security/) for more information.
This feature is enabled by default. To disable it (and allow all connections), set `enable_csp = false` on a page, section or globally. The `enable_csp` setting follows the [hierarchy](#settings-hierarchy).
See the [CSP documentation page](@/blog/security/index.md) for more information.
---
## Indieweb
### Webmentions
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❓ | ❓ | ✅ | ❓ | ✅ |
As described by the recommended W3C standard [Webmention](https://www.w3.org/TR/webmention/#abstract-p-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](https://webmention.io/) 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 all posts.
Enable webmentions for your site by adding the following to your `config.toml` file.
```toml
[extra.webmentions]
enable = true
# Specify the domain registered with webmention.io.
domain = "www.example.com"
```
❓: To disable webmentions for a specific section or page, set `webmentions = false` in the `[extra]` section of that section or page's front matter.
The webmentions section looks like this:
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Webmentions screenshot showing reposts, likes, bookmarks, and comments", full_width=true) }}
### Representative h-card
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
| :--: | :-----: | :-----------: | :---------------: | :-----------------: |
| ❌ | ❌ | ✅ | ❌ | ❌ |
By default, tabi adds a **hidden** representative [h-card](https://microformats.org/wiki/h-card) to the homepage. While invisible to visitors, it's available to microformat parsers. You can check the validity of the card with the [Indiewebify.me](https://indiewebify.me/validate-h-card/) tool.
To disable the h-card, set `enable = false` in the `[extra.hcard]` section of `config.toml`.
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 `_`.
---
## Extending HTML Elements in tabi
Some HTML elements in tabi can be extended to support additional use cases such as adding custom JavaScript for site-wide behavior at the end of the `<body>` tag or including additional content at the end of the `<head>` element that is not otherwise supported by other tabi settings.
See the table below for elements that can be extended:
| Element | Template |
| :------: | :-------------------------------: |
| `<head>` | `templates/tabi/extend_head.html` |
| `<body>` | `templates/tabi/extend_body.html` |
There are no explicit settings to configure for your site or pages. Simply create the relevant template file for your site, and tabi will automatically include it.
---

View file

@ -1,7 +1,7 @@
+++
title = "Seguretat per defecte"
date = 2023-02-22
updated = 2023-09-29
updated = 2025-02-21
description = "tabi té una Política de Seguretat de Contingut (CSP) fàcilment personalitzable amb valors segurs per defecte. Obtingues tranquil·litat i un A+ en l'Observatori de Mozilla."
[taxonomies]
@ -30,6 +30,17 @@ La llista `allowed_domains` especifica les URLs a les quals el lloc web hauria d
Aquesta funcionalitat permet personalitzar fàcilment les capçaleres de seguretat del lloc web per permetre casos d'ús específics, com ara inserir vídeos de YouTube, carregar scripts o tipografies remotes ([no recomanat](https://www.albertovarela.net/blog/2022/11/stop-using-google-fonts/)).
**Nota**: [habilitar els comentaris](@/blog/comments/index.ca.md) o [les analítiques](@/blog/mastering-tabi-settings/index.ca.md#analisi-web) automàticament permet scripts/frames/estils/connexions en funció del servei habilitat.
Pots desactivar les capçaleres (permitint-ho tot) en una pàgina, secció, o globalment configurant `enable_csp = false` en el front matter o en el fitxer `config.toml`.
**Notas**:
- [Habilitar els comentaris](@/blog/comments/index.ca.md), [les analítiques](@/blog/mastering-tabi-settings/index.ca.md#analisi-web), o [els diagrames de mermaid](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid) permet automàticament els scripts/frames/estils/conexions pertinents.
- Per utilitzar un [tema de resaltat de sintaxis integrat a Zola](https://www.getzola.org/documentation/getting-started/configuration/#syntax-highlighting), has de permetre `unsafe-inline` a la directiva `style-src`:
```
{ directive = "style-src", domains = ["'self'", "'unsafe-inline'"] },
```
---
[^1]: Requereix una configuració adequada del servidor web (p. ex., redirigir el trànsit HTTP a HTTPS).

View file

@ -1,7 +1,7 @@
+++
title = "Seguro por defecto"
date = 2023-02-22
updated = 2023-09-29
updated = 2025-02-21
description = "tabi tiene una Política de Seguridad de Contenido (CSP) fácilmente personalizable con configuraciones seguras. Obtén tranquilidad y una calificación de A+ en Mozilla Observatory."
[taxonomies]
@ -30,6 +30,17 @@ La lista `allowed_domains` especifica las URL a las que el sitio web debería po
Esta función permite personalizar fácilmente las cabeceras de seguridad del sitio web para permitir casos de uso específicos, como la incrustación de videos de YouTube, la carga de scripts o fuentes remotas ([no recomendado](https://www.albertovarela.net/blog/2022/11/stop-using-google-fonts/)).
**Nota**: [habilitar los comentarios](@/blog/comments/index.es.md) o [las analíticas](@/blog/mastering-tabi-settings/index.es.md#analisis-web) automáticamente permite scripts/frames/estilos/conexiones en función del servicio habilitado.
Puedes desactivar las cabeceras (permitiendo todo) en una página, sección, o globalmente configurando `enable_csp = false` en el front matter o en el archivo `config.toml`.
**Notas**:
- [Habilitar los comentarios](@/blog/comments/index.es.md), [las analíticas](@/blog/mastering-tabi-settings/index.es.md#analisis-web), o [los diagramas mermaid](@/blog/shortcodes/index.es.md#diagramas-de-mermaid) permite automáticamente los scripts/frames/estilos/conexiones pertinentes.
- Para usar un [tema de resaltado de sintaxis integrado en Zola](https://www.getzola.org/documentation/getting-started/configuration/#syntax-highlighting), has de permitir `unsafe-inline` en la directiva `style-src`:
```
{ directive = "style-src", domains = ["'self'", "'unsafe-inline'"] },
```
---
[^1]: Requiere una configuración adecuada del servidor web (por ejemplo, redirigir el tráfico HTTP a HTTPS).

View file

@ -1,7 +1,7 @@
+++
title = "Secure by default"
date = 2023-02-22
updated = 2023-09-29
updated = 2025-02-21
description = "tabi has an easily customizable Content Security Policy (CSP) with safe defaults. Get peace of mind and an A+ on Mozilla Observatory."
[taxonomies]
@ -30,6 +30,17 @@ The `allowed_domains` list specifies the URLs that the website should be able to
This feature allows you to easily customize the website's security headers to allow for specific use cases, such as embedding YouTube videos, loading scripts or remote fonts ([not recommended](https://www.albertovarela.net/blog/2022/11/stop-using-google-fonts/)).
**Note**: [enabling comments](@/blog/comments/index.md) or [analytics](@/blog/mastering-tabi-settings/index.md#analytics) automatically allows scripts/frames/styles/connections as needed from the respective services.
You can disable the CSP (allowing all connections) on a page, section, or globally by setting `enable_csp = false` in the front matter or `config.toml` file.
**Notes**:
- [Enabling comments](@/blog/comments/index.md), [analytics](@/blog/mastering-tabi-settings/index.md#analytics), or [mermaid diagrams](@/blog/shortcodes/index.md#mermaid-diagrams) automatically allows scripts/frames/styles/connections as needed.
- To use a [Zola built-in syntax highlighting theme](https://www.getzola.org/documentation/getting-started/configuration/#syntax-highlighting), you need to allow `unsafe-inline` in the `style-src` directive:
```
{ directive = "style-src", domains = ["'self'", "'unsafe-inline'"] },
```
---
[^1]: Requires proper webserver configuration (e.g. redirecting HTTP traffic to HTTPS).

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -0,0 +1,409 @@
+++
title = "Guia completa sobre sèries"
date = 2024-11-08
updated = 2025-02-21
description = "Aprèn a organitzar les teves publicacions en sèries seqüencials, perfectes per a tutorials, cursos i històries de diverses parts."
[taxonomies]
tags = ["funcionalitat", "tutorial", "preguntes freqüents", "sèries"]
[extra]
quick_navigation_buttons = true
toc = true
mermaid = true
social_media_card = "social_cards/ca_blog_series.jpg"
+++
Una sèrie organitza publicacions relacionades en ordre seqüencial, similar als capítols d'un llibre. A diferència de les etiquetes, que simplement agrupen contingut relacionat, les sèries suggereixen un ordre específic de lectura de principi a fi.
Les publicacions dins d'una sèrie no necessiten publicar-se de forma consecutiva; la funció de sèries reuneix publicacions temàticament vinculades en una seqüència coherent.
El següent diagrama il·lustra com les publicacions de la sèrie (3, 5 i 8) existeixen dins del flux principal del blog mentre mantenen la seva pròpia seqüència ordenada dins de Sèrie 1.
{% mermaid(full_width=true) %}
flowchart
subgraph main[BLOG]
P1[Post 1]
P2[P2]
P3[P3]
P4[P4]
P5[P5]
P6[P6]
P7[P7]
P8[P8]
P9[P9]
end
subgraph series1[SÈRIE 1]
PS1["Post Sèrie 1 (=P3)"]
PS2["Post Sèrie 2 (=P5)"]
PS3["Post Sèrie 3 (=P8)"]
end
P3 o-.-o PS1
P5 o-.-o PS2
P8 o-.-o PS3
{% end %}
## Inici ràpid
1. Crea un directori per a la teva sèrie
2. Crea `_index.md` al directori de la sèrie
3. Configura el front matter de `_index.md`:
```toml,name=series/_index.md
title = "Aprenent Rust"
template = "series.html"
sort_by = "slug"
transparent = true
[extra]
series = true
```
4. Crea els teus articles de la sèrie en aquest directori
Vols saber-ne més? Continua llegint!
## Com funcionen les sèries?
Una sèrie és simplement una secció que tabi gestiona de manera especial. Per a més detalls sobre seccions, consulta la [documentació de Zola](https://www.getzola.org/documentation/content/section/).
Prenent l'exemple del diagrama anterior, l'estructura de directoris seria així:
```txt
content/
_index.md
blog/
_index.md
post1/
index.md
post2/
index.md
post4/
index.md
post6/
index.md
post7/
index.md
post9/
index.md
serie1/
_index.md
post3/
index.md
post5/
index.md
post8/
index.md
```
Per crear una sèrie, necessites:
1. Utilitzar la plantilla `series.html`
2. Establir `series = true` a la configuració `[extra]` de la secció
3. Activar `transparent = true` per integrar les publicacions de la sèrie amb la secció del blog principal
La pàgina principal de la sèrie mostra un resum seguit d'una llista de totes les publicacions a la sèrie:
{{ dual_theme_image(light_src="blog/series/img/series_light.webp", dark_src="blog/series/img/series_dark.webp" alt="una sèrie", full_width=true) }}
## Saltar a les publicacions
Si el contingut d'una sèrie (el Markdown després del frontmatter a `_index.md`) supera els 2000 caràcters, apareix un enllaç "Salta a les publicacions" al costat del títol de la sèrie.
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enllaç per saltar a les publicacions de la sèrie", full_width=true) }}
Per forçar l'activació o desactivació d'aquesta funció, configura `show_jump_to_posts` a la secció `[extra]` de la teva secció de sèries o a `config.toml`. Aquesta configuració segueix [la jerarquia](@/blog/mastering-tabi-settings/index.ca.md#jerarquia-de-configuracio).
## Pàgines de sèries i ordre
Totes les pàgines a la secció de sèries seran pàgines de sèrie. Les pàgines s'ordenaran segons el `sort_by` de la secció.
Tot i que les sèries mantenen el seu propi ordre intern, romanen independents del flux cronològic de la secció principal (per exemple, `blog/`) gràcies a la configuració `transparent`.
### Opcions d'ordre
Tria entre aquests mètodes d'ordre, cadascun amb els seus avantatges:
{% wide_container() %}
`sort_by` | avantatges | desavantatges
---------|------------|---------------
`slug` | L'ordre de les pàgines és explícit a la ruta (per exemple, `example.com/blog/series1/01-series-post-un`). | Cada pàgina de la sèrie ha de tenir el prefix corresponent.
`weight` | L'ordre de les pàgines és fàcil de configurar de forma transparent.<br>La primera publicació té pes `1`, la segona pes `2` i així successivament. | Cada pàgina de la sèrie ha de tenir el seu pes configurat.
`date` | L'ordre de les pàgines es pot configurar una sola vegada a la configuració de la secció. No cal fer res a cada pàgina. | L'ordre de les pàgines s'ha d'invertir perquè la primera pàgina sol ser la més antiga. Això només es pot aconseguir paginant la secció (`paginate_by = 9999`) i invertint el seu ordre (`paginate_reversed = true`).
{% end %}
{{ admonition(type="danger", title="Versió de Zola per ordenar per data", text="Per invertir correctament les dates, es requereix Zola v0.19.3+ (no publicada) perquè la informació de paginació estigui disponible a través de la funció `get_section`. En cas contrari, qualsevol cosa que depengui de l'ordre de les pàgines de la sèrie no serà correcta (per exemple, pàgina anterior/següent, llistes ordenades i no ordenades...) Vegeu [Zola PR #2653](https://github.com/getzola/zola/pull/2653).") }}
### Indexació de pàgines
Les pàgines en una sèrie s'indexen començant des d'1, seguint el seu ordre `sort_by`. Per invertir la indexació (fent que la primera pàgina tingui l'índex més alt), afegeix aquesta configuració a `_index.md` o `config.toml`:
```toml
[extra]
post_listing_index_reversed = true # Per defecte és false si no es configura
```
{{ dual_theme_image(light_src="blog/series/img/series_reversed_light.webp", dark_src="blog/series/img/series_reversed_dark.webp" alt="una sèrie amb índexs invertits", full_width=true) }}
Aquesta configuració segueix [la jerarquia](@/blog/mastering-tabi-settings/index.ca.md#jerarquia-de-configuracio).
## Plantilles d'introducció i conclusió
Els articles d'una sèrie poden tenir seccions automàtiques d'introducció i conclusió. Aquestes es configuren al `_index.md` de la teva sèrie. Un exemple bàsic:
```toml,name=series/_index.md
[extra.series_intro_templates]
default = "Aquest article és part de la sèrie $SERIES_HTML_LINK."
[extra.series_outro_templates]
default = "Gràcies per llegir la part $SERIES_PAGE_INDEX de $SERIES_HTML_LINK!"
```
Les seccions d'introducció i conclusió tenen les seves pròpies classes CSS (`series-page-intro` i `series-page-outro`), que et permeten personalitzar la seva aparença mitjançant [CSS personalitzat](@/blog/mastering-tabi-settings/index.ca.md#estils-css-personalitzats).
### Tipus de plantilles
El sistema de sèries utilitza diferents plantilles segons la posició de l'article a la sèrie:
- `next_only` - Utilitzat per al primer article (té article següent però no anterior)
- `middle` - Utilitzat per a articles amb articles anterior i següent
- `prev_only` - Utilitzat per a l'últim article (té article anterior però no següent)
- `default` - Plantilla per defecte utilitzada quan no existeix una plantilla específica per a la posició
El sistema determina automàticament quina plantilla utilitzar segons la posició de l'article. Les plantilles es defineixen a la configuració de la sèrie (`_index.md`), com `extra.series_intro_templates` i `extra.series_outro_templates`:
```toml,name=series/_index.md
[extra.series_intro_templates]
next_only = "Benvingut a la part 1! Següent: $NEXT_HTML_LINK"
middle = "Anterior: $PREV_HTML_LINK | Següent: $NEXT_HTML_LINK"
prev_only = "El capítol final! Anteriorment: $PREV_HTML_LINK"
default = "Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER"
```
Totes les plantilles són opcionals. La selecció de plantilles segueix un sistema de prioritat:
1. Si existeix una plantilla específica per a la posició (`next_only`, `middle`, o `prev_only`), s'utilitzarà aquesta
2. Si no, s'utilitza la plantilla `default`
3. Si no es defineix cap plantilla, no es mostrarà informació de la sèrie
Mira l'[exemple de plantilla](#exemple-de-plantilla) per veure un exemple més elaborat.
### Ubicació al contingut
Per defecte:
- Les introduccions de sèrie apareixen a l'inici del teu article
- La conclusió apareix al final (abans de les notes al peu, si n'hi ha)
Pots controlar exactament on apareixen utilitzant `<!-- series_intro -->` i `<!-- series_outro -->` al teu Markdown:
```markdown
Aquest paràgraf apareix abans de la introducció de la sèrie.
<!-- series_intro -->
Contingut principal de l'article.
<!-- series_outro -->
## Recursos d'aprenentatge
Contingut addicional...
[^1]: Les notes al peu sempre apareixeran al final.
```
## Variables
Les plantilles de sèries utilitzen un sistema flexible de variables que et permet:
1. Fer referència a informació de la sèrie (títol, enllaços)
2. Afegir navegació entre articles
3. Mostrar indicadors de progrés
4. Incloure informació personalitzada utilitzant les teves pròpies variables
Les variables són marcadors que comencen amb `$` i es reemplacen amb contingut real quan es construeix el teu lloc. Per exemple, `$SERIES_HTML_LINK` es converteix en un enllaç clicable a la pàgina índex de la teva sèrie.
Hi ha tres tipus de variables:
- [Variables bàsiques de sèrie](#variables-basiques-de-serie): Informació general sobre la sèrie
- [Variables de navegació](#variables-de-navegacio): Enllaços a articles anterior/següent
- [Variables personalitzades](#variables-personalitzades): Els teus propis marcadors per a informació addicional
### Variables bàsiques de sèrie
{% wide_container() %}
| Variable | Disponibilitat | Retorna | Descripció | Exemple d'ús | Exemple de sortida |
|----------|---------------|----------|------------|--------------|-------------------|
| `$SERIES_TITLE` | Sempre | Text | Títol de la sèrie en text pla | `Part de $SERIES_TITLE` | Part d'Aprenent Rust |
| `$SERIES_PERMALINK` | Sempre | Text | URL a l'índex de la sèrie | `[Veure totes les publicacions]($SERIES_PERMALINK)` | [Veure totes les publicacions](/series/learn-rust) |
| `$SERIES_HTML_LINK` | Sempre | HTML | Enllaç llest per usar a la sèrie | `Benvingut a $SERIES_HTML_LINK!` | Benvingut a <a href="/series/learn-rust">Aprenent Rust</a>! |
| `$SERIES_PAGES_NUMBER` | Sempre | Nombre | Total d'articles a la sèrie | `Una sèrie de $SERIES_PAGES_NUMBER parts` | Una sèrie de 5 parts |
| `$SERIES_PAGE_INDEX` | Sempre | Nombre | Posició de l'article actual | `Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER` | Part 3 de 5 |
| `$SERIES_PAGES_OLIST` | Sempre | HTML | Llista ordenada de tots els articles | `Articles a la sèrie: $SERIES_PAGES_OLIST` | Articles a la sèrie: <ol><li>Article actual</li><li><a href="...">Altres articles</a></li></ol> |
| `$SERIES_PAGES_ULIST` | Sempre | HTML | Llista desordenada de tots els articles | `Articles a la sèrie: $SERIES_PAGES_ULIST` | Articles a la sèrie: <ul><li>Article actual</li><li><a href="...">Altres articles</a></li></ul> |
{% end %}
{{ admonition(type="tip", title="CONSELL: Text personalitzat amb permalinks", text='Els enllaços markdown com `[text]($SERIES_PERMALINK)` seran marcats (i [estilitzats](@/blog/mastering-tabi-settings/index.ca.md#indicador-d-enllacos-externs)) com externs. Si necessites text personalitzat i vols evitar l\'estil extern, utilitza HTML: `<a href=\"$SERIES_PERMALINK\">el teu text</a>`.') }}
### Variables de navegació
{% wide_container() %}
| Variable | Disponibilitat | Retorna | Descripció | Exemple d'ús | Exemple de sortida |
|----------|---------------|----------|------------|--------------|-------------------|
| `$PREV_TITLE` | Existeix anterior | Text | Títol de l'article anterior | `Anteriorment: $PREV_TITLE` | Anteriorment: Configurant el teu entorn |
| `$PREV_PERMALINK` | Existeix anterior | Text | URL a l'article anterior | `[← Enrere]($PREV_PERMALINK)` | [← Enrere](/series/learn-rust/setup) |
| `$PREV_HTML_LINK` | Existeix anterior | HTML | Enllaç llest per usar a l'anterior | `Llegeix primer $PREV_HTML_LINK` | Llegeix primer <a href="/series/learn-rust/setup">Configurant el teu entorn</a> |
| `$PREV_DESCRIPTION` | Existeix anterior | Text | Descripció de l'article anterior | `Resum: $PREV_DESCRIPTION` | Resum: Configurant Rust |
| `$NEXT_TITLE` | Existeix següent | Text | Títol del següent article | `Següent: $NEXT_TITLE` | Següent: Patrons avançats |
| `$NEXT_PERMALINK` | Existeix següent | Text | URL al següent article | `[Continuar →]($NEXT_PERMALINK)` | [Continuar →](/series/learn-rust/patterns) |
| `$NEXT_HTML_LINK` | Existeix següent | HTML | Enllaç llest per usar al següent | `Continua amb $NEXT_HTML_LINK` | Continua amb <a href="/series/learn-rust/patterns">Patrons avançats</a> |
| `$NEXT_DESCRIPTION` | Existeix següent | Text | Descripció del següent article | `Properament: $NEXT_DESCRIPTION` | Properament: Aprèn sobre les característiques avançades de pattern matching en Rust |
{% end %}
### Referència al primer article
{% wide_container() %}
| Variable | Disponibilitat | Retorna | Descripció | Exemple d'ús | Exemple de sortida |
|----------|---------------|----------|------------|--------------|-------------------|
| `$FIRST_TITLE` | Sempre | Text | Títol del primer article | `Comença amb $FIRST_TITLE` | Comença amb Introducció a Rust |
| `$FIRST_HTML_LINK` | Sempre | HTML | Enllaç llest per usar al primer article | `Comença a $FIRST_HTML_LINK` | Comença a <a href="/series/learn-rust/intro">Introducció a Rust</a> |
{% end %}
### Exemple de plantilla
{{ admonition(type="tip", title="Variables HTML vs text", text="Utilitza variables HTML (que acaben en `_HTML_LINK`) quan vulguis enllaços preparats per usar. Utilitza variables de text (que acaben en `_TITLE` o `_PERMALINK`) quan vulguis més control sobre el format.") }}
```toml,name=series/_index.md
# Introducció
[extra.series_intro_templates]
next_only = """
Benvingut a $SERIES_HTML_LINK! Aquesta sèrie de $SERIES_PAGES_NUMBER parts t'ensenyarà Rust des de zero.
Següent: $NEXT_HTML_LINK - $NEXT_DESCRIPTION
"""
middle = """
📚 Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER a $SERIES_HTML_LINK
Anterior: $PREV_HTML_LINK
Següent: $NEXT_HTML_LINK
"""
prev_only = """
Benvingut a l'última part de $SERIES_HTML_LINK!
Ets nou? Comença amb $FIRST_HTML_LINK per construir una base sòlida.
Anterior: $PREV_HTML_LINK
"""
# Plantilla de respatller
default = "Aquest article és part de la sèrie $SERIES_HTML_LINK."
# Conclusió
[extra.series_outro_templates]
next_only = """
Gràcies per llegir! 🙌
Continua el teu viatge amb $NEXT_HTML_LINK, on $NEXT_DESCRIPTION
O revisa l'esquema complet de la sèrie [$SERIES_TITLE]($SERIES_PERMALINK).
"""
middle = """
---
📝 Navegació de la sèrie
- Anterior: $PREV_HTML_LINK
- Següent: $NEXT_HTML_LINK
- [Resum de la sèrie]($SERIES_PERMALINK)
"""
prev_only = """
🎉 Felicitats! Has completat $SERIES_HTML_LINK.
Vols repassar? Aquí vam començar: $FIRST_HTML_LINK
O revisa el que acabem de veure a $PREV_HTML_LINK.
"""
# Respatller.
default = """
---
Aquest article és la part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER a $SERIES_HTML_LINK.
"""
```
### Variables personalitzades
Les plantilles de sèries admeten variables personalitzades per incloure informació addicional a tota la teva sèrie. El procés té dos passos:
1. Primer, defineix els teus **marcadors** a la configuració de la teva sèrie (`_index.md`):
```toml,name=series/_index.md
[extra]
series = true
series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
```
2. Després, a cada article de la sèrie, proporciona els valors per a aquests marcadors a `series_template_variables`:
```toml,name=series/article.md
[extra.series_template_variables]
position = "primer"
topic = "Variables i tipus"
difficulty = "Principiant"
```
### Ús de variables personalitzades
Pots usar les teves variables personalitzades a qualsevol plantilla, juntament amb les variables integrades:
```toml,name=series/_index.md
[extra.series_intro_templates]
default = """
Aquest és l'article $POSITION a $SERIES_HTML_LINK.
Tema d'avui: $TOPIC
Nivell de dificultat: $DIFFICULTY
"""
```
{{ admonition(type="warning", text="Encara que els marcadors es defineixen en majúscules (`$POSITION`), els noms de variables a `series_template_variables` han d'estar en minúscules (`position`).") }}
### Exemple amb variables personalitzades
```toml,name=series/_index.md
# A la configuració de la sèrie.
[extra]
series = true
series_template_placeholders = ["$LEARNING_TIME", "$KEY_CONCEPTS"]
series_intro_templates.default = """
📚 Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER
⏱️ Temps estimat: $LEARNING_TIME
🔑 Conceptes clau: $KEY_CONCEPTS
"""
```
```toml,name=series/02-learning-rust/index.md
# En un article de la sèrie.
[extra.series_template_variables]
learning_time = "30 minuts"
key_concepts = "Funcions, gestió d'errors, coincidència de patrons"
```
Això generarà:
```txt
📚 Part 2 de 5
⏱️ Temps estimat: 30 minuts
🔑 Conceptes clau: Funcions, gestió d'errors, coincidència de patrons
```
{{ admonition(type="warning", title="Variables que falten", text="Si uses un marcador a les teves plantilles però no proporciones el seu valor a `series_template_variables`, la compilació fallarà amb un error que llista les variables que falten.") }}

View file

@ -0,0 +1,409 @@
+++
title = "Guía completa sobre series"
date = 2024-11-08
updated = 2025-02-21
description = "Aprende a organizar tus publicaciones en series secuenciales, perfectas para tutoriales, cursos e historias de varias partes."
[taxonomies]
tags = ["funcionalidad", "tutorial", "preguntas frecuentes", "series"]
[extra]
quick_navigation_buttons = true
toc = true
mermaid = true
social_media_card = "social_cards/es_blog_series.jpg"
+++
Una serie organiza publicaciones relacionadas en orden secuencial, similar a los capítulos de un libro. A diferencia de las etiquetas, que simplemente agrupan contenido relacionado, las series sugieren un orden específico de lectura de principio a fin.
Las publicaciones dentro de una serie no necesitan publicarse de forma consecutiva; la función de series reúne publicaciones temáticamente vinculadas en una secuencia coherente.
El siguiente diagrama ilustra cómo las publicaciones de la serie (3, 5 y 8) existen dentro del flujo principal del blog mientras mantienen su propia secuencia ordenada dentro de Serie 1.
{% mermaid(full_width=true) %}
flowchart
subgraph main[BLOG]
P1[Post 1]
P2[P2]
P3[P3]
P4[P4]
P5[P5]
P6[P6]
P7[P7]
P8[P8]
P9[P9]
end
subgraph series1[SERIE 1]
PS1["Post Serie 1 (=P3)"]
PS2["Post Serie 2 (=P5)"]
PS3["Post Serie 3 (=P8)"]
end
P3 o-.-o PS1
P5 o-.-o PS2
P8 o-.-o PS3
{% end %}
## Inicio rápido
1. Crea un directorio para tu serie
2. Crea `_index.md` en el directorio de la serie
3. Configura el front matter de `_index.md`:
```toml,name=series/_index.md
title = "Aprendiendo Rust"
template = "series.html"
sort_by = "slug"
transparent = true
[extra]
series = true
```
4. Crea tus artículos de la serie en este directorio
¿Quieres saber más? ¡Sigue leyendo!
## ¿Cómo funcionan las series?
Una serie es simplemente una sección que tabi maneja de manera especial. Para más detalles sobre secciones, consulta la [documentación de Zola](https://www.getzola.org/documentation/content/section/).
Tomando el ejemplo del diagrama anterior, la estructura de directorios sería así:
```txt
content/
_index.md
blog/
_index.md
post1/
index.md
post2/
index.md
post4/
index.md
post6/
index.md
post7/
index.md
post9/
index.md
serie1/
_index.md
post3/
index.md
post5/
index.md
post8/
index.md
```
Para crear una serie, necesitas:
1. Usar la plantilla `series.html`
2. Establecer `series = true` en la configuración `[extra]` de la sección
3. Activar `transparent = true` para integrar las publicaciones de la serie con la sección del blog principal
La página principal de la serie muestra un resumen seguido de una lista de todas las publicaciones en la serie:
{{ dual_theme_image(light_src="blog/series/img/series_light.webp", dark_src="blog/series/img/series_dark.webp" alt="una serie", full_width=true) }}
## Saltar a las publicaciones
Si el contenido de una serie (el Markdown después del frontmatter en `_index.md`) supera los 2000 caracteres, aparece un enlace "Saltar a publicaciones" junto al título de la serie.
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enlace para saltar a las publicaciones de la serie", full_width=true) }}
Para forzar la activación o desactivación de esta función, configura `show_jump_to_posts` en la sección `[extra]` de tu sección de series o en `config.toml`. Esta configuración sigue [la jerarquía](@/blog/mastering-tabi-settings/index.es.md#jerarquia-de-configuracion).
## Páginas de series y orden
Todas las páginas en la sección de series serán páginas de serie. Las páginas se ordenarán según el `sort_by` de la sección.
Aunque las series mantienen su propio orden interno, permanecen independientes del flujo cronológico de la sección principal (por ejemplo, `blog/`) gracias a la configuración `transparent`.
### Opciones de orden
Elige entre estos métodos de orden, cada uno con sus ventajas:
{% wide_container() %}
`sort_by` | ventajas | desventajas
---------|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
`slug` | El orden de las páginas es explícito en la ruta (por ejemplo, `example.com/blog/series1/01-series-post-uno`). | Cada página de la serie debe tener el prefijo correspondiente.
`weight` | El orden de las páginas es fácil de configurar de forma transparente.<br>La primera publicación tiene peso `1`, la segunda peso `2` y así sucesivamente. | Cada página de la serie debe tener su peso configurado.
`date` | El orden de las páginas se puede configurar una sola vez en la configuración de la sección. No hay que hacer nada en cada página. | El orden de las páginas debe invertirse porque la primera página suele ser la más antigua. Esto solo se puede lograr paginando la sección (`paginate_by = 9999`) e invirtiendo su orden (`paginate_reversed = true`).
{% end %}
{{ admonition(type="danger", title="Versión de Zola para ordenar por fecha", text="Para invertir correctamente las fechas, se requiere Zola v0.19.3+ (no publicada) para que la información de paginación esté disponible a través de la función `get_section`. De lo contrario, cualquier cosa que dependa del orden de las páginas de la serie no será correcta (por ejemplo, página anterior/siguiente, listas ordenadas y no ordenadas...) Ver [Zola PR #2653](https://github.com/getzola/zola/pull/2653).") }}
### Indexación de páginas
Las páginas en una serie se indexan empezando desde 1, siguiendo su orden `sort_by`. Para invertir la indexación (haciendo que la primera página tenga el índice más alto), añade esta configuración a `_index.md` o `config.toml`:
```toml
[extra]
post_listing_index_reversed = true # Por defecto es false si no se configura
```
{{ dual_theme_image(light_src="blog/series/img/series_reversed_light.webp", dark_src="blog/series/img/series_reversed_dark.webp" alt="una serie con índices invertidos", full_width=true) }}
Esta configuración sigue [la jerarquía](@/blog/mastering-tabi-settings/index.es.md#jerarquia-de-configuracion).
## Plantillas de introducción y conclusión
Los artículos de una serie pueden tener secciones automáticas de introducción y conclusión. Estas se configuran en el `_index.md` de tu serie. Un ejemplo básico:
```toml,name=series/_index.md
[extra.series_intro_templates]
default = "Este artículo es parte de la serie $SERIES_HTML_LINK."
[extra.series_outro_templates]
default = "¡Gracias por leer la parte $SERIES_PAGE_INDEX de $SERIES_HTML_LINK!"
```
Las secciones de introducción y conclusión tienen sus propias clases CSS (`series-page-intro` y `series-page-outro`), lo que te permite personalizar su apariencia mediante [CSS personalizado](@/blog/mastering-tabi-settings/index.es.md#estilos-css-personalizados).
### Tipos de plantillas
El sistema de series usa diferentes plantillas según la posición del artículo en la serie:
- `next_only` - Usado para el primer artículo (tiene artículo siguiente pero no anterior)
- `middle` - Usado para artículos con artículos anterior y siguiente
- `prev_only` - Usado para el último artículo (tiene artículo anterior pero no siguiente)
- `default` - Plantilla por defecto usada cuando no existe una plantilla específica para la posición
El sistema determina automáticamente qué plantilla usar según la posición del artículo. Las plantillas se definen en la configuración de la serie (`_index.md`), como `extra.series_intro_templates` y `extra.series_outro_templates`:
```toml,name=series/_index.md
[extra.series_intro_templates]
next_only = "¡Bienvenido a la parte 1! Siguiente: $NEXT_HTML_LINK"
middle = "Anterior: $PREV_HTML_LINK | Siguiente: $NEXT_HTML_LINK"
prev_only = "¡El capítulo final! Anteriormente: $PREV_HTML_LINK"
default = "Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER"
```
Todas las plantillas son opcionales. La selección de plantillas sigue un sistema de prioridad:
1. Si existe una plantilla específica para la posición (`next_only`, `middle`, o `prev_only`), se usará esa
2. Si no, se usa la plantilla `default`
3. Si no se define ninguna plantilla, no se mostrará información de la serie
Mira el [ejemplo de plantilla](#ejemplo-de-plantilla) para ver un ejemplo más elaborado.
### Ubicación en el contenido
Por defecto:
- Las introducciones de serie aparecen al inicio de tu artículo
- La conclusión aparece al final (antes de las notas al pie, si las hay)
Puedes controlar exactamente dónde aparecen usando `<!-- series_intro -->` y `<!-- series_outro -->` en tu Markdown:
```markdown
Este párrafo aparece antes de la introducción de la serie.
<!-- series_intro -->
Contenido principal del artículo.
<!-- series_outro -->
## Recursos de aprendizaje
Contenido adicional...
[^1]: Las notas al pie siempre aparecerán al final.
```
## Variables
Las plantillas de series usan un sistema flexible de variables que te permite:
1. Hacer referencia a información de la serie (título, enlaces)
2. Añadir navegación entre artículos
3. Mostrar indicadores de progreso
4. Incluir información personalizada usando tus propias variables
Las variables son marcadores que comienzan con `$` y se reemplazan con contenido real cuando se construye tu sitio. Por ejemplo, `$SERIES_HTML_LINK` se convierte en un enlace clicable a la página índice de tu serie.
Hay tres tipos de variables:
- [Variables básicas de serie](#variables-basicas-de-serie): Información general sobre la serie
- [Variables de navegación](#variables-de-navegacion): Enlaces a artículos anterior/siguiente
- [Variables personalizadas](#variables-personalizadas): Tus propios marcadores para información adicional
### Variables básicas de serie
{% wide_container() %}
| Variable | Disponibilidad | Devuelve | Descripción | Ejemplo de uso | Ejemplo de salida |
|----------|---------------|-----------|-------------|----------------|-------------------|
| `$SERIES_TITLE` | Siempre | Texto | Título de la serie en texto plano | `Parte de $SERIES_TITLE` | Parte de Aprendiendo Rust |
| `$SERIES_PERMALINK` | Siempre | Texto | URL al índice de la serie | `[Ver todas las publicaciones]($SERIES_PERMALINK)` | [Ver todas las publicaciones](/series/learn-rust) |
| `$SERIES_HTML_LINK` | Siempre | HTML | Enlace listo para usar a la serie | `¡Bienvenido a $SERIES_HTML_LINK!` | ¡Bienvenido a <a href="/series/learn-rust">Aprendiendo Rust</a>! |
| `$SERIES_PAGES_NUMBER` | Siempre | Número | Total de artículos en la serie | `Una serie de $SERIES_PAGES_NUMBER partes` | Una serie de 5 partes |
| `$SERIES_PAGE_INDEX` | Siempre | Número | Posición del artículo actual | `Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER` | Parte 3 de 5 |
| `$SERIES_PAGES_OLIST` | Siempre | HTML | Lista ordenada de todos los artículos | `Artículos en la serie: $SERIES_PAGES_OLIST` | Artículos en la serie: <ol><li>Artículo actual</li><li><a href="...">Otros artículos</a></li></ol> |
| `$SERIES_PAGES_ULIST` | Siempre | HTML | Lista desordenada de todos los artículos | `Artículos en la serie: $SERIES_PAGES_ULIST` | Artículos en la serie: <ul><li>Artículo actual</li><li><a href="...">Otros artículos</a></li></ul> |
{% end %}
{{ admonition(type="tip", title="CONSEJO: Texto personalizado con permalinks", text='Los enlaces markdown como `[texto]($SERIES_PERMALINK)` serán marcados (y [estilizados](@/blog/mastering-tabi-settings/index.es.md#indicador-enlaces-externos)) como externos. Si necesitas texto personalizado y quieres evitar el estilo externo, usa HTML: `<a href=\"$SERIES_PERMALINK\">tu texto</a>`.') }}
### Variables de navegación
{% wide_container() %}
| Variable | Disponibilidad | Devuelve | Descripción | Ejemplo de uso | Ejemplo de salida |
|----------|---------------|-----------|-------------|----------------|-------------------|
| `$PREV_TITLE` | Existe anterior | Texto | Título del artículo anterior | `Anteriormente: $PREV_TITLE` | Anteriormente: Configurando tu entorno |
| `$PREV_PERMALINK` | Existe anterior | Texto | URL al artículo anterior | `[← Atrás]($PREV_PERMALINK)` | [← Atrás](/series/learn-rust/setup) |
| `$PREV_HTML_LINK` | Existe anterior | HTML | Enlace listo para usar al anterior | `Lee primero $PREV_HTML_LINK` | Lee primero <a href="/series/learn-rust/setup">Configurando tu entorno</a> |
| `$PREV_DESCRIPTION` | Existe anterior | Texto | Descripción del artículo anterior | `Resumen: $PREV_DESCRIPTION` | Resumen: Configurando Rust |
| `$NEXT_TITLE` | Existe siguiente | Texto | Título del siguiente artículo | `Siguiente: $NEXT_TITLE` | Siguiente: Patrones avanzados |
| `$NEXT_PERMALINK` | Existe siguiente | Texto | URL al siguiente artículo | `[Continuar →]($NEXT_PERMALINK)` | [Continuar →](/series/learn-rust/patterns) |
| `$NEXT_HTML_LINK` | Existe siguiente | HTML | Enlace listo para usar al siguiente | `Continúa con $NEXT_HTML_LINK` | Continúa con <a href="/series/learn-rust/patterns">Patrones avanzados</a> |
| `$NEXT_DESCRIPTION` | Existe siguiente | Texto | Descripción del siguiente artículo | `Próximamente: $NEXT_DESCRIPTION` | Próximamente: Aprende sobre las características avanzadas de pattern matching en Rust |
{% end %}
### Referencia al primer artículo
{% wide_container() %}
| Variable | Disponibilidad | Devuelve | Descripción | Ejemplo de uso | Ejemplo de salida |
|----------|---------------|-----------|-------------|----------------|-------------------|
| `$FIRST_TITLE` | Siempre | Texto | Título del primer artículo | `Comienza con $FIRST_TITLE` | Comienza con Introducción a Rust |
| `$FIRST_HTML_LINK` | Siempre | HTML | Enlace listo para usar al primer artículo | `Empieza en $FIRST_HTML_LINK` | Empieza en <a href="/series/learn-rust/intro">Introducción a Rust</a> |
{% end %}
### Ejemplo de plantilla
{{ admonition(type="tip", title="Variables HTML vs texto", text="Usa variables HTML (que terminan en `_HTML_LINK`) cuando quieras enlaces listos para usar. Usa variables de texto (que terminan en `_TITLE` o `_PERMALINK`) cuando quieras más control sobre el formato.") }}
```toml,name=series/_index.md
# Introducción.
[extra.series_intro_templates]
next_only = """
¡Bienvenido a $SERIES_HTML_LINK! Esta serie de $SERIES_PAGES_NUMBER partes te enseñará Rust desde cero.
Siguiente: $NEXT_HTML_LINK - $NEXT_DESCRIPTION
"""
middle = """
📚 Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER en $SERIES_HTML_LINK
Anterior: $PREV_HTML_LINK
Siguiente: $NEXT_HTML_LINK
"""
prev_only = """
¡Bienvenido a la última parte de $SERIES_HTML_LINK!
¿Eres nuevo? Comienza con $FIRST_HTML_LINK para construir una base sólida.
Anterior: $PREV_HTML_LINK
"""
# Plantilla de respaldo.
default = "Este artículo es parte de la serie $SERIES_HTML_LINK."
# Conclusión.
[extra.series_outro_templates]
next_only = """
¡Gracias por leer! 🙌
Continúa tu viaje con $NEXT_HTML_LINK, donde $NEXT_DESCRIPTION
O revisa el esquema completo de la serie [$SERIES_TITLE]($SERIES_PERMALINK).
"""
middle = """
---
📝 Navegación de la serie
- Anterior: $PREV_HTML_LINK
- Siguiente: $NEXT_HTML_LINK
- [Resumen de la serie]($SERIES_PERMALINK)
"""
prev_only = """
🎉 ¡Felicidades! Has completado $SERIES_HTML_LINK.
¿Quieres repasar? Aquí comenzamos: $FIRST_HTML_LINK
O revisa lo que acabamos de ver en $PREV_HTML_LINK.
"""
# Respaldo.
default = """
---
Este artículo es la parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER en $SERIES_HTML_LINK.
"""
```
### Variables personalizadas
Las plantillas de series admiten variables personalizadas para incluir información adicional en toda tu serie. El proceso tiene dos pasos:
1. Primero, define tus **marcadores** en la configuración de tu serie (`_index.md`):
```toml,name=series/_index.md
[extra]
series = true
series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
```
2. Luego, en cada artículo de la serie, proporciona los valores para estos marcadores en `series_template_variables`:
```toml,name=series/article.md
[extra.series_template_variables]
position = "primero"
topic = "Variables y tipos"
difficulty = "Principiante"
```
### Uso de variables personalizadas
Puedes usar tus variables personalizadas en cualquier plantilla, junto con las variables integradas:
```toml,name=series/_index.md
[extra.series_intro_templates]
default = """
Este es el artículo $POSITION en $SERIES_HTML_LINK.
Tema de hoy: $TOPIC
Nivel de dificultad: $DIFFICULTY
"""
```
{{ admonition(type="warning", text="Aunque los marcadores se definen en mayúsculas (`$POSITION`), los nombres de variables en `series_template_variables` deben estar en minúsculas (`position`).") }}
### Ejemplo con variables personalizadas
```toml,name=series/_index.md
# En la configuración de la serie.
[extra]
series = true
series_template_placeholders = ["$LEARNING_TIME", "$KEY_CONCEPTS"]
series_intro_templates.default = """
📚 Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER
⏱️ Tiempo estimado: $LEARNING_TIME
🔑 Conceptos clave: $KEY_CONCEPTS
"""
```
```toml,name=series/02-learning-rust/index.md
# En un artículo de la serie.
[extra.series_template_variables]
learning_time = "30 minutos"
key_concepts = "Funciones, manejo de errores, coincidencia de patrones"
```
Esto generará:
```txt
📚 Parte 2 de 5
⏱️ Tiempo estimado: 30 minutos
🔑 Conceptos clave: Funciones, manejo de errores, coincidencia de patrones
```
{{ admonition(type="warning", title="Variables faltantes", text="Si usas un marcador en tus plantillas pero no proporcionas su valor en `series_template_variables`, la compilación fallará con un error que lista las variables faltantes.") }}

View file

@ -0,0 +1,409 @@
+++
title = "A Complete Guide to Series"
date = 2024-11-08
updated = 2025-02-21
description = "Learn how to organize your posts into sequential series, perfect for tutorials, courses, and multi-part stories."
[taxonomies]
tags = ["showcase", "tutorial", "FAQ", "series"]
[extra]
quick_navigation_buttons = true
toc = true
mermaid = true
social_media_card = "social_cards/es_blog_series.jpg"
+++
A series organizes related posts in a sequential order, similar to chapters in a book. Unlike tags, which simply group related content, series suggest a specific reading order from start to finish.
Posts within a series do not need to be published consecutively; the series feature brings together thematically linked posts in a coherent sequence.
The diagram below illustrates how series posts (3, 5, and 8) exist within the main blog flow while maintaining their own ordered sequence within Series 1.
{% mermaid(full_width=true) %}
flowchart
subgraph main[BLOG]
P1[Post 1]
P2[P2]
P3[P3]
P4[P4]
P5[P5]
P6[P6]
P7[P7]
P8[P8]
P9[P9]
end
subgraph series1[SERIES 1]
PS1["Series Post 1 (=P3)"]
PS2["Series Post 2 (=P5)"]
PS3["Series Post 3 (=P8)"]
end
P3 o-.-o PS1
P5 o-.-o PS2
P8 o-.-o PS3
{% end %}
## Quick Start
1. Create a directory for your series.
2. Create `_index.md` in the series directory.
3. Set up the `_index.md` front matter:
```toml,name=series/_index.md
title = "Learning Rust"
template = "series.html"
sort_by = "slug"
transparent = true
[extra]
series = true
```
4. Create your series articles in this directory.
Want more? Keep reading!
## How Do Series Work?
A series is just a section which is handled in a special way by tabi. For more details on sections, see the [Zola documentation](https://www.getzola.org/documentation/content/section/).
Taking the example from the diagram above, the directory structure would be as follow:
```txt
content/
_index.md
blog/
_index.md
post1/
index.md
post2/
index.md
post4/
index.md
post6/
index.md
post7/
index.md
post9/
index.md
series1/
_index.md
post3/
index.md
post5/
index.md
post8/
index.md
```
To create a series, you need to:
1. Use the `series.html` template
2. Set `series = true` in the section's `[extra]` configuration
3. Enable `transparent = true` to integrate series posts with the parent blog section
The series main page displays an overview followed by a list of all posts in the series:
{{ dual_theme_image(light_src="blog/series/img/series_light.webp", dark_src="blog/series/img/series_dark.webp" alt="a series", full_width=true) }}
## Jump to Posts
If the content of a series (the Markdown after the front matter in `_index.md`) is over 2000 characters, a "Jump to posts" link appears next to the series title.
{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="jump to series posts link", full_width=true) }}
To force the feature on or off, set `show_jump_to_posts` in the `[extra]` section of your series section or in `config.toml`. This setting follows [the hierarchy](@/blog/mastering-tabi-settings/index.md#settings-hierarchy).
## Series Pages and Order
All pages in the series section will be a series page. The series pages will be ordered as per the series section `sort_by`.
While series maintain their own internal order, they remain independent from the main section's (e.g. `blog/`) chronological flow thanks to the `transparent` setting.
### Sorting Options
Choose from these sorting methods, each with its own advantages:
{% wide_container() %}
`sort_by` | pros | cons
---------|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
`slug` | The series pages order is made explicit in the path (e.g. `example.com/blog/series1/01-series-post-one`). | Each series page must be prefixed accordingly.
`weight` | The series pages order is easy to set up transparently.<br>First series post has weight `1`, second series post has weight `2` and so on. | Each series page must have its weight set accordingly.
`date` | The series pages order can be configured once in the series section configuration. No need to do anything on each series page. | The series pages order has to be reversed because the first page is usually the oldest. This can only be achieved by paginating the series section (`paginate_by = 9999`) and reversing its order (`paginate_reversed = true`).
{% end %}
{{ admonition(type="danger", title="Zola version to sort by date", text="In order to properly reverse dates, Zola v0.19.3+ (unreleased) is required so that pagination information is available through the `get_section` function. Anything relying on the series pages order won't be correct in a series page otherwise (e.g. previous/next series page, ordered and unordered list…) See [Zola PR #2653](https://github.com/getzola/zola/pull/2653).") }}
### Page Indexing
Pages in a series are indexed starting from 1, following their `sort_by` order. To reverse the indexing (making the first page have the highest index instead), add this setting to `_index.md` or `config.toml`:
```toml
[extra]
post_listing_index_reversed = true # Defaults to false if unset.
```
{{ dual_theme_image(light_src="blog/series/img/series_reversed_light.webp", dark_src="blog/series/img/series_reversed_dark.webp" alt="a series with indexes reversed", full_width=true) }}
This setting follows [the hierarchy](@/blog/mastering-tabi-settings/index.md#settings-hierarchy).
## Intro and Outro Templates
Series articles can have automatic introduction and conclusion sections. These are configured in your series' `_index.md`. A basic example:
```toml,name=series/_index.md
[extra.series_intro_templates]
default = "This article is part of the $SERIES_HTML_LINK series."
[extra.series_outro_templates]
default = "Thanks for reading part $SERIES_PAGE_INDEX of $SERIES_HTML_LINK!"
```
The intro and outro sections each have their own CSS classes (`series-page-intro` and `series-page-outro`), allowing you to customize their appearance through [custom CSS](@/blog/mastering-tabi-settings/index.md#custom-css).
### Template Types
The series system uses different templates based on an article's position in the series:
- `next_only` - Used for the first article (has next article but no previous)
- `middle` - Used for articles with both previous and next articles
- `prev_only` - Used for the last article (has previous article but no next)
- `default` - Fallback template used when a specific position template isn't defined
The system automatically determines which template to use based on the article's position. The templates are defined in the series configuration (`_index.md`), as `extra.series_intro_templates` and `extra.series_outro_templates`.:
```toml,name=series/_index.md
[extra.series_intro_templates]
next_only = "Welcome to part 1! Next up: $NEXT_HTML_LINK"
middle = "Previous: $PREV_HTML_LINK | Next: $NEXT_HTML_LINK"
prev_only = "The final chapter! Previously: $PREV_HTML_LINK"
default = "Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER"
```
All templates are optional. Template selection follows a priority system:
1. If a position-specific template exists (`next_only`, `middle`, or `prev_only`), it will be used
2. Otherwise, the `default` template is used
3. If no templates are defined at all, no series information will be displayed
See the [template example](#template-example) for a more elaborate example.
### Placement in Content
By default:
- Series introductions appear at the start of your article
- Series outro appears at the end (before footnotes, if any)
You can control exactly where these appear using `<!-- series_intro -->` and `<!-- series_outro -->` in your Markdown:
```markdown
This paragraph appears before the series introduction.
<!-- series_intro -->
Main content of the article.
<!-- series_outro -->
## Learning Resources
Extra content…
[^1]: Footnotes will always appear at the end.
```
## Variables
Series templates use a flexible variable system that lets you:
1. Reference series information (title, links)
2. Add navigation between articles
3. Show progress indicators
4. Include custom information using your own variables
Variables are placeholders starting with `$` that get replaced with actual content when your site builds. For example, `$SERIES_HTML_LINK` becomes a clickable link to your series index page.
There are three types of variables:
- [**Basic Series Variables**](#basic-series-variables): General information about the series
- [**Navigation Variables**](#navigation-variables): Links to previous/next articles
- [**Custom Variables**](#custom-variables): Your own placeholders for additional information
### Basic Series Variables
{% wide_container() %}
| Variable | Availability | Returns | Description | Example Usage | Example Output |
|----------|-------------|---------|-------------|---------------|----------------|
| `$SERIES_TITLE` | Always | Text | Plain text title of the series | `Part of $SERIES_TITLE` | Part of Learn Rust |
| `$SERIES_PERMALINK` | Always | Text | URL to series index | `[See all posts]($SERIES_PERMALINK)` | [See all posts](/series/learn-rust) |
| `$SERIES_HTML_LINK` | Always | HTML | Ready-to-use link to series | `Welcome to $SERIES_HTML_LINK!` | Welcome to <a href="/series/learn-rust">Learn Rust</a>! |
| `$SERIES_PAGES_NUMBER` | Always | Number | Total articles in series | `A $SERIES_PAGES_NUMBER part series` | A 5 part series |
| `$SERIES_PAGE_INDEX` | Always | Number | Current article's position | `Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER` | Part 3 of 5 |
| `$SERIES_PAGES_OLIST` | Always | HTML | Ordered list of all articles | `Articles in series: $SERIES_PAGES_OLIST` | Articles in series: <ol><li>Current article</li><li><a href="...">Other articles</a></li></ol> |
| `$SERIES_PAGES_ULIST` | Always | HTML | Unordered list of all articles | `Articles in series: $SERIES_PAGES_ULIST` | Articles in series: <ul><li>Current article</li><li><a href="...">Other articles</a></li></ul> |
{% end %}
{{ admonition(type="tip", title="TIP: Custom text with permalinks", text='Markdown links like `[text]($SERIES_PERMALINK)` will be marked (and [styled](@/blog/mastering-tabi-settings/index.md#external-link-indicator)) as external. If you need custom text and want to avoid external styling, use HTML: `<a href=\"$SERIES_PERMALINK\">your text</a>`.') }}
### Navigation Variables
{% wide_container() %}
| Variable | Availability | Returns | Description | Example Usage | Example Output |
|----------|-------------|---------|-------------|---------------|----------------|
| `$PREV_TITLE` | Previous exists | Text | Previous article's title | `Previously: $PREV_TITLE` | Previously: Setting Up Your Environment |
| `$PREV_PERMALINK` | Previous exists | Text | URL to previous article | `[← Back]($PREV_PERMALINK)` | [← Back](/series/learn-rust/setup) |
| `$PREV_HTML_LINK` | Previous exists | HTML | Ready-to-use link to previous | `Read $PREV_HTML_LINK first` | Read <a href="/series/learn-rust/setup">Setting Up Your Environment</a> first |
| `$PREV_DESCRIPTION` | Previous exists | Text | Description of previous article | `Recap: $PREV_DESCRIPTION` | Recap: Setting up Rust |
| `$NEXT_TITLE` | Next exists | Text | Next article's title | `Next up: $NEXT_TITLE` | Next up: Advanced Patterns |
| `$NEXT_PERMALINK` | Next exists | Text | URL to next article | `[Continue →]($NEXT_PERMALINK)` | [Continue →](/series/learn-rust/patterns) |
| `$NEXT_HTML_LINK` | Next exists | HTML | Ready-to-use link to next | `Continue with $NEXT_HTML_LINK` | Continue with <a href="/series/learn-rust/patterns">Advanced Patterns</a> |
| `$NEXT_DESCRIPTION` | Next exists | Text | Description of next article | `Coming up: $NEXT_DESCRIPTION` | Coming up: Learn about Rust's advanced pattern matching features |
{% end %}
### First Article Reference
{% wide_container() %}
| Variable | Availability | Returns | Description | Example Usage | Example Output |
|----------|-------------|---------|-------------|---------------|----------------|
| `$FIRST_TITLE` | Always | Text | First article's title | `Start with $FIRST_TITLE` | Start with Introduction to Rust |
| `$FIRST_HTML_LINK` | Always | HTML | Ready-to-use link to first article | `Begin at $FIRST_HTML_LINK` | Begin at <a href="/series/learn-rust/intro">Introduction to Rust</a> |
{% end %}
### Template Example
{{ admonition(type="tip", title="HTML vs text variables", text="Use HTML variables (ending in `_HTML_LINK`) when you want ready-made links. Use text variables (ending in `_TITLE` or `_PERMALINK`) when you want more control over the formatting.") }}
```toml,name=series/_index.md
# Introduction.
[extra.series_intro_templates]
next_only = """
Welcome to $SERIES_HTML_LINK! This $SERIES_PAGES_NUMBER-part series will teach you Rust from scratch.
Up next: $NEXT_HTML_LINK - $NEXT_DESCRIPTION
"""
middle = """
📚 Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER in $SERIES_HTML_LINK
Previously: $PREV_HTML_LINK
Next up: $NEXT_HTML_LINK
"""
prev_only = """
Welcome to the final part of $SERIES_HTML_LINK!
New here? Start with $FIRST_HTML_LINK to build a strong foundation.
Previously: $PREV_HTML_LINK
"""
# Fallback template.
default = "This article is part of the $SERIES_HTML_LINK series."
# Outro.
[extra.series_outro_templates]
next_only = """
Thanks for reading! 🙌
Continue your journey with $NEXT_HTML_LINK, where $NEXT_DESCRIPTION
Or check out the complete [$SERIES_TITLE]($SERIES_PERMALINK) series outline.
"""
middle = """
---
📝 Series Navigation
- Previous: $PREV_HTML_LINK
- Next: $NEXT_HTML_LINK
- [Series Overview]($SERIES_PERMALINK)
"""
prev_only = """
🎉 Congratulations! You've completed $SERIES_HTML_LINK.
Want to review? Here's where we started: $FIRST_HTML_LINK
Or check what we just covered in $PREV_HTML_LINK.
"""
# Fallback.
default = """
---
This article is part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER in $SERIES_HTML_LINK.
"""
```
### Custom Variables
Series templates support custom variables for additional information you want to include across your series. The process takes two steps:
1. First, define your **placeholders** in your series configuration (`_index.md`):
```toml,name=series/_index.md
[extra]
series = true
series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
```
2. Then, in each series article, provide the values for these placeholders in `series_template_variables`:
```toml,name=series/article.md
[extra.series_template_variables]
position = "first"
topic = "Variables and Types"
difficulty = "Beginner"
```
### Using Custom Variables
You can use your custom variables in any template, alongside the built-in variables:
```toml,name=series/_index.md
[extra.series_intro_templates]
default = """
This is the $POSITION article in $SERIES_HTML_LINK.
Today's topic: $TOPIC
Difficulty level: $DIFFICULTY
"""
```
{{ admonition(type="warning", text="While placeholders are defined with uppercase (`$POSITION`), the variable names in `series_template_variables` must be lowercase (`position`).") }}
### Example with Custom Variables
```toml,name=series/_index.md
# In the series configuration.
[extra]
series = true
series_template_placeholders = ["$LEARNING_TIME", "$KEY_CONCEPTS"]
series_intro_templates.default = """
📚 Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER
⏱️ Estimated time: $LEARNING_TIME
🔑 Key concepts: $KEY_CONCEPTS
"""
```
```toml,name=series/02-learning-rust/index.md
# In an article of the series.
[extra.series_template_variables]
learning_time = "30 minutes"
key_concepts = "Functions, Error Handling, Pattern Matching"
```
This will output:
```txt
📚 Part 2 of 5
⏱️ Estimated time: 30 minutes
🔑 Key concepts: Functions, Error Handling, Pattern Matching
```
{{ admonition(type="warning", title="Missing Variables", text="If you use a placeholder in your templates but don't provide its value in `series_template_variables`, the build will fail with an error listing the missing variables.") }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View file

@ -1,7 +1,7 @@
+++
title = "Shortcodes personalitzats"
date = 2023-02-19
updated = 2023-11-24
updated = 2025-08-01
description = "Aquest tema inclou alguns shortcodes personalitzats útils que pots utilitzar per millorar les teves publicacions. Ja sigui per mostrar imatges que s'adapten als temes clar i fosc, o per donar format a una secció de referències amb un aspecte professional, aquests shortcodes personalitzats t'ajudaran."
[taxonomies]
@ -11,14 +11,108 @@ tags = ["funcionalitat", "shortcodes"]
toc = true
toc_levels = 2
quick_navigation_buttons = true
code_block_name_links = true
mermaid = true
social_media_card = "social_cards/ca_blog_shortcodes.jpg"
+++
## Shortcodes de diagrames
### Diagrames de Mermaid
[Mermaid](https://github.com/mermaid-js/mermaid) és una eina de diagramació i gràfics que utilitza text i codi per generar diagrames. Admet diagrames de flux, diagrames de seqüència, gràfics de Gantt i més.
Per incloure un diagrama Mermaid a la teva publicació, cal fer dues coses:
1. Estableix `mermaid = true` a la secció `[extra]` del front matter de la teva pàgina, secció o `config.toml`. Això carregarà el JavaScript necessari per renderitzar els diagrames.
2. Utilitza el shortcode `mermaid()` per definir el teu diagrama. Per exemple:
```txt
{%/* mermaid() */%}
classDiagram
class DistorsionsCognitives {
+PensamentTotORes()
+Sobregeneralitzacio()
+FiltreMental()
+TreureConclusionsPrecipitades()
}
class PensamentTotORes {
+VeureEnExtrems()
}
class Sobregeneralitzacio {
+GeneralitzarDUnic()
}
class FiltreMental {
+EnfocarseEnNegatiu()
}
class TreureConclusionsPrecipitades {
+FerSuposicions()
}
DistorsionsCognitives *-- PensamentTotORes
DistorsionsCognitives *-- Sobregeneralitzacio
DistorsionsCognitives *-- FiltreMental
DistorsionsCognitives *-- TreureConclusionsPrecipitades
{%/* end */%}
```
El diagrama es renderitzarà així:
{% mermaid() %}
classDiagram
class DistorsionsCognitives {
+PensamentTotORes()
+Sobregeneralitzacio()
+FiltreMental()
+TreureConclusionsPrecipitades()
}
class PensamentTotORes {
+VeureEnExtrems()
}
class Sobregeneralitzacio {
+GeneralitzarDUnic()
}
class FiltreMental {
+EnfocarseEnNegatiu()
}
class TreureConclusionsPrecipitades {
+FerSuposicions()
}
DistorsionsCognitives *-- PensamentTotORes
DistorsionsCognitives *-- Sobregeneralitzacio
DistorsionsCognitives *-- FiltreMental
DistorsionsCognitives *-- TreureConclusionsPrecipitades
{% end %}
El shortcode de Mermaid admet dos paràmetres:
- `invertible`: Si s'estableix a `true` (per defecte), el diagrama invertirà els seus colors en mode fosc, igual que les [imatges invertibles](#imatge-invertible).
- `full_width`: Permet que el diagrama ocupi l'amplada de la capçalera. Mira [imatge d'amplada completa](#imatge-d-amplada-completa).
{{ admonition(type="tip", title="CONSELL", text="Empra l'[editor de Mermaid](https://mermaid.live/) per crear i previsualitzar els teus diagrames.") }}
#### Ús
```
{%/* mermaid(invertible=true, full_width=false) */%}
El teu codi Mermaid va aquí.
`invertible` or `full_width` poden ometre's per emprar els valors per defecte.
{%/* end */%}
```
## Shortcodes d'imatge
**Nota**: tots els shortcodes d'imatge tenen dos paràmetres opcionals: `full_width`, que té com a valor predeterminat `false` (vegeu [a sota](#imatge-d-amplada-completa)), i `lazy_loading`, que té com a valor predeterminat `true`.
Tots els shortcodes d'imatge admeten rutes absolutes, rutes relatives, i fonts remotes en el paràmetre `src`.
**Nota 2**: a partir del [PR #222](https://github.com/welpo/tabi/pull/222) (commit [7796162](https://github.com/welpo/tabi/commit/7796162e378cacb9b4d6129f95138121224714f1)), tots els shortcodes d'imatges suporten rutes relatives pel paràmetre `src`.
Tots els shortcodes d'imatge tenen els següents paràmetres opcionals:
- `raw_path`. Per defecte és `false`. Si es configura a `true`, el paràmetre `src` s'utilitzarà tal qual. Útil per a actius ubicats a la mateixa carpeta que tenen un slug personalitzat (vegeu [Zola issue #2598](https://github.com/getzola/zola/issues/2598)).
- `inline`. Valor predeterminat: `false`. Si s'estableix a `true`, la imatge es mostrarà en línia amb el text.
- `full_width`. Valor predeterminat: `false` (vegeu [a sota](#imatge-d-amplada-completa)).
- `lazy_loading`. Valor predeterminat: `true`.
### Imatges per a temes duals
@ -93,8 +187,201 @@ Tots els altres shortcodes d'imatges poden utilizar l'amplada completa assignant
{{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Fotografia d'un canal a Àmsterdam") */}}
```
## Shortcodes socials
### iine
{{ aside(text="Per afegir-lo a totes les publicacions, estableix `iine = true` a la secció `[extra]` del teu `config.toml`.") }}
Aquest shortcode et permet afegir botons addicionals d'[iine.to](https://iine.to) a les teves publicacions, com aquest:
{{ iine(slug="/blog/shortcodes/demo-button") }}
#### Ús
```
{{/* iine(icon="heart", slug="/post/el-meu-slug-de-post/like", label="M'agrada aquesta publicació") */}}
```
El shortcode accepta els següents paràmetres opcionals:
- `icon`: La icona a mostrar. Pot ser `heart`, `thumbs_up`, `upvote`, o qualsevol emoji.
- `slug`: Un identificador únic. Per defecte és la ruta de la pàgina actual. Útil si vols més d'un botó a la mateixa pàgina.
- `label`: L'etiqueta d'accessibilitat per al botó. Per defecte és "M'agrada aquesta publicació".
## Shortcodes de codi
### Mostrar ruta o URL
Pots mostrar una ruta o URL per a un bloc de codi utilitzant la sintaxi nativa de Zola:
{{ aside(text="Requereix Zola 0.20.0 o superior.") }}
````
```rust,name=src/main.rs
fn main() {
println!("Hola, món!");
}
```
````
Això renderitza:
```rust,name=src/main.rs
fn main() {
println!("Hola, món!");
}
```
Si estableixes el `name` com una URL (és a dir, comença amb `http` o `https`), pots convertir-lo en un enllaç clicable. Això és particularment útil quan s'utilitza juntament amb el [shortcode de text remot](#text-remot).
{{ admonition(type="warning", title="JavaScript necessari", text="La funció d'URLs clicables requereix JavaScript. Per habilitar-la, configura `code_block_name_links = true` a la secció `[extra]` de la teva pàgina, secció, o `config.toml`.") }}
```.gitignore,name=https://github.com/welpo/doteki/blob/main/.gitignore
__pycache__/
*coverage*
.vscode/
dist/
```
### Suport de shortcode heretat
El shortcode `add_src_to_code_block` segueix funcionant per retrocompatibilitat però serà descontinuat en una versió futura. Si us plau, utilitza la sintaxi nativa de Zola:
```
# Forma antiga (descontinuada):
{{/* add_src_to_code_block(src="ruta/al/fitxer.rs") */}}
# Forma nova (recomanada):
```rust,name=ruta/al/fitxer.rs
```
#### Ús
````
{{/* add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") */}}
```.gitignore
**pycache**/
*coverage*
.vscode/
dist/
```
````
## Shortcodes de text
### Aside (nota al marge)
Afegeix contingut complementari als marges en pantalles amples, o com a blocs distintius en mòbil.
{{ aside(text="*Nota al marge* ve de *nota* (del llatí, 'marca' o 'senyal') i *marge* (del llatí *margo*, 'vora' o 'límit').") }}
El shortcode accepta dos paràmetres:
- `position`: Establir com a `"right"` per col·locar al marge dret (per defecte, esquerre)
- El contingut es pot proporcionar mitjançant el paràmetre `text` o entre les etiquetes del shortcode
#### Ús
{{ admonition(type="warning", text="Separa la definició de la nota del shortcode amb dues línies en blanc per evitar errors de renderització.") }}
Fent servir el paràmetre `text`:
```
{{/* aside(text="*Nota al marge* ve de *nota* (del llatí, 'marca' o 'senyal') i *marge* (del llatí *margo*, 'vora' o 'límit').") */}}
```
Fent servir el cos del contingut i indicant la posició a la dreta:
```
{%/* aside(position="right") */%}
Una nota més llarga que
pot ocupar diverses línies.
S'admet *Markdown*.
{%/* end */%}
```
### Text remot
Afegeix text des d'una URL remota o un arxiu local.
El shortcode accepta tres paràmetres:
- `src`: L'URL d'origen o ruta del fitxer (obligatori)
- `start`: Primera línia a mostrar (opcional, comença a 1)
- `end`: Número de l'última línia (opcional, per defecte és 0, l'última línia)
{{ admonition(type="info", text="`start` i `end` són inclusius. `start=3, end=3` mostrarà només la tercera línia.") }}
**Important**:
- **Arxius remots VS arxius locals**: Si `src` comença amb "http", es tractarà com un arxiu remot. D'altra banda, s'assumeix que és una ruta d'arxiu local.
- **Accés a arxius**: Atès que utilitza la funció [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, els arxius locals han d'estar dins del directori de Zola —vegeu la [lògica de cerca d'arxius](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). Desde [tabi 2.16.0](https://github.com/welpo/tabi/releases/tag/v2.16.0), el shortcode admet també rutes relatives.
- **Formateig de blocs de codi**: Per mostrar el text com un bloc de codi, has d'afegir manualment les tanques de codi Markdown (cometes inverses) i, opcionalment, especificar el llenguatge de programació per al ressaltat sintàctic.
#### Ús
Afegeix un script de Python remot dins d'un bloc de codi amb ressaltat sintàctic:
````
```python
{{/* remote_text(src="https://example.com/script.py") */}}
```
````
Mostra el text d'un arxiu local:
```
{{/* remote_text(src="ruta/a/arxiu.txt") */}}
```
Mostreu només les línies 3 a 5 d'un arxiu local:
```
{{/* remote_text(src="ruta/a/arxiu.txt", start=3, end=5) */}}
```
### Advertències
Destaca informació amb aquests shortcodes. Hi ha cinc tipus (`type`): `note`, `tip`, `info`, `warning`, i `danger`.
{{ admonition(type="note", text="Contingut amb **sintaxi** *Markdown*. Consulta [aquesta `api`](#).") }}
{{ admonition(type="tip", text="Contingut amb **sintaxi** *Markdown*. Consulta [aquesta `api`](#).") }}
{{ admonition(type="info", text="Contingut amb **sintaxi** *Markdown*. Consulta [aquesta `api`](#).") }}
{{ admonition(type="warning", text="Contingut amb **sintaxi** *Markdown*. Consulta [aquesta `api`](#).") }}
{{ admonition(type="danger", text="Contingut amb **sintaxi** *Markdown*. Consulta [aquesta `api`](#).") }}
Pots canviar el `title` i la `icon` de l'advertència. Ambdós paràmetres accepten text i per defecte coincideixen amb el tipus d'advertència. `icon` pot ser qualsevol dels tipus d'advertència disponibles.
{{ admonition(type="note", icon="tip", title="Títol i icona personalitzats", text="Contingut amb **sintaxi** *Markdown*. Consulta [aquesta `api`](#).") }}
#### Ús
Pots utilitzar les advertències de dues maneres:
1. En línia amb paràmetres:
```md
{{/* admonition(type="danger", icon="tip", title="Un consell important", text="Mantingues-te hidratat") */}}
```
2. Amb contingut al cos:
```md
{%/* admonition(type="danger", icon="tip", title="Un consell important") */%}
Mantingues-te hidratat
Aquest mètode és especialment útil per a contingut llarg o múltiples paràgrafs.
{%/* end */%}
```
Ambdós mètodes admeten els mateixos paràmetres (`type`, `icon`, i `title`).
### Cites multillenguatge
Aquest shortcode permet mostrar una cita traduïda i en el llenguatge original:
@ -178,3 +465,31 @@ El Markdown, per suposat, serà interpretat.
{%/* end */%}
```
### Forçar direcció del text
Força la direcció del text d'un bloc de contingut. Substitueix tant la configuració global `force_codeblock_ltr` com la direcció general del document.
Accepta el paràmetre `direction`: la direcció de text desitjada. Pot ser "ltr" (d'esquerra a dreta) o "rtl" (de dreta a esquerra). Per defecte és "ltr".
{% force_text_direction(direction="rtl") %}
```python
def مرحباالعالم():
print("مرحبا بالعالم!")
```
{% end %}
#### Ús
En una pàgina LTR podem forçar que un bloc de codi sigui RTL (com es mostra a dalt) de la següent manera:
````
{%/* force_text_direction(direction="rtl") */%}
```python
def مرحباالعالم():
print("مرحبا بالعالم!")
```
{%/* end */%}
````

View file

@ -1,7 +1,7 @@
+++
title = "Shortcodes personalizados"
date = 2023-02-19
updated = 2023-11-24
updated = 2025-08-01
description = "Este tema incluye algunos shortcodes personalizados útiles que puedes utilizar para mejorar tus publicaciones. Puedes mostrar imágenes que se adapten a los temas claro y oscuro, dar formato a una sección de referencias con un aspecto profesional, y más."
[taxonomies]
@ -11,14 +11,106 @@ tags = ["funcionalidad", "shortcodes"]
toc = true
toc_levels = 2
quick_navigation_buttons = true
code_block_name_links = true
mermaid = true
social_media_card = "social_cards/es_blog_shortcodes.jpg"
+++
## Shortcodes de diagramas
### Diagramas de Mermaid
[Mermaid](https://github.com/mermaid-js/mermaid) es una herramienta de diagramación y gráficos que usa texto y código para generar diagramas. Admite diagramas de flujo, diagramas de secuencia, gráficos de Gantt y más.
Para incluir un diagrama Mermaid en tu publicación, sigue estos dos pasos:
1. Establece `mermaid = true` en la sección `[extra]` del front matter de tu página, sección o `config.toml`. Esto cargará el JavaScript necesario para renderizar los diagramas.
2. Usa el shortcode `mermaid()` para definir tu diagrama. Por ejemplo:
```txt
{%/* mermaid() */%}
classDiagram
class DistorsionesCognitivas {
+PensamientoTodoONada()
+Sobregeneralizacion()
+FiltroMental()
+SacarConclusionesPrecipitadas()
}
class PensamientoTodoONada {
+VerEnExtremos()
}
class Sobregeneralizacion {
+GeneralizarDeUnicoEjemplo()
}
class FiltroMental {
+EnfocarseEnNegativo()
}
class SacarConclusionesPrecipitadas {
+HacerSuposiciones()
}
DistorsionesCognitivas *-- PensamientoTodoONada
DistorsionesCognitivas *-- Sobregeneralizacion
DistorsionesCognitivas *-- FiltroMental
DistorsionesCognitivas *-- SacarConclusionesPrecipitadas
{%/* end */%}
```
El diagrama se renderizará así:
{% mermaid() %}
classDiagram
class DistorsionesCognitivas {
+PensamientoTodoONada()
+Sobregeneralizacion()
+FiltroMental()
+SacarConclusionesPrecipitadas()
}
class PensamientoTodoONada {
+VerEnExtremos()
}
class Sobregeneralizacion {
+GeneralizarDeUnicoEjemplo()
}
class FiltroMental {
+EnfocarseEnNegativo()
}
class SacarConclusionesPrecipitadas {
+HacerSuposiciones()
}
DistorsionesCognitivas *-- PensamientoTodoONada
DistorsionesCognitivas *-- Sobregeneralizacion
DistorsionesCognitivas *-- FiltroMental
DistorsionesCognitivas *-- SacarConclusionesPrecipitadas
{% end %}
El shortcode de Mermaid admite dos parámetros:
- `invertible`: Si se establece en `true` (por defecto), el diagrama se invertirá en modo oscuro, igual que las [imágenes invertibles](#imagen-invertible).
- `full_width`: Permite que el diagrama ocupe el ancho del encabezado. Mira [imagen a ancho completo](#imagen-a-ancho-completo).
{{ admonition(type="tip", title="CONSEJO", text="Puedes usar el [editor de Mermaid](https://mermaid.live/) para crear y previsualizar tus diagramas.") }}
#### Uso
```
{%/* mermaid(invertible=true, full_width=false) */%}
Tu diagrama Mermaid va aquí. Puedes omitir los parámetros para usar los valores predeterminados.
{%/* end */%}
```
## Shortcodes de imagen
**Nota**: todos los shortcodes de imagen tienen dos parámetros opcionales: `full_width`, que tiene como valor predeterminado `false` (ver [más abajo](#imagen-a-ancho-completo)), y `lazy_loading`, que tiene como valor predeterminado `true`.
Todos los shortcodes de imagen admiten rutas absolutas, rutas relativas, y fuentes remotas en el parámetro `src`.
**Nota 2**: a partir del [PR #222](https://github.com/welpo/tabi/pull/222) (commit [7796162](https://github.com/welpo/tabi/commit/7796162e378cacb9b4d6129f95138121224714f1)), todos los shortcodes de imágenes admiten rutas relativas en el parámetro `src`.
Todos los shortcodes de imagen tienen los siguientes parámetros opcionales:
- `raw_path`. Por defecto es `false`. Si se establece en `true`, el parámetro `src` se usará tal cual. Útil para activos ubicados en la misma carpeta que tienen un slug personalizado (ver [Zola issue #2598](https://github.com/getzola/zola/issues/2598)).
- `inline`. Valor predeterminado: `false`. Si se establece `true`, la imagen se mostrará en línea con el texto.
- `full_width`. Valor predeterminado: `false` (ver [más abajo](#imagen-a-ancho-completo)).
- `lazy_loading`. Valor predeterminado: `true`.
### Imágenes de doble tema
@ -94,8 +186,189 @@ Todos los otros shortcodes de imágenes pueden usar el ancho completo asignando
{{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Fotografía de un canal en Ámsterdam") */}}
```
## Shortcodes sociales
### iine
{{ aside(text="Para añadirlo a todas las publicaciones, establece `iine = true` en la sección `[extra]` de tu `config.toml`.") }}
Este shortcode te permite añadir botones adicionales de [iine.to](https://iine.to) a tus publicaciones, como este:
{{ iine(slug="/blog/shortcodes/demo-button") }}
#### Uso
```
{{/* iine(icon="heart", slug="/post/mi-slug-de-post/like", label="Me gusta esta publicación") */}}
```
El shortcode acepta los siguientes parámetros opcionales:
- `icon`: El icono a mostrar. Puede ser `heart`, `thumbs_up`, `upvote`, o cualquier emoji.
- `slug`: Un identificador único. Por defecto es la ruta de la página actual. Útil si quieres más de un botón en la misma página.
- `label`: La etiqueta de accesibilidad para el botón. Por defecto es "Me gusta esta publicación".
## Shortcodes de código
### Mostrar ruta o URL
Puedes mostrar una ruta o URL para un bloque de código usando la sintaxis nativa de Zola:
{{ aside(text="Requiere Zola 0.20.0 o superior.") }}
````
```rust,name=src/main.rs
fn main() {
println!("¡Hola, mundo!");
}
```
````
Esto renderiza:
```rust,name=src/main.rs
fn main() {
println!("¡Hola, mundo!");
}
```
Si estableces el `name` como una URL (es decir, comienza con `http` o `https`), puedes convertirlo en un enlace clickable. Esto es particularmente útil cuando se usa junto con el [shortcode de texto remoto](#texto-remoto).
{{ admonition(type="warning", title="JavaScript requerido", text="La función de URLs clickables requiere JavaScript. Para habilitarla, configura `code_block_name_links = true` en la sección `[extra]` de tu página, sección, o `config.toml`.") }}
```.gitignore,name=https://github.com/welpo/doteki/blob/main/.gitignore
__pycache__/
*coverage*
.vscode/
dist/
```
### Soporte de shortcode heredado
El shortcode `add_src_to_code_block` sigue funcionando por retrocompatibilidad, pero será descontinuado en una versión futura. Por favor, usa la sintaxis nativa de Zola:
```
# Forma antigua (descontinuada):
{{/* add_src_to_code_block(src="ruta/al/archivo.rs") */}}
# Forma nueva (recomendada):
```rust,name=ruta/al/archivo.rs
```
## Shortcodes de texto
### Aside (nota al margen)
Añade contenido complementario en los márgenes en pantallas anchas, o como bloques distintivos en móvil.
{{ aside(text="*Nota al margen* viene de *nota* (del latín, 'marca' o 'señal') y *margen* (del latín *margo*, 'borde' o 'límite').") }}
El shortcode acepta dos parámetros:
- `position`: Establecer como `"right"` para colocar en el margen derecho (por defecto, izquierdo)
- El contenido puede proporcionarse mediante el parámetro `text` o entre las etiquetas del shortcode
#### Uso
{{ admonition(type="warning", text="Separa la llamada al shortcode con saltos de línea para evitar errores de renderizado.") }}
Usando el parámetro `text`:
```
{{/* aside(text="*Nota al margen* viene de *nota* (del latín, 'marca' o 'señal') y *margen* (del latín *margo*, 'borde' o 'límite').") */}}
```
Usando el cuerpo del contenido e indicando la posición:
```
{%/* aside(position="right") */%}
Una nota más larga que
puede ocupar varias líneas.
Se admite *Markdown*.
{%/* end */%}
```
### Texto remoto
Añade texto desde una URL remota o un archivo local.
El shortcode acepta tres parámetros:
- `src`: La URL de origen o ruta del archivo (obligatorio)
- `start`: Primera línea a mostrar (opcional, empieza en 1)
- `end`: Número de la última línea (opcional, por defecto es 0, la última línea)
{{ admonition(type="info", text="`start` y `end` son inclusivos. `start=3, end=3` mostrará solo la tercera línea.") }}
**Importante**:
- **Archivos remotos VS archivos locales**: Si `src` empieza con "http", se tratará como un archivo remoto. De lo contrario, se asume que es una ruta de archivo local.
- **Acceso a archivos**: Dado que utiliza la función [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, los archivos locales deben estar dentro del directorio de Zola —ver la [lógica de búsqueda de archivos](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). Desde [tabi 2.16.0](https://github.com/welpo/tabi/releases/tag/v2.16.0), el shortcode admite también rutas relativas.
- **Formateo de bloques de código**: Para mostrar el texto como un bloque de código, debes añadir manualmente las cercas de código Markdown (comillas invertidas) y, opcionalmente, especificar el lenguaje de programación para el resaltado sintáctico.
#### Uso
Añade un script de Python remoto dentro de un bloque de código con resaltado sintáctico:
````
```python
{{/* remote_text(src="https://example.com/script.py") */}}
```
````
Visualización de texto de un archivo local:
```
{{/* remote_text(src="ruta/a/archivo.txt") */}}
```
Mostar sólo las líneas 3 a 5 de un archivo remoto:
```
{{/* remote_text(src="https://example.com/script.py", start=3, end=5) */}}
```
### Advertencias
Destaca información con estos shortcodes. Hay cinco tipos (`type`): `note`, `tip`, `info`, `warning`, y `danger`.
{{ admonition(type="note", text="Contenido con **sintaxis** *Markdown*. Consulta [esta `api`](#).") }}
{{ admonition(type="tip", text="Contenido con **sintaxis** *Markdown*. Consulta [esta `api`](#).") }}
{{ admonition(type="info", text="Contenido con **sintaxis** *Markdown*. Consulta [esta `api`](#).") }}
{{ admonition(type="warning", text="Contenido con **sintaxis** *Markdown*. Consulta [esta `api`](#).") }}
{{ admonition(type="danger", text="Contenido con **sintaxis** *Markdown*. Consulta [esta `api`](#).") }}
Puedes cambiar el `title` y el `icon` de la advertencia. Ambos parámetros aceptan texto y por defecto coinciden con el tipo de advertencia. `icon` puede ser cualquiera de los tipos de advertencia disponibles.
{{ admonition(type="note", icon="tip", title="Título e icono personalizados", text="Contenido con **sintaxis** *Markdown*. Consulta [esta `api`](#).") }}
#### Uso
Puedes usar las advertencias de dos formas:
1. En línea con parámetros:
```md
{{/* admonition(type="danger", icon="tip", title="Un consejo importante", text="Mantente hidratado") */}}
```
2. Con contenido en el cuerpo:
```md
{%/* admonition(type="danger", icon="tip", title="Un consejo importante") */%}
Mantente hidratado
Este método es especialmente útil para contenido largo o múltiples párrafos.
{%/* end */%}
```
Ambos métodos admiten los mismos parámetros (`type`, `icon`, y `title`).
### Citas multilenguaje
Este shortcode permite mostrar una cita traducida y en su lenguaje original:
@ -180,3 +453,31 @@ El Markdown, por supuesto, será interpretado.
{%/* end */%}
```
### Forzar dirección del texto
Fuerza la dirección del texto de un bloque de contenido. Anula tanto la configuración global `force_codeblock_ltr` como la dirección general del documento.
Acepta el parámetro `direction`: la dirección de texto deseada. Puede ser "ltr" (de izquierda a derecha) o "rtl" (de derecha a izquierda). Por defecto es "ltr".
{% force_text_direction(direction="rtl") %}
```python
def مرحباالعالم():
print("مرحبا بالعالم!")
```
{% end %}
#### Uso
En una página LTR podemos forzar que un bloque de código sea RTL (como se muestra arriba) de la siguiente manera:
````
{%/* force_text_direction(direction="rtl") */%}
```python
def مرحباالعالم():
print("مرحبا بالعالم!")
```
{%/* end */%}
````

View file

@ -1,7 +1,7 @@
+++
title = "Custom shortcodes"
date = 2023-02-19
updated = 2023-11-24
updated = 2025-07-26
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]
@ -11,14 +11,108 @@ tags = ["showcase", "shortcodes"]
toc = true
toc_levels = 2
quick_navigation_buttons = true
code_block_name_links = true
mermaid = true
social_media_card = "social_cards/blog_shortcodes.jpg"
+++
## Diagram shortcode
### Mermaid diagrams
[Mermaid](https://github.com/mermaid-js/mermaid) is a a diagramming and charting tool that uses text and code to generate diagrams. It supports flowcharts, sequence diagrams, Gantt charts, and more.
To include a Mermaid diagram in your post, there are two steps:
1. Set `mermaid = true` in the `[extra]` section of the front matter of your page, section or `config.toml`. This will load the JavaScript needed to render the diagrams.
2. Use the `mermaid()` shortcode to define your diagram in your posts. For example:
```txt
{%/* mermaid() */%}
classDiagram
class CognitiveDistortions {
+AllOrNothingThinking()
+Overgeneralization()
+MentalFilter()
+JumpingToConclusions()
}
class AllOrNothingThinking {
+SeeInExtremes()
}
class Overgeneralization {
+GeneralizeFromSingle()
}
class MentalFilter {
+FocusOnNegative()
}
class JumpingToConclusions {
+MakeAssumptions()
}
CognitiveDistortions *-- AllOrNothingThinking
CognitiveDistortions *-- Overgeneralization
CognitiveDistortions *-- MentalFilter
CognitiveDistortions *-- JumpingToConclusions
{%/* end */%}
```
The diagram will be rendered as follows:
{% mermaid() %}
classDiagram
class CognitiveDistortions {
+AllOrNothingThinking()
+Overgeneralization()
+MentalFilter()
+JumpingToConclusions()
}
class AllOrNothingThinking {
+SeeInExtremes()
}
class Overgeneralization {
+GeneralizeFromSingle()
}
class MentalFilter {
+FocusOnNegative()
}
class JumpingToConclusions {
+MakeAssumptions()
}
CognitiveDistortions *-- AllOrNothingThinking
CognitiveDistortions *-- Overgeneralization
CognitiveDistortions *-- MentalFilter
CognitiveDistortions *-- JumpingToConclusions
{% end %}
The Mermaid shortcode supports two parameters:
- `invertible`: If set to `true` (default), the diagram will be inverted in dark mode, just like [invertible images](#invertible-image).
- `full_width`: Allows the diagram to take up the width of the header. See [full-width image](#full-width-image).
{{ admonition(type="tip", text="You can use the [Mermaid Live Editor](https://mermaid.live/) to create and preview your diagrams.") }}
#### Usage
```
{%/* mermaid(invertible=true, full_width=false) */%}
Your diagram goes here.
`invertible` or `full_width` can be omitted if default values are used.
{%/* end */%}
```
## Image shortcodes
**Note**: all image shortcodes have two optional parameters: `full_width`, which defaults to `false` (see [below](#full-width-image)), and `lazy_loading`, which defaults to `true`.
All image shortcodes support absolute paths, relative paths, and remote sources in the `src` parameter.
**Note 2**: as of [PR #222](https://github.com/welpo/tabi/pull/222) (commit [7796162](https://github.com/welpo/tabi/commit/7796162e378cacb9b4d6129f95138121224714f1)), all image shortcodes support relative paths in the `src` parameter.
All image shortcodes have these optional parameters:
- `raw_path`. Defaults to `false`. If set to `true`, the `src` parameter will be used as is. Useful for colocated assets with a custom slug (see [Zola issue #2598](https://github.com/getzola/zola/issues/2598)).
- `inline`. Defaults to `false`. If set to `true`, the image will be displayed inline with the text.
- `full_width`. Defaults to `false` (see [below](#full-width-image))
- `lazy_loading`. Defaults to `true`.
### Dual theme images
@ -27,6 +121,7 @@ Useful if you want to use a different image for the light and dark themes:
{{ dual_theme_image(light_src="img/paris_day.webp", dark_src="img/paris_night.webp" alt="The Eiffel tower") }}
#### Usage
```
{{/* dual_theme_image(light_src="img/paris_day.webp", dark_src="img/paris_night.webp" alt="The Eiffel tower") */}}
```
@ -57,7 +152,7 @@ Images with too much brightness or contrast can be jarring against a dark backgr
### Swap image on hover
Povides an interaction where the image displayed changes as the user hovers over it. Useful for before-after comparisons, for example.
Provides an interaction where the image displayed changes as the user hovers over it. Useful for before-after comparisons, for example.
{{ image_hover(default_src="img/edited.webp", hovered_src="img/raw.webp", default_alt="Edited picture", hovered_alt="Original shot") }}
@ -93,18 +188,199 @@ All other image shortcodes can be made into full-width by setting the optional p
{{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Photograph of a canal in Amsterdam") */}}
```
## Engagement shortcodes
### iine
{{ aside(text="To add it to all posts, set `iine = true` in the `[extra]` section of your `config.toml`.") }}
This shortcode allows you to add extra [iine.to](https://iine.to) buttons to your posts, like this:
{{ iine(slug="/blog/shortcodes/demo-button") }}
#### Usage
```
{{/* iine(icon="heart", slug="/post/my-post-slug/like", label="Like this post") */}}
```
The shortcode takes the following optional parameters:
- `icon`: The icon to display. Can be `heart`, `thumbs_up`, `upvote`, or any emoji.
- `slug`: A unique identifier. Defaults to the current page's path. Useful if you want more than one button on the same page.
- `label`: The accessibility label for the button. Defaults to "Like this post".
## Code shortcodes
### Show source or path
You can display a path or URL for a code block using Zola's native syntax:
{{ aside(text="Requires Zola 0.20.0 or later.") }}
````
```rust,name=src/main.rs
fn main() {
println!("Hello, world!");
}
```
````
This renders:
```rust,name=src/main.rs
fn main() {
println!("Hello, world!");
}
```
If you set the `name` to a URL (i.e. it starts with `http` or `https`), you can turn it into a clickable link. This is particularly useful when used in conjunction with the [remote text shortcode](#remote-text).
{{ admonition(type="warning", title="JavaScript required", text="The clickable URL feature requires JavaScript. To enable it, set `code_block_name_links = true` on the `[extra]` section of your page, section, or `config.toml`.") }}
```.gitignore,name=https://github.com/welpo/doteki/blob/main/.gitignore
__pycache__/
*coverage*
.vscode/
dist/
```
### Legacy shortcode support
The `add_src_to_code_block` shortcode is still supported for backward compatibility but will be deprecated in a future release. Please use Zola's native syntax shown above instead:
```
# Old way (deprecated):
{{/* add_src_to_code_block(src="path/to/file.rs") */}}
# New way (preferred):
```rust,name=path/to/file.rs
```
## Text shortcodes
### Aside (side/margin note)
Add supplementary content in the margins on wide screens, or as distinct blocks on mobile.
{{ aside(text="*Sidenote* comes from Latin *nota* ('mark') + Old English *síde* ('side').") }}
The shortcode accepts two parameters:
- `position`: Set to `"right"` to place in right margin (defaults to left)
- Content can be provided via `text` parameter or between shortcode tags
#### Usage
{{ admonition(type="warning", text="Place the aside shortcode on its own line to prevent formatting issues.") }}
Using the `text` parameter:
```
{{/* aside(text="*Sidenote* comes from Latin *nota* ('mark') + Old English *síde* ('side').") */}}
```
Using the content body and setting the position to right:
```
{%/* aside(position="right") */%}
A longer note that
can span multiple lines.
_Markdown_ is supported.
{%/* end */%}
```
### Remote text
Embed text from a remote URL or a local file. To display the path or URL on the code block, see the [show source or path shortcode](#show-source-or-path).
The shortcode accepts three parameters:
- `src`: The source URL or file path (required)
- `start`: First line to display (optional, starts at 1)
- `end`: The ending line number (optional, defaults to 0, meaning the last line)
{{ admonition(type="info", text="`start` and `end` are inclusive. `start=3, end=3` will display only the third line.") }}
**Important**:
- **Remote VS local files**: If `src` starts with "http", it will be treated as a remote file. Otherwise, it assumes a local file path.
- **Files access**: As it uses Zola's [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data), local files must be inside the Zola directory—see [File searching logic](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). As of [tabi 2.16.0](https://github.com/welpo/tabi/releases/tag/v2.16.0), the shortcode supports both relative and absolute paths.
- **Code block formatting**: To display the text as a code block, you must manually add the Markdown code fences (backticks) and, optionally, specify the programming language for syntax highlighting.
#### Usage
Embedding a remote Python script within a code block with syntax highlighting:
````
```python
{{/* remote_text(src="https://example.com/script.py") */}}
```
````
Displaying text from a local file:
```
{{/* remote_text(src="path/to/file.txt") */}}
```
Display lines 3 to 7 (both inclusive) of a local file:
```
{{/* remote_text(src="path/to/file.txt", start=3, end=7) */}}
```
### Admonitions
Bring attention to information with these admonition shortcodes. They come in five `type`s: `note`, `tip`, `info`, `warning`, and `danger`.
{{ admonition(type="note", text="Some **content** with _Markdown_ `syntax`. Check [this `api`](#).") }}
{{ admonition(type="tip", text="Some **content** with _Markdown_ `syntax`. Check [this `api`](#).") }}
{{ admonition(type="info", text="Some **content** with _Markdown_ `syntax`. Check [this `api`](#).") }}
{{ admonition(type="warning", text="Some **content** with _Markdown_ `syntax`. Check [this `api`](#).") }}
{{ admonition(type="danger", text="Some **content** with _Markdown_ `syntax`. Check [this `api`](#).") }}
You can change the `title` and `icon` of the admonition. Both parameters take a string and default to the type of admonition. `icon` can be any of the available admonition types.
{{ admonition(type="note", icon="tip", title="Custom title and icon", text="Some **content** with _Markdown_ `syntax`. Check [this `api`](#).") }}
#### Usage
You can use admonitions in two ways:
1. Inline with parameters:
```md
{{/* admonition(type="danger", icon="tip", title="An important tip", text="Stay hydrated~") */}}
```
2. With a content body:
```md
{%/* admonition(type="danger", icon="tip", title="An important tip") */%}
Stay hydrated~
This method is particularly useful for longer content or multiple paragraphs.
{%/* end */%}
```
Both methods support the same parameters (`type`, `icon`, and `title`), with the content either passed as the `text` parameter or as the body between tags.
### Multilingual quotes
This shortcode allows you to display both the translated and original text for a quote. The quotation marks will be added automatically:
{{ multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquility, to go through life in silence, greeting only friends.", author="Francisco Umbral") }}
{{ multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquillity, to go through life in silence, greeting only friends.", author="Francisco Umbral") }}
#### Usage
```
{{/* multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquility, to go through life in silence, greeting only friends.", author="Francisco Umbral") */}}
{{/* multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquillity, to go through life in silence, greeting only friends.", author="Francisco Umbral") */}}
```
### References with hanging indent
@ -178,3 +454,33 @@ Markdown will of course be rendered.
{%/* end */%}
```
### Force text direction
Force the text direction of a content block. Overrides both the global `force_codeblock_ltr` setting and the document's overall direction.
Accepts the parameter `direction`: the desired text direction. This can be either "ltr" (left-to-right) or "rtl" (right-to-left). Defaults to "ltr".
{% force_text_direction(direction="rtl") %}
```python
def مرحباالعالم():
print("مرحبا بالعالم!")
```
{% end %}
#### Usage
In a LTR page we can force a code block to be RTL (as shown above) like so:
````
{%/* force_text_direction(direction="rtl") */%}
```python
def مرحباالعالم():
print("مرحبا بالعالم!")
```
{%/* end */%}
````

View file

@ -1,7 +1,7 @@
+++
title = "Taula de contingut"
date = 2022-11-01
updated = 2023-09-08
updated = 2024-02-16
description = "Una publicació que mostra la taula de contingut opcional i la seva configuració."
[taxonomies]
@ -86,7 +86,7 @@ Tingues en compte als teus lectors quan establertis `toc_levels`. Encara que pot
És possible que vulguis amagar certes capçaleres. Per exemple, si el teu article té moltes Figures o Taules, aquestes podrien saturar la TdC. Pots ocultar capçaleres específiques a la TdC configurant la variable `toc_ignore_pattern` en la secció `[extra]` del front matter del teu post.
Aquesta variable espera una expressió regular (regex), ja que utilitza el test [matching](https://tera.netlify.app/docs/#matching) de Tera. El `toc_ignore_pattern` es prova contra el text del capçalera. Per exemple, per a la capçalera `### Lectura addicional`, només el text `Lectura addicional` s'utilitzaria per comprovar si coincideix amb el patró.
Aquesta variable espera una expressió regular (regex), ja que utilitza el test [matching](https://keats.github.io/tera/docs/#matching) de Tera. El `toc_ignore_pattern` es prova contra el text del capçalera. Per exemple, per a la capçalera `### Lectura addicional`, només el text `Lectura addicional` s'utilitzaria per comprovar si coincideix amb el patró.
Aquí tens alguns valors d'exemple per a `toc_ignore_pattern` juntament amb les capçaleres que amagarien:

View file

@ -1,7 +1,7 @@
+++
title = "Tabla de contenido"
date = 2022-11-01
updated = 2023-09-08
updated = 2024-02-16
description = "Una publicación que muestra la tabla de contenido opcional así como su configuración."
[taxonomies]
@ -86,7 +86,7 @@ Ten en cuenta a tus lectores al establecer `toc_levels`. Aunque puede ser tentad
Es posible que quieras ocultar ciertos encabezados. Por ejemplo, si tu artículo tiene muchas Figuras o Tablas, éstas podrían saturar la TdC. Puedes ocultar encabezados específicos en la TdC configurando la variable `toc_ignore_pattern` en la sección `[extra]` del front matter de tu post.
Esta variable espera una expresión regular (regex), ya que utiliza el test [matching](https://tera.netlify.app/docs/#matching) de Tera. El `toc_ignore_pattern` se prueba contra el texto del encabezado. Por ejemplo, para el encabezado `### Lectura adicional`, sólo el texto `Lectura adicional` se usaría para comprobar si concuerda con el patrón.
Esta variable espera una expresión regular (regex), ya que utiliza el test [matching](https://keats.github.io/tera/docs/#matching) de Tera. El `toc_ignore_pattern` se prueba contra el texto del encabezado. Por ejemplo, para el encabezado `### Lectura adicional`, sólo el texto `Lectura adicional` se usaría para comprobar si concuerda con el patrón.
Aquí tienes algunos valores de ejemplo para `toc_ignore_pattern` junto con los encabezados que ocultarían:

View file

@ -1,7 +1,7 @@
+++
title = "Table of Contents"
date = 2022-11-01
updated = 2023-09-08
updated = 2024-02-16
description = "A post showcasing the optional Table of Contents and its options."
[taxonomies]
@ -85,7 +85,7 @@ Keep your readers in mind when setting the `toc_levels`. While it can be temptin
You might want to hide certain headers. For example, if your article has many Figures or Tables, they might clutter the ToC. You can hide specific headers in the ToC with the `toc_ignore_pattern` variable.
This variable expects a regular expression (regex), as it's using Tera's [matching](https://tera.netlify.app/docs/#matching) test. The `toc_ignore_pattern` is tested against the text of the header, excluding the `#` character(s). For example, for the header `### Further reading`, the text `Further reading` would be checked against.
This variable expects a regular expression (regex), as it's using Tera's [matching](https://keats.github.io/tera/docs/#matching) test. The `toc_ignore_pattern` is tested against the text of the header, excluding the `#` character(s). For example, for the header `### Further reading`, the text `Further reading` would be checked against.
Here are some example values for `toc_ignore_pattern` along with the headers they can hide:

View file

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more