docs: add multi-language markdown-extended-features post

This commit is contained in:
radishzzz 2025-05-02 20:08:50 +01:00
parent 6c8a682f83
commit bdaf3da70c
7 changed files with 438 additions and 16 deletions

View file

@ -0,0 +1,85 @@
---
title: Markdown Extended Features
published: 2025-04-25
tags:
- Guide
toc: false
lang: en
abbrlink: markdown-extended-features
---
Here are some extended Markdown features supported by Retypeset, including syntax examples and their stylistic effects.
## Figure Captions
To create automatic figure captions, use the standard Markdown image syntax `![alt](src)`. To hide the caption, add an underscore `_` before the `alt` text or leave the `alt` text empty.
### Syntax
```
![Image description](./full/or/relative/path/of/image)
![_Image description](./full/or/relative/path/of/image)
```
### Output
![Image description](https://image.radishzz.cc/image/gallery/06.webp)
![_Image description](https://image.radishzz.cc/image/gallery/06.webp)
## Github Repository Cards
To create a Github repository card, use the double colon syntax `::github{repo="owner/repo"}`. Repository data is fetched from the GitHub API after the page loads.
### Syntax
```
::github{repo="radishzzz/astro-theme-retypeset"}
```
### Output
::github{repo="radishzzz/astro-theme-retypeset"}
## Admonition Blocks
To create admonition blocks, use the GitHub syntax `> [!TYPE]` or the triple colon syntax `:::type`. Following types are supported: `note`, `tip`, `important`, `warning`, and `caution`.
### Syntax
```
> [!NOTE]
> Useful information that users should know, even when skimming content.
:::note
Useful information that users should know, even when skimming content.
:::
:::note[YOUR CUSTOM TITLE]
This is a note with a custom title.
:::
```
### Output
> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
:::warning
Urgent info that needs immediate user attention to avoid problems.
:::
:::caution
Advises about risks or negative outcomes of certain actions.
:::
:::note[YOUR CUSTOM TITLE]
This is a note with a custom title.
:::

View file

@ -0,0 +1,85 @@
---
title: Características Extendidas de Markdown
published: 2025-04-25
tags:
- Guía
toc: false
lang: es
abbrlink: markdown-extended-features
---
Aquí presentamos algunas características extendidas de Markdown compatibles con Retypeset, incluyendo ejemplos de sintaxis y sus efectos estilísticos.
## Leyendas de Figuras
Para crear leyendas automáticas para figuras, utilice la sintaxis estándar de imágenes de Markdown `![alt](src)`. Para ocultar la leyenda, añada un guion bajo `_` antes del texto `alt` o deje el texto `alt` vacío.
### Sintaxis
```
![Descripción de la imagen](./full/or/relative/path/of/image)
![_Descripción de la imagen](./full/or/relative/path/of/image)
```
### Resultado
![Descripción de la imagen](https://image.radishzz.cc/image/gallery/06.webp)
![_Descripción de la imagen](https://image.radishzz.cc/image/gallery/06.webp)
## Tarjetas de Repositorios de Github
Para crear una tarjeta de repositorio de Github, utilice la sintaxis de doble dos puntos `::github{repo="owner/repo"}`. Los datos del repositorio se obtienen de la API de GitHub después de que la página se carga.
### Sintaxis
```
::github{repo="radishzzz/astro-theme-retypeset"}
```
### Resultado
::github{repo="radishzzz/astro-theme-retypeset"}
## Bloques de Advertencia
Para crear bloques de advertencia, utilice la sintaxis de GitHub `> [!TYPE]` o la sintaxis de triple dos puntos `:::type`. Se admiten cinco tipos: `note`, `tip`, `important`, `warning` y `caution`.
### Sintaxis
```
> [!NOTE]
> Información útil que los usuarios deben conocer, incluso al leer por encima.
:::note
Información útil que los usuarios deben conocer, incluso al leer por encima.
:::
:::note[TÍTULO PERSONALIZADO]
Esta es una nota con un título personalizado.
:::
```
### Resultado
> [!NOTE]
> Información útil que los usuarios deben conocer, incluso al leer por encima.
> [!TIP]
> Consejos útiles para hacer las cosas mejor o más fácilmente.
> [!IMPORTANT]
> Información clave que los usuarios necesitan saber para lograr su objetivo.
:::warning
Información urgente que requiere atención inmediata del usuario para evitar problemas.
:::
:::caution
Advierte sobre riesgos o resultados negativos de ciertas acciones.
:::
:::note[TÍTULO PERSONALIZADO]
Esta es una nota con un título personalizado.
:::

View file

@ -0,0 +1,85 @@
---
title: Markdown 拡張機能
published: 2025-04-25
tags:
- ガイド
toc: false
lang: ja
abbrlink: markdown-extended-features
---
この記事では、RetypesetテーマがサポートするMarkdown拡張機能について、構文例と効果を紹介します。
## 図のキャプション
標準のMarkdown画像構文 `![alt](src)` を使用すると、自動的に図のキャプションが生成されます。`alt` テキストの前にアンダースコア `_` を追加するか、`alt` テキストを空にすると、キャプションが非表示になります。
### 構文
```
![画像の説明](./full/or/relative/path/of/image)
![_画像の説明](./full/or/relative/path/of/image)
```
### 効果
![画像の説明](https://image.radishzz.cc/image/gallery/06.webp)
![_画像の説明](https://image.radishzz.cc/image/gallery/06.webp)
## Githubリポジトリカード
二重コロン構文 `::github{repo="owner/repo"}` を使用すると、Githubリポジトリカードを作成できます。ページの読み込み後、GitHub APIからリポジトリデータが取得されます。
### 構文
```
::github{repo="radishzzz/astro-theme-retypeset"}
```
### 効果
::github{repo="radishzzz/astro-theme-retypeset"}
## アドモニションブロック
GitHub構文 `> [!TYPE]` または三重コロン構文 `:::type` を使用して、アドモニションブロックを作成できます。`note``tip``important``warning``caution` の5種類がサポートされています。
### 構文
```
> [!NOTE]
> 基本的な情報内容。
:::note
基本的な情報内容。
:::
:::note[カスタムタイトル]
カスタムタイトルのノート。
:::
```
### 効果
> [!NOTE]
> 基本的な情報内容。
> [!TIP]
> 実用的なヒント。
> [!IMPORTANT]
> 重要なお知らせ。
:::warning
緊急の警告事項。
:::
:::caution
潜在的なリスクの警告。
:::
:::note[カスタムタイトル]
カスタムタイトルのノート。
:::

View file

@ -0,0 +1,85 @@
---
title: Расширенные функции Markdown
published: 2025-04-25
tags:
- Руководство
toc: false
lang: ru
abbrlink: markdown-extended-features
---
Здесь представлены некоторые расширенные функции Markdown, поддерживаемые темой Retypeset, включая примеры синтаксиса и их стилистические эффекты.
## Подписи к изображениям
Для создания автоматических подписей к изображениям используйте стандартный синтаксис изображений Markdown `![alt](src)`. Чтобы скрыть подпись, добавьте подчёркивание `_` перед текстом `alt` или оставьте текст `alt` пустым.
### Синтаксис
```
![Описание изображения](./full/or/relative/path/of/image)
![_Описание изображения](./full/or/relative/path/of/image)
```
### Результат
![Описание изображения](https://image.radishzz.cc/image/gallery/06.webp)
![_Описание изображения](https://image.radishzz.cc/image/gallery/06.webp)
## Карточки репозиториев Github
Для создания карточки репозитория Github используйте синтаксис с двойным двоеточием `::github{repo="owner/repo"}`. Данные репозитория загружаются из API GitHub после загрузки страницы.
### Синтаксис
```
::github{repo="radishzzz/astro-theme-retypeset"}
```
### Результат
::github{repo="radishzzz/astro-theme-retypeset"}
## Блоки примечаний
Для создания блоков примечаний используйте синтаксис GitHub `> [!TYPE]` или синтаксис с тройным двоеточием `:::type`. Поддерживаются пять типов: `note`, `tip`, `important`, `warning` и `caution`.
### Синтаксис
```
> [!NOTE]
> Полезная информация, которую пользователи должны знать, даже при беглом просмотре.
:::note
Полезная информация, которую пользователи должны знать, даже при беглом просмотре.
:::
:::note[ПОЛЬЗОВАТЕЛЬСКИЙ ЗАГОЛОВОК]
Это примечание с пользовательским заголовком.
:::
```
### Результат
> [!NOTE]
> Полезная информация, которую пользователи должны знать, даже при беглом просмотре.
> [!TIP]
> Полезные советы, как делать что-то лучше или проще.
> [!IMPORTANT]
> Ключевая информация, которую пользователи должны знать для достижения своей цели.
:::warning
Срочная информация, требующая немедленного внимания пользователя для предотвращения проблем.
:::
:::caution
Предупреждает о рисках или негативных последствиях определённых действий.
:::
:::note[ПОЛЬЗОВАТЕЛЬСКИЙ ЗАГОЛОВОК]
Это примечание с пользовательским заголовком.
:::

View file

@ -0,0 +1,85 @@
---
title: Markdown 擴展功能
published: 2025-04-25
tags:
- 指南
toc: false
lang: zh-tw
abbrlink: markdown-extended-features
---
本文介紹 Retypeset 主題支援的 Markdown 擴展功能,包括語法示例與效果展示。
## 圖注
使用標準的 Markdown 圖像語法 `![alt](src)`,即可自動生成圖注。在 `alt` 前添加下劃線 `_` 或留空 `alt`,即可隱藏圖注。
### 語法
```
![圖片描述](./full/or/relative/path/of/image)
![_圖片描述](./full/or/relative/path/of/image)
```
### 效果
![圖片描述](https://image.radishzz.cc/image/gallery/06.webp)
![_圖片描述](https://image.radishzz.cc/image/gallery/06.webp)
## Github 倉庫卡片
使用雙冒號語法 `::github{repo="owner/repo"}`,即可創建 Github 倉庫卡片。在頁面載入後,從 GitHub API 中獲取倉庫數據。
### 語法
```
::github{repo="radishzzz/astro-theme-retypeset"}
```
### 效果
::github{repo="radishzzz/astro-theme-retypeset"}
## 提示塊
使用 GitHub 語法 `> [!TYPE]` 或三冒號語法 `:::type`,即可創建提示塊。支援 `note``tip``important``warning``caution` 五種類型。
### 語法
```
> [!NOTE]
> 基礎的信息內容。
:::note
基礎的信息內容。
:::
:::note[自定義標題]
自定義標題的提示塊。
:::
```
### 效果
> [!NOTE]
> 基礎的信息內容。
> [!TIP]
> 實用的提示建議。
> [!IMPORTANT]
> 重要的通知提醒。
:::warning
緊急的警告事項。
:::
:::caution
潛在的風險預警。
:::
:::note[自定義標題]
自定義標題的提示塊。
:::

View file

@ -50,38 +50,38 @@ abbrlink: markdown-extended-features
```
> [!NOTE]
> Useful information that users should know, even when skimming content.
> 基础的信息内容。
:::note
Useful information that users should know, even when skimming content.
基础的信息内容。
:::
:::note[YOUR CUSTOM TITLE]
This is a note with a custom title.
:::note[自定义标题]
自定义标题的提示块。
:::
```
### 效果
> [!NOTE]
> Useful information that users should know, even when skimming content.
> 基础的信息内容。
> [!TIP]
> Helpful advice for doing things better or more easily.
> 实用的提示建议。
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> 重要的通知提醒。
:::warning
Urgent info that needs immediate user attention to avoid problems.
紧急的警告事项。
:::
:::caution
Advises about risks or negative outcomes of certain actions.
潜在的风险预警。
:::
:::note[YOUR CUSTOM TITLE]
This is a note with a custom title.
:::note[自定义标题]
自定义标题的提示块。
:::
<!-- <details>

View file

@ -92,11 +92,8 @@
.heti :where(figure) {
--at-apply: 'mx-auto mt-3 mb-6';
}
.heti :where(figure:has(+ figure)) {
--at-apply: 'mb-4';
}
.heti :where(figure:has(+ p > img:first-child)) {
--at-apply: 'mb-4';
.heti :where(figure:has(+ figure), figure:has(+ p > img:first-child)) {
--at-apply: 'mb-4 ';
}
.heti :where(figcaption) {
--at-apply: 'text-center text-sm mt-3 text-secondary/80';