feat: add indicator to external links (#443)

This commit is contained in:
Óscar 2025-02-15 09:34:54 +01:00 committed by GitHub
parent 036b11b7da
commit a5ab6259c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 103 additions and 6 deletions

View file

@ -1,7 +1,7 @@
+++
title = "Mastering tabi Settings: A Comprehensive Guide"
date = 2023-09-18
updated = 2025-02-09
updated = 2025-02-15
description = "Discover the many ways you can customise your tabi site."
[taxonomies]
@ -242,6 +242,25 @@ 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
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |