mirror of
https://github.com/welpo/tabi.git
synced 2025-12-17 12:58:45 +01:00
Merge branch 'main' of github.com:welpo/tabi
This commit is contained in:
commit
89ebc6d253
50 changed files with 861 additions and 227 deletions
10
content/blog/_index.ar.md
Normal file
10
content/blog/_index.ar.md
Normal 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
|
||||
+++
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Sense JavaScript obligatori"
|
||||
date = 2023-01-06
|
||||
updated = 2024-12-15
|
||||
updated = 2025-02-21
|
||||
description = "JavaScript només s'utilitza quan HTML i CSS no són suficients."
|
||||
|
||||
[taxonomies]
|
||||
|
|
@ -28,7 +28,7 @@ Les següents opcions es poden especificar per a publicacions, seccions i global
|
|||
- [**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)
|
||||
- [**Mostrar ruta/URL a blocs de codi**](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url). S'activa configurant `add_src_to_code_block = true`. (~400 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:
|
||||
|
|
@ -43,4 +43,6 @@ Per especificar aquestes opcions:
|
|||
|
||||
A part d'això, és un tema ràpid amb HTML i CSS que funciona sense JavaScript. Just com hauria de ser (la majoria de) la web :-)
|
||||
|
||||
---
|
||||
|
||||
[^1]: Per codificar el teu correu en base64 pots utilitzar [eines en línia](https://www.base64encode.org/) o, al terminal, executa: `printf 'mail@example.com' | base64`.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Sin JavaScript obligatorio"
|
||||
date = 2023-01-06
|
||||
updated = 2024-12-15
|
||||
updated = 2025-02-21
|
||||
description = "JavaScript solo se utiliza cuando HTML y CSS no son suficientes."
|
||||
|
||||
[taxonomies]
|
||||
|
|
@ -28,7 +28,7 @@ Las siguientes opciones pueden especificarse para publicaciones, secciones y a n
|
|||
- [**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).
|
||||
- [**Mostrar ruta/URL en bloques de código**](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url). Se activa configurando `add_src_to_code_block = true`. (~400 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:
|
||||
|
|
@ -43,4 +43,6 @@ Para especificar estas opciones:
|
|||
|
||||
Aparte de eso, es un tema rápido con HTML y CSS que funciona con JavaScript deshabilitado. Justo como debería ser (la mayoría de) la web :-)
|
||||
|
||||
---
|
||||
|
||||
[^1]: Para codificar tu correo electrónico en base64 puedes usar [herramientas en línea](https://www.base64encode.org/) o, en tu terminal, ejecutar: `printf 'mail@example.com' | base64`.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "No mandatory JavaScript"
|
||||
date = 2023-01-06
|
||||
updated = 2024-12-15
|
||||
updated = 2025-02-21
|
||||
description = "JavaScript is only used when HTML and CSS aren't enough."
|
||||
|
||||
[taxonomies]
|
||||
|
|
@ -28,7 +28,7 @@ The following settings can be specified for posts, sections and globally, follow
|
|||
- [**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)
|
||||
- [**Showing source (path or URL) in code blocks**](@/blog/shortcodes/index.md#show-source-or-path). Enabled by setting `add_src_to_code_block = true`. (~300 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:
|
||||
|
|
@ -43,4 +43,6 @@ To specify these settings:
|
|||
|
||||
Other than that, it's a fast theme with HTML and CSS which works with JavaScript disabled. Just the way (most of) the web should be :-)
|
||||
|
||||
---
|
||||
|
||||
[^1]: To encode your email in base64 you can use [online tools](https://www.base64encode.org/) or, on your terminal, run: `printf 'mail@example.com' | base64`.
|
||||
|
|
|
|||
93
content/blog/markdown/index.ar.md
Normal file
93
content/blog/markdown/index.ar.md
Normal 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]: وهذا مثال على الهامش!
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Exemples de Markdown"
|
||||
date = 2023-01-31
|
||||
updated = 2024-11-23
|
||||
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]
|
||||
|
|
@ -105,4 +105,6 @@ A Rust, declares una variable mutable amb `let mut x = 5;`, mentre que a Python,
|
|||
>
|
||||
> — Mercè Rodoreda, La plaça del Diamant
|
||||
|
||||
---
|
||||
|
||||
[^1]: I aquí tens un exemple de nota a peu de pàgina!
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Ejemplos de Markdown"
|
||||
date = 2023-01-31
|
||||
updated = 2024-11-23
|
||||
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]
|
||||
|
|
@ -105,4 +105,6 @@ En Rust, declaras una variable mutable con `let mut x = 5;`, mientras que en Pyt
|
|||
>
|
||||
> — Miguel de Unamuno, Niebla
|
||||
|
||||
---
|
||||
|
||||
[^1]: ¡Y aquí tienes un ejemplo de una nota al pie de página!
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Markdown examples"
|
||||
date = 2023-01-31
|
||||
updated = 2024-11-23
|
||||
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]
|
||||
|
|
@ -105,4 +105,6 @@ In Rust, you declare a mutable variable with `let mut x = 5;`, whereas in Python
|
|||
>
|
||||
> — Charlie Kaufman, Synecdoche, New York
|
||||
|
||||
---
|
||||
|
||||
[^1]: And here's an example of a footnote!
|
||||
|
|
|
|||
BIN
content/blog/mastering-tabi-settings/img/external_link_dark.webp
Normal file
BIN
content/blog/mastering-tabi-settings/img/external_link_dark.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Domina la configuració de tabi: guia completa"
|
||||
date = 2023-09-18
|
||||
updated = 2025-02-11
|
||||
updated = 2025-02-21
|
||||
description = "Descobreix les múltiples maneres en què pots personalitzar tabi."
|
||||
|
||||
[taxonomies]
|
||||
|
|
@ -237,6 +237,25 @@ 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
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|
|
@ -678,13 +697,13 @@ 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) }}
|
||||
|
||||
### Mostrar ruta/URL en blocs de codi
|
||||
### Nom del bloc de codi clicable
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
Estableix `add_src_to_code_block = true` per habilitar l'ús del [shortcode `add_src_to_code_block`](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url).
|
||||
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
|
||||
|
||||
|
|
@ -742,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}
|
||||
|
||||
|
|
@ -983,6 +1005,8 @@ Aquesta opció està habilitada per defecte. Per desactivar-la per una pàgina,
|
|||
|
||||
Per a més informació, consulta la [pàgina de documentació de CSP](@/blog/security/index.ca.md).
|
||||
|
||||
---
|
||||
|
||||
[^1]: Si estàs utilitzant un repositori Git remot, potser voldràs automatitzar el procés d'actualització del camp `updated`. Aquí tens una guia per a això: [Zola Git Hook: actualitzant les dates de les publicacions](https://osc.garden/ca/blog/zola-date-git-hook/).
|
||||
|
||||
[^2]: Per a codificar el teu correu electrònic en base64 pots utilitzar [eines en línia](https://www.base64encode.org/) o, al teu terminal, executar: `printf 'mail@example.com' | base64`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Domina la configuración de tabi: guía completa"
|
||||
date = 2023-09-18
|
||||
updated = 2025-02-11
|
||||
updated = 2025-02-21
|
||||
description = "Descubre las múltiples maneras en que puedes personalizar tabi."
|
||||
|
||||
[taxonomies]
|
||||
|
|
@ -238,6 +238,25 @@ 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
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|
|
@ -679,13 +698,13 @@ 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) }}
|
||||
|
||||
### Mostrar ruta/URL en bloques de código
|
||||
### Nombres de bloques de código clicables
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
Establece `add_src_to_code_block = true` para habilitar el uso del [shortcode `add_src_to_code_block`](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url).
|
||||
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
|
||||
|
||||
|
|
@ -743,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}
|
||||
|
||||
|
|
@ -984,6 +1006,8 @@ Esta función está habilitada por defecto. Para deshabilitarla (y permitir todo
|
|||
|
||||
Para obtener más información, consulta la [página de documentación de CSP](@/blog/security/index.es.md).
|
||||
|
||||
---
|
||||
|
||||
[^1]: Si estás utilizando un repositorio Git remoto, es posible que quieras automatizar el proceso de actualización del campo `updated`. Aquí tienes una guía para eso: [Zola Git Hook: actualizando las fechas de las publicaciones](https://osc.garden/es/blog/zola-date-git-hook/).
|
||||
|
||||
[^2]: Para codificar tu correo electrónico en base64 puedes utilizar [herramientas en línea](https://www.base64encode.org/) o, en tu terminal, ejecutar: `printf 'mail@example.com' | base64`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Mastering tabi Settings: A Comprehensive Guide"
|
||||
date = 2023-09-18
|
||||
updated = 2025-02-19
|
||||
updated = 2025-02-21
|
||||
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 |
|
||||
|
|
@ -689,13 +708,13 @@ 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) }}
|
||||
|
||||
### Source/Path on Code Blocks
|
||||
### Clickable Code Block Names
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
Setting `add_src_to_code_block = true` enables the use of the [`add_src_to_code_block` shortcode](@/blog/shortcodes/index.md#show-source-or-path).
|
||||
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
|
||||
|
||||
|
|
@ -751,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}
|
||||
|
||||
|
|
@ -1022,6 +1044,8 @@ This feature is enabled by default. To disable it (and allow all connections), s
|
|||
|
||||
See the [CSP documentation page](@/blog/security/index.md) for more information.
|
||||
|
||||
---
|
||||
|
||||
[^1]: If you're using a remote Git repository, you might want to automate the process of updating the `updated` field. Here's a guide for that: [Zola Git Pre-Commit Hook: Updating Post Dates](https://osc.garden/blog/zola-date-git-hook/).
|
||||
|
||||
[^2]: To encode your email in base64 you can use [online tools](https://www.base64encode.org/) or, on your terminal, run: `printf 'mail@example.com' | base64`.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Seguretat per defecte"
|
||||
date = 2023-02-22
|
||||
updated = 2024-08-28
|
||||
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]
|
||||
|
|
@ -41,4 +41,6 @@ Pots desactivar les capçaleres (permitint-ho tot) en una pàgina, secció, o gl
|
|||
{ directive = "style-src", domains = ["'self'", "'unsafe-inline'"] },
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
[^1]: Requereix una configuració adequada del servidor web (p. ex., redirigir el trànsit HTTP a HTTPS).
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Seguro por defecto"
|
||||
date = 2023-02-22
|
||||
updated = 2024-08-28
|
||||
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]
|
||||
|
|
@ -41,4 +41,6 @@ Puedes desactivar las cabeceras (permitiendo todo) en una página, sección, o g
|
|||
{ 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).
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Secure by default"
|
||||
date = 2023-02-22
|
||||
updated = 2024-08-28
|
||||
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]
|
||||
|
|
@ -41,4 +41,6 @@ You can disable the CSP (allowing all connections) on a page, section, or global
|
|||
{ directive = "style-src", domains = ["'self'", "'unsafe-inline'"] },
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
[^1]: Requires proper webserver configuration (e.g. redirecting HTTP traffic to HTTPS).
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
+++
|
||||
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]
|
||||
|
|
@ -48,9 +49,7 @@ flowchart
|
|||
2. Crea `_index.md` al directori de la sèrie
|
||||
3. Configura el front matter de `_index.md`:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
title = "Aprenent Rust"
|
||||
template = "series.html"
|
||||
sort_by = "slug"
|
||||
|
|
@ -154,9 +153,7 @@ Aquesta configuració segueix [la jerarquia](@/blog/mastering-tabi-settings/inde
|
|||
|
||||
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:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = "Aquest article és part de la sèrie $SERIES_HTML_LINK."
|
||||
|
||||
|
|
@ -177,9 +174,7 @@ El sistema de sèries utilitza diferents plantilles segons la posició de l'arti
|
|||
|
||||
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`:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```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"
|
||||
|
|
@ -253,6 +248,8 @@ Hi ha tres tipus de variables:
|
|||
|
||||
{% 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() %}
|
||||
|
|
@ -285,9 +282,7 @@ Hi ha tres tipus de variables:
|
|||
|
||||
{{ 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.") }}
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
# Introducció
|
||||
[extra.series_intro_templates]
|
||||
next_only = """
|
||||
|
|
@ -351,9 +346,7 @@ Les plantilles de sèries admeten variables personalitzades per incloure informa
|
|||
|
||||
1. Primer, defineix els teus **marcadors** a la configuració de la teva sèrie (`_index.md`):
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
[extra]
|
||||
series = true
|
||||
series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
|
||||
|
|
@ -361,9 +354,7 @@ 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`:
|
||||
|
||||
{{ add_src_to_code_block(src="series/article.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/article.md
|
||||
[extra.series_template_variables]
|
||||
position = "primer"
|
||||
topic = "Variables i tipus"
|
||||
|
|
@ -374,9 +365,7 @@ difficulty = "Principiant"
|
|||
|
||||
Pots usar les teves variables personalitzades a qualsevol plantilla, juntament amb les variables integrades:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = """
|
||||
Aquest és l'article $POSITION a $SERIES_HTML_LINK.
|
||||
|
|
@ -389,9 +378,7 @@ Nivell de dificultat: $DIFFICULTY
|
|||
|
||||
### Exemple amb variables personalitzades
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
# A la configuració de la sèrie.
|
||||
[extra]
|
||||
series = true
|
||||
|
|
@ -404,9 +391,7 @@ series_intro_templates.default = """
|
|||
"""
|
||||
```
|
||||
|
||||
{{ add_src_to_code_block(src="series/02-learning-rust/index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/02-learning-rust/index.md
|
||||
# En un article de la sèrie.
|
||||
[extra.series_template_variables]
|
||||
learning_time = "30 minuts"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
+++
|
||||
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]
|
||||
|
|
@ -48,9 +49,7 @@ flowchart
|
|||
2. Crea `_index.md` en el directorio de la serie
|
||||
3. Configura el front matter de `_index.md`:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
title = "Aprendiendo Rust"
|
||||
template = "series.html"
|
||||
sort_by = "slug"
|
||||
|
|
@ -154,9 +153,7 @@ Esta configuración sigue [la jerarquía](@/blog/mastering-tabi-settings/index.e
|
|||
|
||||
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:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = "Este artículo es parte de la serie $SERIES_HTML_LINK."
|
||||
|
||||
|
|
@ -177,9 +174,7 @@ El sistema de series usa diferentes plantillas según la posición del artículo
|
|||
|
||||
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`:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```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"
|
||||
|
|
@ -253,6 +248,8 @@ Hay tres tipos de variables:
|
|||
|
||||
{% 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() %}
|
||||
|
|
@ -285,9 +282,7 @@ Hay tres tipos de variables:
|
|||
|
||||
{{ 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.") }}
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
# Introducción.
|
||||
[extra.series_intro_templates]
|
||||
next_only = """
|
||||
|
|
@ -351,9 +346,7 @@ Las plantillas de series admiten variables personalizadas para incluir informaci
|
|||
|
||||
1. Primero, define tus **marcadores** en la configuración de tu serie (`_index.md`):
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
[extra]
|
||||
series = true
|
||||
series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
|
||||
|
|
@ -361,9 +354,7 @@ 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`:
|
||||
|
||||
{{ add_src_to_code_block(src="series/article.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/article.md
|
||||
[extra.series_template_variables]
|
||||
position = "primero"
|
||||
topic = "Variables y tipos"
|
||||
|
|
@ -374,9 +365,7 @@ difficulty = "Principiante"
|
|||
|
||||
Puedes usar tus variables personalizadas en cualquier plantilla, junto con las variables integradas:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = """
|
||||
Este es el artículo $POSITION en $SERIES_HTML_LINK.
|
||||
|
|
@ -389,9 +378,7 @@ Nivel de dificultad: $DIFFICULTY
|
|||
|
||||
### Ejemplo con variables personalizadas
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
# En la configuración de la serie.
|
||||
[extra]
|
||||
series = true
|
||||
|
|
@ -404,9 +391,7 @@ series_intro_templates.default = """
|
|||
"""
|
||||
```
|
||||
|
||||
{{ add_src_to_code_block(src="series/02-learning-rust/index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/02-learning-rust/index.md
|
||||
# En un artículo de la serie.
|
||||
[extra.series_template_variables]
|
||||
learning_time = "30 minutos"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
+++
|
||||
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]
|
||||
|
|
@ -48,9 +49,7 @@ flowchart
|
|||
2. Create `_index.md` in the series directory.
|
||||
3. Set up the `_index.md` front matter:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
title = "Learning Rust"
|
||||
template = "series.html"
|
||||
sort_by = "slug"
|
||||
|
|
@ -154,9 +153,7 @@ This setting follows [the hierarchy](@/blog/mastering-tabi-settings/index.md#set
|
|||
|
||||
Series articles can have automatic introduction and conclusion sections. These are configured in your series' `_index.md`. A basic example:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = "This article is part of the $SERIES_HTML_LINK series."
|
||||
|
||||
|
|
@ -177,9 +174,7 @@ The series system uses different templates based on an article's position in the
|
|||
|
||||
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`.:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```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"
|
||||
|
|
@ -253,6 +248,8 @@ There are three types of variables:
|
|||
|
||||
{% 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() %}
|
||||
|
|
@ -285,9 +282,7 @@ There are three types of variables:
|
|||
|
||||
{{ 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.") }}
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
# Introduction.
|
||||
[extra.series_intro_templates]
|
||||
next_only = """
|
||||
|
|
@ -351,9 +346,7 @@ Series templates support custom variables for additional information you want to
|
|||
|
||||
1. First, define your **placeholders** in your series configuration (`_index.md`):
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
[extra]
|
||||
series = true
|
||||
series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
|
||||
|
|
@ -361,9 +354,7 @@ series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"]
|
|||
|
||||
2. Then, in each series article, provide the values for these placeholders in `series_template_variables`:
|
||||
|
||||
{{ add_src_to_code_block(src="series/article.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/article.md
|
||||
[extra.series_template_variables]
|
||||
position = "first"
|
||||
topic = "Variables and Types"
|
||||
|
|
@ -374,9 +365,7 @@ difficulty = "Beginner"
|
|||
|
||||
You can use your custom variables in any template, alongside the built-in variables:
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
[extra.series_intro_templates]
|
||||
default = """
|
||||
This is the $POSITION article in $SERIES_HTML_LINK.
|
||||
|
|
@ -389,9 +378,7 @@ Difficulty level: $DIFFICULTY
|
|||
|
||||
### Example with Custom Variables
|
||||
|
||||
{{ add_src_to_code_block(src="series/_index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/_index.md
|
||||
# In the series configuration.
|
||||
[extra]
|
||||
series = true
|
||||
|
|
@ -404,9 +391,7 @@ series_intro_templates.default = """
|
|||
"""
|
||||
```
|
||||
|
||||
{{ add_src_to_code_block(src="series/02-learning-rust/index.md") }}
|
||||
|
||||
```toml
|
||||
```toml,name=series/02-learning-rust/index.md
|
||||
# In an article of the series.
|
||||
[extra.series_template_variables]
|
||||
learning_time = "30 minutes"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Shortcodes personalitzats"
|
||||
date = 2023-02-19
|
||||
updated = 2024-12-28
|
||||
updated = 2025-02-21
|
||||
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,7 +11,7 @@ tags = ["funcionalitat", "shortcodes"]
|
|||
toc = true
|
||||
toc_levels = 2
|
||||
quick_navigation_buttons = true
|
||||
add_src_to_code_block = true
|
||||
code_block_name_links = true
|
||||
mermaid = true
|
||||
social_media_card = "social_cards/ca_blog_shortcodes.jpg"
|
||||
+++
|
||||
|
|
@ -191,23 +191,55 @@ Tots els altres shortcodes d'imatges poden utilizar l'amplada completa assignant
|
|||
|
||||
### Mostrar ruta o URL
|
||||
|
||||
Mostra una ruta o URL al següent bloc de codi trobat. Si comença amb "http", es convertirà en un enllaç. Particularment útil quan s'utilitza en conjunció amb el [shortcode de text remot](#text-remot).
|
||||
Pots mostrar una ruta o URL per a un bloc de codi utilitzant la sintaxi nativa de Zola:
|
||||
|
||||
{{ admonition(type="warning", title="IMPORTANT", text="Aquesta funcionalitat requereix JavaScript. Per activar-la, configura `add_src_to_code_block = true` a la secció `[extra]` de la teva pàgina, secció, o `config.toml`.") }}
|
||||
{{ aside(text="Requereix Zola 0.20.0 o superior.") }}
|
||||
|
||||
{{ add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") }}
|
||||
````
|
||||
```rust,name=src/main.rs
|
||||
fn main() {
|
||||
println!("Hola, món!");
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
```.gitignore
|
||||
{{ remote_text(src="https://raw.githubusercontent.com/welpo/doteki/main/.gitignore") }}
|
||||
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__/
|
||||
**pycache**/
|
||||
*coverage*
|
||||
.vscode/
|
||||
dist/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Shortcodes personalizados"
|
||||
date = 2023-02-19
|
||||
updated = 2024-12-28
|
||||
updated = 2025-02-21
|
||||
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,7 +11,7 @@ tags = ["funcionalidad", "shortcodes"]
|
|||
toc = true
|
||||
toc_levels = 2
|
||||
quick_navigation_buttons = true
|
||||
add_src_to_code_block = true
|
||||
code_block_name_links = true
|
||||
mermaid = true
|
||||
social_media_card = "social_cards/es_blog_shortcodes.jpg"
|
||||
+++
|
||||
|
|
@ -190,28 +190,48 @@ Todos los otros shortcodes de imágenes pueden usar el ancho completo asignando
|
|||
|
||||
### Mostrar ruta o URL
|
||||
|
||||
Muestra una ruta o URL en el siguiente bloque de código encontrado. Si comienza con "http", se convertirá en un enlace. Particularmente útil cuando se usa junto con el [shortcode de texto remot](#texto-remoto).
|
||||
Puedes mostrar una ruta o URL para un bloque de código usando la sintaxis nativa de Zola:
|
||||
|
||||
{{ add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") }}
|
||||
|
||||
```.gitignore
|
||||
{{ remote_text(src="https://raw.githubusercontent.com/welpo/doteki/main/.gitignore") }}
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", title="IMPORTANT", text="Esta característica requiere JavaScript. Para habilitarla, configura `add_src_to_code_block = true` en la sección `[extra]` de tu página, sección, o `config.toml`.") }}
|
||||
|
||||
#### Uso
|
||||
{{ aside(text="Requiere Zola 0.20.0 o superior.") }}
|
||||
|
||||
````
|
||||
{{/* add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") */}}
|
||||
```rust,name=src/main.rs
|
||||
fn main() {
|
||||
println!("¡Hola, mundo!");
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
```.gitignore
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Custom shortcodes"
|
||||
date = 2023-02-19
|
||||
updated = 2025-02-19
|
||||
updated = 2025-02-21
|
||||
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,7 +11,7 @@ tags = ["showcase", "shortcodes"]
|
|||
toc = true
|
||||
toc_levels = 2
|
||||
quick_navigation_buttons = true
|
||||
add_src_to_code_block = true
|
||||
code_block_name_links = true
|
||||
mermaid = true
|
||||
social_media_card = "social_cards/blog_shortcodes.jpg"
|
||||
+++
|
||||
|
|
@ -192,28 +192,48 @@ All other image shortcodes can be made into full-width by setting the optional p
|
|||
|
||||
### Show source or path
|
||||
|
||||
Display a path or URL on the next code block found. If it starts with "http", it will become a link. Particularly useful when used in conjunction with the [remote text shortcode](#remote-text).
|
||||
You can display a path or URL for a code block using Zola's native syntax:
|
||||
|
||||
{{ add_src_to_code_block(src="<https://github.com/welpo/doteki/blob/main/.gitignore>") }}
|
||||
|
||||
```.gitignore
|
||||
{{ remote_text(src="https://raw.githubusercontent.com/welpo/doteki/main/.gitignore") }}
|
||||
```
|
||||
|
||||
{{ admonition(type="warning", title="IMPORTANT", text="This feature requires JavaScript. To enable it, set `add_src_to_code_block = true` on the `[extra]` section of your page, section, or `config.toml`.") }}
|
||||
|
||||
#### Usage
|
||||
{{ aside(text="Requires Zola 0.20.0 or later.") }}
|
||||
|
||||
````
|
||||
{{/* add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") */}}
|
||||
```rust,name=src/main.rs
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
```.gitignore
|
||||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue