⚡️ refactor: co-locate images (#200)
This commit is contained in:
45
content/blog/javascript/index.ca.md
Normal file
45
content/blog/javascript/index.ca.md
Normal file
@@ -0,0 +1,45 @@
|
||||
+++
|
||||
title = "Sense JavaScript obligatori"
|
||||
date = 2023-01-06
|
||||
updated = 2023-10-06
|
||||
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"
|
||||
+++
|
||||
|
||||
Aquest tema no requereix JavaScript obligatori. Opcionalment, pot carregar una quantitat mínima per afegir algunes característiques que són impossibles d'aconseguir amb HTML i CSS.
|
||||
|
||||
## Opcions habilitades globalment
|
||||
|
||||
- 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].
|
||||
|
||||
## Opcions que es poden sobreescriure de forma jeràrquica
|
||||
|
||||
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).
|
||||
- [**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).
|
||||
|
||||
Per especificar aquestes opcions:
|
||||
|
||||
- **Globalment**: Afegeix-les sota la secció `[extra]` al teu `config.toml`.
|
||||
- **Per a una secció**: Afegeix-les sota la secció `[extra]` al front matter de l'`_index.md` de la secció.
|
||||
- **Per a una publicació individual**: Configura les variables corresponents a la secció `[extra]` del front matter de la publicació.
|
||||
|
||||
## Opcions que es poden habilitar globalment o per a publicacions individuals
|
||||
|
||||
- [**Comentaris**](@/blog/comments/index.ca.md). giscus (2 KB), utterances (1 KB), Hyvor Talk (~800 bytes) o Isso (1KB) es poden habilitar globalment configurant `enabled_for_all_posts = true` a la secció apropiada del teu `config.toml` (`[extra.giscus]`, `[extra.utterances]`, `[extra.hyvortalk]` o `[extra.isso]`). Per habilitar comentaris en publicacions individuals, configura el nom del sistema `= true` (per exemple, `hyvortalk = true`) al front matter del post.
|
||||
|
||||
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`.
|
45
content/blog/javascript/index.es.md
Normal file
45
content/blog/javascript/index.es.md
Normal file
@@ -0,0 +1,45 @@
|
||||
+++
|
||||
title = "Sin JavaScript obligatorio"
|
||||
date = 2023-01-06
|
||||
updated = 2023-10-06
|
||||
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"
|
||||
+++
|
||||
|
||||
Este tema no requiere JavaScript de manera obligatoria. Opcionalmente, puede cargar una cantidad mínima de JavaScript para añadir algunas características que son imposibles de lograr con solo HTML y CSS.
|
||||
|
||||
## Opciones habilitadas globalmente
|
||||
|
||||
- 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].
|
||||
|
||||
## Opciones que se pueden sobreescribir de forma jerárquica
|
||||
|
||||
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).
|
||||
- [**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).
|
||||
|
||||
Para especificar estas opciones:
|
||||
|
||||
- **Globalmente**: Añádelas en la sección `[extra]` de tu `config.toml`.
|
||||
- **Para una sección**: Añádelas en la sección `[extra]` del front matter del `_index.md` de la sección.
|
||||
- **Para una publicación individual**: Configura las variables correspondientes en la sección `[extra]` del front matter de la publicación.
|
||||
|
||||
## Opciones que pueden habilitarse globalmente o para publicaciones individuales
|
||||
|
||||
- [**Comentarios**](@/blog/comments/index.es.md). giscus (2 KB), utterances (1 KB), Hyvor Talk (~800 bytes) o Isso (1KB) pueden habilitarse globalmente configurando `enabled_for_all_posts = true` en la sección apropiada de tu `config.toml` (`[extra.giscus]`, `[extra.utterances]`, `[extra.hyvortalk]` o `[extra.isso]`). Para habilitar comentarios en publicaciones individuales, configura el nombre del sistema `= true` (por ejemplo, `hyvortalk = true`) en el front matter de la publicación.
|
||||
|
||||
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`.
|
45
content/blog/javascript/index.md
Normal file
45
content/blog/javascript/index.md
Normal file
@@ -0,0 +1,45 @@
|
||||
+++
|
||||
title = "No mandatory JavaScript"
|
||||
date = 2023-01-06
|
||||
updated = 2023-10-06
|
||||
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"
|
||||
+++
|
||||
|
||||
This theme has no mandatory JavaScript. Optionally, it can load a minimal amount to add some features that are impossible to achieve with HTML and CSS.
|
||||
|
||||
## Globally enabled settings
|
||||
|
||||
- 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.
|
||||
|
||||
## Settings with hierarchical override capability
|
||||
|
||||
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).
|
||||
- [**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).
|
||||
|
||||
To specify these settings:
|
||||
|
||||
- **Globally**: Add them under the `[extra]` section in your `config.toml` file.
|
||||
- **For a section**: Add them under the `[extra]` section in the front matter of the section's `_index.md`.
|
||||
- **For an individual post**: Set the corresponding variables in the `[extra]` section of the post's front matter.
|
||||
|
||||
## Settings that can be enabled globally or for individual posts
|
||||
|
||||
- [**Comments**](@/blog/comments/index.md). giscus (2 KB), utterances (1 KB), Hyvor Talk (~800 bytes) or Isso (1KB) can be globally enabled by setting `enabled_for_all_posts = true` in the right section of your `config.toml` (i.e. `[extra.giscus]`, `[extra.utterances]`, `[extra.hyvortalk]` or `[extra.isso]`). To enable comments on individual posts, set the name of the system `= true` (e.g. `hyvortalk = true`) in the post's front matter.
|
||||
|
||||
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`.
|
BIN
content/blog/javascript/social_cards/blog_javascript.jpg
Normal file
BIN
content/blog/javascript/social_cards/blog_javascript.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
BIN
content/blog/javascript/social_cards/ca_blog_javascript.jpg
Normal file
BIN
content/blog/javascript/social_cards/ca_blog_javascript.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
BIN
content/blog/javascript/social_cards/es_blog_javascript.jpg
Normal file
BIN
content/blog/javascript/social_cards/es_blog_javascript.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
Reference in New Issue
Block a user