chore: 初始化 Hugo 博客项目

Hextra 主题,8 篇文章,支持全文搜索/暗色模式
This commit is contained in:
claw
2026-05-13 12:48:53 +08:00
committed by fukunee
commit 07851043b1
624 changed files with 48007 additions and 0 deletions
@@ -0,0 +1,30 @@
---
title: شورت‌کدها
weight: 9
prev: /docs/guide/diagrams
next: /docs/guide/shortcodes/callout
---
[شورت‌کدهای Hugo](https://gohugo.io/content-management/shortcodes/) قطعه‌کدهای ساده‌ای درون فایل‌های محتوای شما هستند که تمپلیت‌های داخلی یا سفارشی را فراخوانی می‌کنند.
Hextra مجموعه‌ای از شورت‌کدهای زیبا را برای بهبود محتوای شما ارائه می‌دهد.
{{< cards >}}
{{< card link="callout" title="کالاوت" icon="warning" >}}
{{< card link="cards" title="کارت‌ها" icon="card" >}}
{{< card link="details" title="جزئیات" icon="chevron-right" >}}
{{< card link="filetree" title="درخت فایل" icon="folder-tree" >}}
{{< card link="icon" title="آیکون" icon="badge-check" >}}
{{< card link="steps" title="مراحل" icon="one" >}}
{{< card link="tabs" title="تب‌ها" icon="collection" >}}
{{< /cards >}}
<div style="padding-top:4rem"></div>
شورت‌کدهای اضافی ارائه شده توسط Hugo و Hextra:
{{< cards >}}
{{< card link="jupyter" title="نوت‌بوک Jupyter" icon="jupyter" tag="alpha" >}}
{{< card link="others" title="سایر" icon="view-grid" >}}
{{< card link="asciinema" title="Asciinema Player" icon="terminal" >}}
{{< /cards >}}
@@ -0,0 +1,30 @@
---
title: ショートコード
weight: 9
prev: /docs/guide/diagrams
next: /docs/guide/shortcodes/callout
---
[Hugo ショートコード](https://gohugo.io/content-management/shortcodes/)は、コンテンツファイル内に記述する簡潔なスニペットで、組み込みまたはカスタムテンプレートを呼び出します。
Hextra は、コンテンツを強化するための美しいショートコードのコレクションを提供します。
{{< cards >}}
{{< card link="callout" title="Callout" icon="warning" >}}
{{< card link="cards" title="Cards" icon="card" >}}
{{< card link="details" title="Details" icon="chevron-right" >}}
{{< card link="filetree" title="FileTree" icon="folder-tree" >}}
{{< card link="icon" title="Icon" icon="badge-check" >}}
{{< card link="steps" title="Steps" icon="one" >}}
{{< card link="tabs" title="Tabs" icon="collection" >}}
{{< /cards >}}
<div style="padding-top:4rem"></div>
Hugo と Hextra が提供する追加のショートコード:
{{< cards >}}
{{< card link="jupyter" title="Jupyter Notebook" icon="jupyter" tag="alpha" >}}
{{< card link="others" title="Others" icon="view-grid" >}}
{{< card link="asciinema" title="Asciinema Player" icon="terminal" >}}
{{< /cards >}}
@@ -0,0 +1,32 @@
---
title: Shortcodes
weight: 9
prev: /docs/guide/diagrams
next: /docs/guide/shortcodes/callout
---
[Hugo Shortcodes](https://gohugo.io/content-management/shortcodes/) are simple snippets inside your content files calling built-in or custom templates.
Hextra provides a collection of beautiful shortcodes to enhance your content.
{{< cards >}}
{{< card link="callout" title="Callout" icon="warning" >}}
{{< card link="cards" title="Cards" icon="card" >}}
{{< card link="details" title="Details" icon="chevron-right" >}}
{{< card link="filetree" title="FileTree" icon="folder-tree" >}}
{{< card link="term" title="Term" icon="question-mark-circle" >}}
{{< card link="icon" title="Icon" icon="badge-check" >}}
{{< card link="steps" title="Steps" icon="one" >}}
{{< card link="tabs" title="Tabs" icon="collection" >}}
{{< /cards >}}
<div style="padding-top:4rem"></div>
Additional shortcodes provided by Hugo and Hextra:
{{< cards >}}
{{< card link="jupyter" title="Jupyter Notebook" icon="jupyter" tag="alpha" >}}
{{< card link="others" title="Others" icon="view-grid" >}}
{{< card link="hextra" title="Hextra" icon="view-grid" >}}
{{< card link="asciinema" title="Asciinema Player" icon="terminal" >}}
{{< /cards >}}
@@ -0,0 +1,30 @@
---
title: 短代码
weight: 9
prev: /docs/guide/diagrams
next: /docs/guide/shortcodes/callout
---
[Hugo 短代码](https://gohugo.io/content-management/shortcodes/)是内容文件中调用内置或自定义模板的简单片段。
Hextra 提供了一系列精美的短代码来增强您的内容。
{{< cards >}}
{{< card link="callout" title="提示框" icon="warning" >}}
{{< card link="cards" title="卡片" icon="card" >}}
{{< card link="details" title="详情" icon="chevron-right" >}}
{{< card link="filetree" title="文件树" icon="folder-tree" >}}
{{< card link="icon" title="图标" icon="badge-check" >}}
{{< card link="steps" title="步骤" icon="one" >}}
{{< card link="tabs" title="标签页" icon="collection" >}}
{{< /cards >}}
<div style="padding-top:4rem"></div>
Hugo 和 Hextra 提供的其他短代码:
{{< cards >}}
{{< card link="jupyter" title="Jupyter 笔记本" icon="jupyter" tag="alpha" >}}
{{< card link="others" title="其他" icon="view-grid" >}}
{{< card link="asciinema" title="Asciinema Player" icon="terminal" >}}
{{< /cards >}}
@@ -0,0 +1,121 @@
---
title: "Asciinema Player کامپوننت"
linktitle: "Asciinema Player"
sidebar:
exclude: true
---
shortcode asciinema به شما امکان می‌دهد تا ضبط‌های ترمینال ایجاد شده با [asciinema](https://asciinema.org/) را در سایت Hugo خود جاسازی کنید. این یک پخش‌کننده ترمینال غنی با ویژگی‌هایی مانند کنترل پخش، تنظیم سرعت و سفارشی‌سازی تم ارائه می‌دهد.
## استفاده پایه
shortcode asciinema از فایل‌های `.cast` محلی و URL های راه دور پشتیبانی می‌کند. روش‌های مختلف استفاده از فایل‌های محلی به شرح زیر است:
### فایل‌های محلی
**روش 1: دایرکتوری Assets (توصیه شده)**
فایل‌های cast را در دایرکتوری `assets/` سایت Hugo خود قرار دهید:
```
your-site/
├── assets/
│ └── demo.cast
└── content/
└── my-page.md
```
در فایل markdown خود:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
**روش 2: دایرکتوری Static**
فایل‌های cast را در دایرکتوری `static/` قرار دهید:
```
your-site/
├── static/
│ └── demo.cast
└── content/
└── my-page.md
```
در فایل markdown خود:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
**روش 3: بسته صفحه**
برای بسته‌های صفحه، فایل‌های cast را همراه با فایل markdown قرار دهید:
```
your-site/
└── content/
└── my-page/
├── index.md
└── demo.cast
```
در فایل markdown خود:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
{{< asciinema file="casts/demo.cast" >}}
### فایل‌های راه دور
همچنین می‌توانید از فایل‌های cast از هر URL راه دور استفاده کنید:
```markdown
{{</* asciinema file="https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH.cast" */>}}
{{</* asciinema file="https://example.com/demo.cast" */>}}
```
{{< asciinema file="https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH.cast" >}}
### نحوه کارکرد جستجوی فایل
shortcode به ترتیب زیر فایل‌های cast شما را به طور خودکار پیدا می‌کند:
1. **منابع بسته صفحه** (اگر از بسته صفحه استفاده می‌کنید)
2. **دایرکتوری assets جهانی** (`assets/`)
3. **دایرکتوری Static** (`static/`)
4. **URL های راه دور** (اگر مسیر با `http://` یا `https://` شروع شود)
اگر فایل پیدا نشود، Hugo پیام خطای مفیدی نمایش می‌دهد که به شما می‌گوید فایل را کجا قرار دهید.
## نمایش پیشرفته
این یک مثال پیشرفته است که تمام پارامترهای موجود را نشان می‌دهد:
```markdown
{{</* asciinema
file="demo.cast"
theme="dracula"
speed="2"
autoplay="true"
loop="true"
markers="1.5:Installation,3.2:Configuration,5.8:Testing"
*/>}}
```
{{< asciinema
file="casts/demo.cast"
theme="dracula"
speed="2"
autoplay="true"
loop="true"
markers="1.5:Installation,3.2:Configuration,5.8:Testing"
>}}
## پارامترها
| پارامتر | نوع | پیش‌فرض | توضیحات |
|---------|-----|---------|---------|
| `file` | string | - | مسیر فایل .cast (ضروری). از فایل‌های محلی، مسیرهای مطلق و URL های راه دور پشتیبانی می‌کند |
| `theme` | string | `"asciinema"` | تم پخش‌کننده |
| `speed` | number | `1` | ضریب سرعت پخش |
| `autoplay` | boolean | `false` | شروع خودکار پخش |
| `loop` | boolean | `false` | پخش حلقه‌ای |
| `poster` | string | `""` | پوستر (فریم پیش‌نمایش) برای نمایش تا زمان شروع پخش. از نمادگذاری NPT پشتیبانی می‌کند (مثل "npt:1:23") |
| `markers` | string | `""` | نشانگرهای زمانی جدا شده با کاما. فرمت: "زمان:برچسب" یا فقط "زمان" (مثل "1.5:Installation,3.2:Configuration,5.8") |
@@ -0,0 +1,121 @@
---
title: "Asciinema Player コンポーネント"
linktitle: "Asciinema Player"
sidebar:
exclude: true
---
asciinema shortcode を使用すると、[asciinema](https://asciinema.org/) で作成されたターミナル録画を Hugo サイトに埋め込むことができます。再生制御、速度調整、テーマカスタマイズなどの機能を備えたリッチなターミナルプレイヤーを提供します。
## 基本的な使用方法
asciinema shortcode はローカルの `.cast` ファイルとリモート URL の両方をサポートしています。ローカルファイルを使用する方法は以下の通りです:
### ローカルファイル
**方法 1:Assets ディレクトリ(推奨)**
cast ファイルを Hugo サイトの `assets/` ディレクトリに配置:
```
your-site/
├── assets/
│ └── demo.cast
└── content/
└── my-page.md
```
markdown ファイル内:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
**方法 2:Static ディレクトリ**
cast ファイルを `static/` ディレクトリに配置:
```
your-site/
├── static/
│ └── demo.cast
└── content/
└── my-page.md
```
markdown ファイル内:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
**方法 3:ページバンドル**
ページバンドルの場合、cast ファイルを markdown ファイルと一緒に配置:
```
your-site/
└── content/
└── my-page/
├── index.md
└── demo.cast
```
markdown ファイル内:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
{{< asciinema file="casts/demo.cast" >}}
### リモートファイル
任意のリモート URL からの cast ファイルも使用できます:
```markdown
{{</* asciinema file="https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH.cast" */>}}
{{</* asciinema file="https://example.com/demo.cast" */>}}
```
{{< asciinema file="https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH.cast" >}}
### ファイル検索の仕組み
shortcode は以下の順序で cast ファイルを自動的に検索します:
1. **ページバンドルリソース**(ページバンドルを使用している場合)
2. **グローバル assets ディレクトリ**(`assets/`)
3. **Static ディレクトリ**(`static/`)
4. **リモート URL**(パスが `http://` または `https://` で始まる場合)
ファイルが見つからない場合、Hugo はファイルをどこに配置すべきかを示す有用なエラーメッセージを表示します。
## 高度なデモ
利用可能なすべてのパラメータを紹介する高度な例:
```markdown
{{</* asciinema
file="demo.cast"
theme="dracula"
speed="2"
autoplay="true"
loop="true"
markers="1.5:Installation,3.2:Configuration,5.8:Testing"
*/>}}
```
{{< asciinema
file="casts/demo.cast"
theme="dracula"
speed="2"
autoplay="true"
loop="true"
markers="1.5:Installation,3.2:Configuration,5.8:Testing"
>}}
## パラメータ
| パラメータ | 型 | デフォルト | 説明 |
|-----------|----|-----------|------|
| `file` | string | - | .cast ファイルパス(必須)。ローカルファイル、絶対パス、リモート URL をサポート |
| `theme` | string | `"asciinema"` | プレイヤーテーマ |
| `speed` | number | `1` | 再生速度倍率 |
| `autoplay` | boolean | `false` | 自動再生 |
| `loop` | boolean | `false` | ループ再生 |
| `poster` | string | `""` | 再生開始前に表示されるポスター(プレビューフレーム)。NPT表記法をサポート(例:"npt:1:23") |
| `markers` | string | `""` | カンマ区切りの時間マーカー。形式:"時間:ラベル" または "時間"のみ(例:"1.5:Installation,3.2:Configuration,5.8") |
@@ -0,0 +1,124 @@
---
title: "Asciinema Player Component"
linktitle: "Asciinema Player"
sidebar:
exclude: true
---
## Overview
The asciinema shortcode allows you to embed terminal recordings created with [asciinema](https://asciinema.org/) in your Hugo site. It provides a rich terminal player with features like playback controls, speed adjustment, and theme customization.
## Basic Usage
The asciinema shortcode supports both local `.cast` files and remote URLs. Here are the different ways to use local files:
### Local Files
**Method 1: Assets directory (recommended)**
Place your cast files in the `assets/` directory of your Hugo site:
```
your-site/
├── assets/
│ └── demo.cast
└── content/
└── my-page.md
```
In your markdown file:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
**Method 2: Static directory**
Place your cast files in the `static/` directory:
```
your-site/
├── static/
│ └── demo.cast
└── content/
└── my-page.md
```
In your markdown file:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
**Method 3: Page bundle**
For page bundles, place cast files alongside your markdown file:
```
your-site/
└── content/
└── my-page/
├── index.md
└── demo.cast
```
In your markdown file:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
{{< asciinema file="casts/demo.cast" >}}
### Remote Files
You can also use cast files from any remote URL:
```markdown
{{</* asciinema file="https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH.cast" */>}}
{{</* asciinema file="https://example.com/demo.cast" */>}}
```
{{< asciinema file="https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH.cast" >}}
### How File Lookup Works
The shortcode automatically finds your cast files by looking in this order:
1. **Page bundle resources** (if using page bundles)
2. **Global assets directory** (`assets/`)
3. **Static directory** (`static/`)
4. **Remote URLs** (if the path starts with `http://` or `https://`)
If a file is not found, Hugo will show a helpful error message telling you where to place the file.
## Advanced Demo
Here's a more advanced example showcasing all available parameters:
```markdown
{{</* asciinema
file="demo.cast"
theme="dracula"
speed="2"
autoplay="true"
loop="true"
markers="1.5:Installation,3.2:Configuration,5.8:Testing"
*/>}}
```
{{< asciinema
file="casts/demo.cast"
theme="dracula"
speed="2"
autoplay="true"
loop="true"
markers="1.5:Installation,3.2:Configuration,5.8:Testing"
>}}
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `file` | string | - | Path to the .cast file (required). Supports local files, absolute paths, and remote URLs |
| `theme` | string | `"asciinema"` | Player theme |
| `speed` | number | `1` | Playback speed multiplier |
| `autoplay` | boolean | `false` | Start playing automatically |
| `loop` | boolean | `false` | Loop the recording |
| `poster` | string | `""` | Poster (a preview frame) to display until the playback is started. Supports NPT notation (e.g., "npt:1:23") |
| `markers` | string | `""` | Comma-separated time markers. Format: "time:label" or just "time" (e.g., "1.5:Installation,3.2:Configuration,5.8") |
@@ -0,0 +1,121 @@
---
title: "Asciinema Player 组件"
linktitle: "Asciinema Player"
sidebar:
exclude: true
---
asciinema shortcode 允许你在 Hugo 站点中嵌入使用 [asciinema](https://asciinema.org/) 创建的终端录制。它提供了一个功能丰富的终端播放器,具有播放控制、速度调整和主题自定义等功能。
## 基本用法
asciinema shortcode 支持本地 `.cast` 文件和远程 URL。以下是使用本地文件的不同方法:
### 本地文件
**方法 1:Assets 目录(推荐)**
将你的 cast 文件放在 Hugo 站点的 `assets/` 目录中:
```
your-site/
├── assets/
│ └── demo.cast
└── content/
└── my-page.md
```
在你的 markdown 文件中:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
**方法 2:Static 目录**
将你的 cast 文件放在 `static/` 目录中:
```
your-site/
├── static/
│ └── demo.cast
└── content/
└── my-page.md
```
在你的 markdown 文件中:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
**方法 3:页面包**
对于页面包,将 cast 文件与你的 markdown 文件放在一起:
```
your-site/
└── content/
└── my-page/
├── index.md
└── demo.cast
```
在你的 markdown 文件中:
```markdown
{{</* asciinema file="demo.cast" */>}}
```
{{< asciinema file="casts/demo.cast" >}}
### 远程文件
你也可以使用来自任何远程 URL 的 cast 文件:
```markdown
{{</* asciinema file="https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH.cast" */>}}
{{</* asciinema file="https://example.com/demo.cast" */>}}
```
{{< asciinema file="https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH.cast" >}}
### 文件查找机制
shortcode 会按以下顺序自动查找你的 cast 文件:
1. **页面包资源**(如果使用页面包)
2. **全局 assets 目录**(`assets/`)
3. **Static 目录**(`static/`)
4. **远程 URL**(如果路径以 `http://` 或 `https://` 开头)
如果找不到文件,Hugo 会显示有用的错误信息,告诉你应该将文件放在哪里。
## 高级演示
这是一个展示所有可用参数的高级示例:
```markdown
{{</* asciinema
file="demo.cast"
theme="dracula"
speed="2"
autoplay="true"
loop="true"
markers="1.5:Installation,3.2:Configuration,5.8:Testing"
*/>}}
```
{{< asciinema
file="casts/demo.cast"
theme="dracula"
speed="2"
autoplay="true"
loop="true"
markers="1.5:Installation,3.2:Configuration,5.8:Testing"
>}}
## 参数
| 参数 | 类型 | 默认值 | 描述 |
|------|------|--------|------|
| `file` | string | - | .cast 文件路径(必需)。支持本地文件、绝对路径和远程 URL |
| `theme` | string | `"asciinema"` | 播放器主题 |
| `speed` | number | `1` | 播放速度倍数 |
| `autoplay` | boolean | `false` | 自动开始播放 |
| `loop` | boolean | `false` | 循环播放 |
| `poster` | string | `""` | 播放开始前显示的海报(预览帧)。支持 NPT 表示法(如 "npt:1:23") |
| `markers` | string | `""` | 逗号分隔的时间标记。格式:"时间:标签" 或仅 "时间"(如 "1.5:Installation,3.2:Configuration,5.8") |
@@ -0,0 +1,149 @@
---
title: کامپوننت Callout
linkTitle: Callout
aliases:
- callouts
prev: /docs/guide/shortcodes
---
یک کامپوننت داخلی برای نمایش اطلاعات مهم به خواننده.
<!--more-->
> [!NOTE]
> [هشدارهای سبک GitHub](../../markdown#alerts) از [نسخه 0.9.0](https://github.com/imfing/hextra/releases/tag/v0.9.0) پشتیبانی می‌شوند.
> این ویژگی از سینتکس Markdown برای رندر کردن callout استفاده می‌کند که باعث بهبود قابلیت حمل و خوانایی محتوا می‌شود.
## أمثلة
{{< callout >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
{{< callout type="info" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
{{< callout type="warning" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
{{< callout type="error" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
{{< callout type="important" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
### تقصير
{{< callout >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
```markdown
{{</* callout */>}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{</* /callout */>}}
```
### Info
{{< callout type="info" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
```markdown
{{</* callout type="info" */>}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{</* /callout */>}}
```
### Warning
{{< callout type="warning" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
```markdown
{{</* callout type="warning" */>}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{</* /callout */>}}
```
### Error
{{< callout type="error" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
```markdown
{{</* callout type="error" */>}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{</* /callout */>}}
```
### Important
{{< callout type="important" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
```markdown
{{</* callout type="important" */>}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{</* /callout */>}}
```
### أيقونة مخصصة
{{< callout icon="sparkles" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
```markdown
{{</* callout icon="sparkles" */>}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{</* /callout */>}}
```
{{< callout type="important" icon="sparkles" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
```markdown
{{</* callout type="important" icon="sparkles" */>}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{</* /callout */>}}
```
### الرموز التعبيرية
{{< callout emoji="🌐" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
```markdown
{{</* callout emoji="🌐" */>}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{</* /callout */>}}
```
{{< callout type="info" emoji="ℹ️" >}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{< /callout >}}
```markdown
{{</* callout type="info" emoji="ℹ️" */>}}
**الإشارة** عبارة عن جزء قصير من النص يهدف إلى جذب الانتباه.
{{</* /callout */>}}
```
## خيارات
| المعلمة | وصف |
|---------|---------------------------------------------------------------------|
| `type` | نوع الاستدعاء. (افتراضي، `info`، `warning`، `error`) |
| `emoji` | الرمز التعبيري الذي يظهر قبل المكالمة. |
| `icon` | رمز تعبيري للنداء (مرتبط بالنوع أو يمكن أن يكون رمز تعبيري مخصصًا). |
@@ -0,0 +1,149 @@
---
title: コールアウトコンポーネント
linkTitle: コールアウト
aliases:
- callouts
prev: /docs/guide/shortcodes
---
読者に重要な情報を表示するための組み込みコンポーネントです。
<!--more-->
> [!NOTE]
> [GitHubスタイルのアラート](../../markdown#alerts)は[v0.9.0](https://github.com/imfing/hextra/releases/tag/v0.9.0)以降でサポートされています。
> これはMarkdown構文を活用してコールアウトをレンダリングするため、コンテンツの移植性と可読性が向上します。
## 例
{{< callout >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
{{< callout type="info" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
{{< callout type="warning" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
{{< callout type="error" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
{{< callout type="important" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
### デフォルト
{{< callout >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
```markdown
{{</* callout */>}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{</* /callout */>}}
```
### Info
{{< callout type="info" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
```markdown
{{</* callout type="info" */>}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{</* /callout */>}}
```
### Warning
{{< callout type="warning" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
```markdown
{{</* callout type="warning" */>}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{</* /callout */>}}
```
### Error
{{< callout type="error" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
```markdown
{{</* callout type="error" */>}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{</* /callout */>}}
```
### Important
{{< callout type="important" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
```markdown
{{</* callout type="important" */>}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{</* /callout */>}}
```
### カスタムアイコン
{{< callout icon="sparkles" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
```markdown
{{</* callout icon="sparkles" */>}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{</* /callout */>}}
```
{{< callout type="important" icon="sparkles" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
```markdown
{{</* callout type="important" icon="sparkles" */>}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{</* /callout */>}}
```
### 絵文字
{{< callout emoji="🌐" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
```markdown
{{</* callout emoji="🌐" */>}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{</* /callout */>}}
```
{{< callout type="info" emoji="ℹ️" >}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{< /callout >}}
```markdown
{{</* callout type="info" emoji="ℹ️" */>}}
**コールアウト** は注目を集めることを目的とした短いテキストです。
{{</* /callout */>}}
```
## オプション
| パラメータ | 説明 |
|---------|---------------------------------------------|
| `type` | コールアウトのタイプ。(デフォルト、`info`、`warning`、`error`) |
| `emoji` | コールアウトの前に表示される絵文字。 |
| `icon` | コールアウトの絵文字 (タイプに関連、またはカスタム絵文字にすることもできます)。 |
@@ -0,0 +1,149 @@
---
title: Callout Component
linkTitle: Callout
aliases:
- callouts
prev: /docs/guide/shortcodes
---
A built-in component to show important information to the reader.
<!--more-->
> [!NOTE]
> [GitHub-style alerts](../../markdown#alerts) are supported since [v0.9.0](https://github.com/imfing/hextra/releases/tag/v0.9.0).
> It leverages Markdown syntax to render the callout which ensures better portability and readability of the content.
## Examples
{{< callout >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
{{< callout type="info" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
{{< callout type="warning" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
{{< callout type="error" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
{{< callout type="important" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
### Default
{{< callout >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
```markdown
{{</* callout */>}}
A **callout** is a short piece of text intended to attract attention.
{{</* /callout */>}}
```
### Info
{{< callout type="info" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
```markdown
{{</* callout type="info" */>}}
A **callout** is a short piece of text intended to attract attention.
{{</* /callout */>}}
```
### Warning
{{< callout type="warning" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
```markdown
{{</* callout type="warning" */>}}
A **callout** is a short piece of text intended to attract attention.
{{</* /callout */>}}
```
### Error
{{< callout type="error" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
```markdown
{{</* callout type="error" */>}}
A **callout** is a short piece of text intended to attract attention.
{{</* /callout */>}}
```
### Important
{{< callout type="important" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
```markdown
{{</* callout type="important" */>}}
A **callout** is a short piece of text intended to attract attention.
{{</* /callout */>}}
```
### Custom Icon
{{< callout icon="sparkles" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
```markdown
{{</* callout icon="sparkles" */>}}
A **callout** is a short piece of text intended to attract attention.
{{</* /callout */>}}
```
{{< callout type="important" icon="sparkles" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
```markdown
{{</* callout type="important" icon="sparkles" */>}}
A **callout** is a short piece of text intended to attract attention.
{{</* /callout */>}}
```
### Emoji
{{< callout emoji="🌐" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
```markdown
{{</* callout emoji="🌐" */>}}
A **callout** is a short piece of text intended to attract attention.
{{</* /callout */>}}
```
{{< callout type="info" emoji="ℹ️" >}}
A **callout** is a short piece of text intended to attract attention.
{{< /callout >}}
```markdown
{{</* callout type="info" emoji="ℹ️" */>}}
A **callout** is a short piece of text intended to attract attention.
{{</* /callout */>}}
```
## Options
| Parameter | Description |
|-----------|---------------------------------------------------------------------------------|
| `type` | The type of callout. (default, `info`, `warning`, `error`, `important`) |
| `emoji` | The emoji to show before the callout. |
| `icon` | The icon to show before the callout. (related to type or can be a custom icon). |
@@ -0,0 +1,149 @@
---
title: 提示框组件
linkTitle: 提示框
aliases:
- callouts
prev: /docs/guide/shortcodes
---
一个内置组件,用于向读者展示重要信息。
<!--more-->
> [!NOTE]
> 自 [v0.9.0](https://github.com/imfing/hextra/releases/tag/v0.9.0) 起支持 [GitHub风格提示框](../../markdown#alerts)。
> 它利用Markdown语法渲染提示框,确保内容具有更好的可移植性和可读性。
## 示例
{{< callout >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
{{< callout type="info" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
{{< callout type="warning" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
{{< callout type="error" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
{{< callout type="important" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
### 默认
{{< callout >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
```markdown
{{</* callout */>}}
**标注** 是一小段旨在吸引注意力的文字。
{{</* /callout */>}}
```
### Info
{{< callout type="info" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
```markdown
{{</* callout type="info" */>}}
**标注** 是一小段旨在吸引注意力的文字。
{{</* /callout */>}}
```
### Warning
{{< callout type="warning" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
```markdown
{{</* callout type="warning" */>}}
**标注** 是一小段旨在吸引注意力的文字。
{{</* /callout */>}}
```
### Error
{{< callout type="error" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
```markdown
{{</* callout type="error" */>}}
**标注** 是一小段旨在吸引注意力的文字。
{{</* /callout */>}}
```
### Important
{{< callout type="important" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
```markdown
{{</* callout type="important" */>}}
**标注** 是一小段旨在吸引注意力的文字。
{{</* /callout */>}}
```
### 自定义图标
{{< callout icon="sparkles" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
```markdown
{{</* callout icon="sparkles" */>}}
**标注** 是一小段旨在吸引注意力的文字。
{{</* /callout */>}}
```
{{< callout type="important" icon="sparkles" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
```markdown
{{</* callout type="important" icon="sparkles" */>}}
**标注** 是一小段旨在吸引注意力的文字。
{{</* /callout */>}}
```
### 表情符号
{{< callout emoji="🌐" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
```markdown
{{</* callout emoji="🌐" */>}}
**标注** 是一小段旨在吸引注意力的文字。
{{</* /callout */>}}
```
{{< callout type="info" emoji="ℹ️" >}}
**标注** 是一小段旨在吸引注意力的文字。
{{< /callout >}}
```markdown
{{</* callout type="info" emoji="ℹ️" */>}}
**标注** 是一小段旨在吸引注意力的文字。
{{</* /callout */>}}
```
## 选项
| 范围 | 描述 |
|---------|----------------------------|
| `type` | 标注的类型。(默认、“信息”、“警告”、“错误”) |
| `emoji` | 标注前显示的表情符号。 |
| `icon` | 标注的表情符号(与类型相关或可以是自定义表情符号)。 |
@@ -0,0 +1,116 @@
---
title: کامپوننت کارت‌ها
linkTitle: کارت‌ها
---
## مثال
{{< cards >}}
{{< card link="../callout" title="کال‌اوت" icon="warning" >}}
{{< card link="../callout" title="کارت با تگ" icon="tag" tag="تگ سفارشی">}}
{{< card link="/" title="بدون آیکون" >}}
{{< /cards >}}
{{< cards >}}
{{< card link="/" title="کارت تصویری" image="https://github.com/user-attachments/assets/71b7e3ec-1a8d-4582-b600-5425c6cc0407" subtitle="تصویر اینترنتی" >}}
{{< card link="/" title="تصویر محلی" image="/images/card-image-unprocessed.jpg" subtitle="تصویر خام در دایرکتوری استاتیک." >}}
{{< card link="/" title="تصویر محلی" image="images/space.jpg" subtitle="تصویر در دایرکتوری assets، پردازش شده توسط هوگو." method="Resize" options="600x q80 webp" >}}
{{< /cards >}}
## نحوه استفاده
```
{{</* cards */>}}
{{</* card link="../callout" title="کال‌اوت" icon="warning" */>}}
{{</* card link="../callout" title="کارت با تگ" icon="tag" tag= "تگ سفارشی" */>}}
{{</* card link="/" title="بدون آیکون" */>}}
{{</* /cards */>}}
```
```
{{</* cards */>}}
{{</* card link="/" title="کارت تصویری" image="https://source.unsplash.com/featured/800x600?landscape" subtitle="تصویر لنداسکیپ از Unsplash" */>}}
{{</* card link="/" title="تصویر محلی" image="/images/card-image-unprocessed.jpg" subtitle="تصویر خام در دایرکتوری استاتیک." */>}}
{{</* card link="/" title="تصویر محلی" image="images/space.jpg" subtitle="تصویر در دایرکتوری assets، پردازش شده توسط هوگو." method="Resize" options="600x q80 webp" */>}}
{{</* /cards */>}}
```
## پارامترهای کارت
| پارامتر | توضیحات |
|------------|-----------------------------------------------------------|
| `link` | URL (داخلی یا خارجی). |
| `title` | عنوان کارت. |
| `subtitle` | زیرعنوان (پشتیبانی از Markdown). |
| `icon` | نام آیکون. |
| `tag` | متن تگ. |
| `tagType` | نوع العلامة: default (رمادي)، `info`، `warning` و`error`. |
## کارت تصویری
علاوه بر این، کارت از افزودن تصویر و پردازش آن از طریق این پارامترها پشتیبانی می‌کند:
| پارامتر | توضیحات |
|--------------|---------------------------------------------------|
| `image` | آدرس تصویر کارت را مشخص می‌کند. |
| `method` | روش پردازش تصویر هوگو را تنظیم می‌کند. |
| `options` | تنظیمات پردازش تصویر هوگو را پیکربندی می‌کند. |
| `imageStyle` | يتم استخدامه لملء سمة النمط الخاصة بعلامة الصورة. |
کارت از سه نوع تصویر پشتیبانی می‌کند:
1. تصویر راه‌دور: URL کامل در پارامتر `image`.
2. تصویر استاتیک: از مسیر نسبی در دایرکتوری `static/` هوگو استفاده کنید.
3. تصویر پردازش شده: از مسیر نسبی در دایرکتوری `assets/` هوگو استفاده کنید.
Hextra به صورت خودکار تشخیص می‌دهد که آیا پردازش تصویر در زمان ساخت نیاز است و پارامتر `options` یا تنظیمات پیش‌فرض (Resize، 800x، کیفیت 80، فرمت WebP) را اعمال می‌کند.
در حال حاضر از این `method`ها پشتیبانی می‌کند: `Resize`, `Fit`, `Fill` و `Crop`.
برای اطلاعات بیشتر در مورد دستورات، روش‌ها و تنظیمات پردازش تصویر هوگو، به [مستندات پردازش تصویر](https://gohugo.io/content-management/image-processing/) آنها مراجعه کنید.
## تگ‌ها
کارت از افزودن تگ‌ها پشتیبانی می‌کند که می‌تواند برای نمایش اطلاعات وضعیت اضافی مفید باشد.
{{< cards >}}
{{< card link="../callout" title="کارت با تگ پیش‌فرض" tag="متن تگ" >}}
{{< card link="../callout" title="کارت با تگ خطا" tag="متن تگ" tagType="error" >}}
{{< card link="../callout" title="کارت با تگ اطلاعات" tag="متن تگ" tagType="info" >}}
{{< card link="../callout" title="کارت با تگ هشدار" tag="متن تگ" tagType="warning" >}}
{{< card link="/" title="کارت تصویری" image="https://github.com/user-attachments/assets/71b7e3ec-1a8d-4582-b600-5425c6cc0407" subtitle="تصویر اینترنتی" tag="متن تگ" tagType="error" >}}
{{< /cards >}}
```
{{</* cards */>}}
{{</* card link="../callout" title="کارت با رنگ تگ پیش‌فرض" tag="متن تگ" */>}}
{{</* card link="../callout" title="کارت با تگ قرمز پیش‌فرض" tag="متن تگ" tagType="error" */>}}
{{</* card link="../callout" title="کارت با تگ آبی" tag="متن تگ" tagType="info" */>}}
{{</* card link="../callout" title="کارت با تگ زرد" tag="متن تگ" tagType="warning" */>}}
{{</* /cards */>}}
```
## ستون‌ها
می‌توانید حداکثر تعداد ستون‌هایی که کارت‌ها می‌توانند در آن قرار بگیرند را با ارسال پارامتر `cols` به شورت‌کد `cards` مشخص کنید. توجه داشته باشید که ستون‌ها در صفحه‌های کوچکتر همچنان جمع می‌شوند.
{{< cards cols="1" >}}
{{< card link="/" title="کارت بالا" >}}
{{< card link="/" title="کارت پایین" >}}
{{< /cards >}}
{{< cards cols="2" >}}
{{< card link="/" title="کارت چپ" >}}
{{< card link="/" title="کارت راست" >}}
{{< /cards >}}
```
{{</* cards cols="1" */>}}
{{</* card link="/" title="کارت بالا" */>}}
{{</* card link="/" title="کارت پایین" */>}}
{{</* /cards */>}}
{{</* cards cols="2" */>}}
{{</* card link="/" title="کارت چپ" */>}}
{{</* card link="/" title="کارت راست" */>}}
{{</* /cards */>}}
```
@@ -0,0 +1,116 @@
---
title: カードコンポーネント
linkTitle: カード
---
## 例
{{< cards >}}
{{< card link="../callout" title="コールアウト" icon="warning" >}}
{{< card link="../callout" title="タグ付きカード" icon="tag" tag="カスタムタグ">}}
{{< card link="/" title="アイコンなし" >}}
{{< /cards >}}
{{< cards >}}
{{< card link="/" title="画像カード" image="https://github.com/user-attachments/assets/71b7e3ec-1a8d-4582-b600-5425c6cc0407" subtitle="インターネット画像" >}}
{{< card link="/" title="ローカル画像" image="/images/card-image-unprocessed.jpg" subtitle="staticディレクトリ下の未加工画像" >}}
{{< card link="/" title="ローカル画像" image="images/space.jpg" subtitle="assetsディレクトリ下の画像、Hugoで処理済み" method="Resize" options="600x q80 webp" >}}
{{< /cards >}}
## 使用方法
```
{{</* cards */>}}
{{</* card link="../callout" title="コールアウト" icon="warning" */>}}
{{</* card link="../callout" title="タグ付きカード" icon="tag" tag= "カスタムタグ" */>}}
{{</* card link="/" title="アイコンなし" */>}}
{{</* /cards */>}}
```
```
{{</* cards */>}}
{{</* card link="/" title="画像カード" image="https://source.unsplash.com/featured/800x600?landscape" subtitle="Unsplashの風景画像" */>}}
{{</* card link="/" title="ローカル画像" image="/images/card-image-unprocessed.jpg" subtitle="staticディレクトリ下の未加工画像" */>}}
{{</* card link="/" title="ローカル画像" image="images/space.jpg" subtitle="assetsディレクトリ下の画像、Hugoで処理済み" method="Resize" options="600x q80 webp" */>}}
{{</* /cards */>}}
```
## カードパラメータ
| パラメータ | 説明 |
|------------|-----------------------------------------------|
| `link` | URL(内部または外部)。 |
| `title` | カードのタイトル見出し。 |
| `subtitle` | サブタイトル見出し(Markdown対応)。 |
| `icon` | アイコン名。 |
| `tag` | タグのテキスト。 |
| `tagType` | タグのタイプ: デフォルト (グレー)、`info`、`warning`、`error`。 |
## 画像カード
さらに、カードには画像の追加と以下のパラメータを通じた処理がサポートされています:
| パラメータ | 説明 |
|--------------|----------------------------|
| `image` | カードの画像URLを指定します。 |
| `method` | Hugoの画像処理方法を設定します。 |
| `options` | Hugoの画像処理オプションを設定します。 |
| `imageStyle` | 画像タグのスタイル属性を入力するために使用されます。 |
カードは3種類の画像をサポートします:
1. リモート画像: `image`パラメータに完全なURLを指定。
2. 静的画像: Hugoの`static/`ディレクトリ内の相対パスを使用。
3. 処理済み画像: Hugoの`assets/`ディレクトリ内の相対パスを使用。
Hextraはビルド時に画像処理が必要か自動検出し、`options`パラメータまたはデフォルト設定(Resize、800x、品質80、WebP形式)を適用します。
現在サポートされている`method`: `Resize`、`Fit`、`Fill`、`Crop`。
Hugoの組み込み画像処理コマンド、方法、オプションの詳細については、[画像処理ドキュメント](https://gohugo.io/content-management/image-processing/)を参照してください。
## タグ
カードはタグの追加をサポートしており、追加のステータス情報を表示するのに便利です。
{{< cards >}}
{{< card link="../callout" title="デフォルトタグ付きカード" tag="タグテキスト" >}}
{{< card link="../callout" title="エラータグ付きカード" tag="タグテキスト" tagType="error" >}}
{{< card link="../callout" title="情報タグ付きカード" tag="タグテキスト" tagType="info" >}}
{{< card link="../callout" title="警告タグ付きカード" tag="タグテキスト" tagType="warning" >}}
{{< card link="/" title="画像カード" image="https://github.com/user-attachments/assets/71b7e3ec-1a8d-4582-b600-5425c6cc0407" subtitle="インターネット画像" tag="タグテキスト" tagType="error" >}}
{{< /cards >}}
```
{{</* cards */>}}
{{</* card link="../callout" title="デフォルト色タグ付きカード" tag="タグテキスト" */>}}
{{</* card link="../callout" title="赤タグ付きカード" tag="タグテキスト" tagType="error" */>}}
{{</* card link="../callout" title="青タグ付きカード" tag="タグテキスト" tagType="info" */>}}
{{</* card link="../callout" title="黄タグ付きカード" tag="タグテキスト" tagType="warning" */>}}
{{</* /cards */>}}
```
## 列
`cards`ショートコードに`cols`パラメータを渡すことで、カードが広がる最大列数を指定できます。ただし、小さい画面では列は折りたたまれます。
{{< cards cols="1" >}}
{{< card link="/" title="上部カード" >}}
{{< card link="/" title="下部カード" >}}
{{< /cards >}}
{{< cards cols="2" >}}
{{< card link="/" title="左カード" >}}
{{< card link="/" title="右カード" >}}
{{< /cards >}}
```
{{</* cards cols="1" */>}}
{{</* card link="/" title="上部カード" */>}}
{{</* card link="/" title="下部カード" */>}}
{{</* /cards */>}}
{{</* cards cols="2" */>}}
{{</* card link="/" title="左カード" */>}}
{{</* card link="/" title="右カード" */>}}
{{</* /cards */>}}
```
@@ -0,0 +1,126 @@
---
title: Cards Component
linkTitle: Cards
---
## Example
{{< cards >}}
{{< card link="../callout" title="Callout" icon="warning" >}}
{{< card link="../callout" title="Card with tag" icon="tag" tag="custom tag">}}
{{< card link="/" title="No Icon" >}}
{{< /cards >}}
{{< cards >}}
{{< card link="/" title="Image Card" image="https://github.com/user-attachments/assets/71b7e3ec-1a8d-4582-b600-5425c6cc0407" subtitle="Internet Image" >}}
{{< card link="/" title="Local Image" image="/images/card-image-unprocessed.jpg" subtitle="Raw image under static directory." >}}
{{< card link="/" title="Local Image" image="images/space.jpg" subtitle="Image under assets directory, processed by Hugo." method="Resize" options="600x q80 webp" >}}
{{< /cards >}}
## Usage
```
{{</* cards */>}}
{{</* card link="../callout" title="Callout" icon="warning" */>}}
{{</* card link="../callout" title="Card with tag" icon="tag" tag= "A custom tag" */>}}
{{</* card link="/" title="No Icon" */>}}
{{</* /cards */>}}
```
```
{{</* cards */>}}
{{</* card link="/" title="Image Card" image="https://source.unsplash.com/featured/800x600?landscape" subtitle="Unsplash Landscape" */>}}
{{</* card link="/" title="Local Image" image="/images/card-image-unprocessed.jpg" subtitle="Raw image under static directory." */>}}
{{</* card link="/" title="Local Image" image="images/space.jpg" subtitle="Image under assets directory, processed by Hugo." method="Resize" options="600x q80 webp" */>}}
{{</* card link="/" title="Custom Alt Text" image="images/space.jpg" alt="A beautiful view of space with stars and galaxies" subtitle="Image with custom alt text for accessibility." */>}}
{{</* /cards */>}}
```
## Card Parameters
| Parameter | Description |
| ---------- | -------------------------------------------------------------------------- |
| `link` | URL (internal or external). |
| `title` | Title heading for the card. |
| `subtitle` | Subtitle heading (supports Markdown). |
| `icon` | Name of the icon. See [icons]({{% relRef "icon" %}}) for more information. |
## Image Card
Additionally, the card supports adding image and processing through these parameters:
| Parameter | Description |
| ------------ | ------------------------------------------------------------------- |
| `image` | Specifies the image URL for the card. |
| `alt` | Alternative text for the image (defaults to title if not provided). |
| `method` | Sets Hugo's image processing method. |
| `options` | Configures Hugo's image processing options. |
| `imageStyle` | Used to fill the style attribute of the image tag. |
Card supports three kinds of images:
1. Remote image: the full URL in the `image` parameter.
2. Static image: use the relative path in Hugo's `static/` directory.
3. Processed image: use the relative path in Hugo's `assets/` directory.
Hextra auto-detects if image processing is needed during build and applies the `options` parameter or default settings (Resize, 800x, Quality 80, WebP Format).
It currently supports these `method`: `Resize`, `Fit`, `Fill` and `Crop`.
For more on Hugo's built in image processing commands, methods, and options see their [Image Processing Documentation](https://gohugo.io/content-management/image-processing/).
## Tags
Card supports adding tags which could be useful to show extra status information.
| Parameter | Description |
| ----------- | -------------------------------------------------------------------------------------- |
| `tag` | Text in tag. |
| `tagColor` | Color of the tag. See [badges]({{% relRef "others/#badges" %}}) for more information. |
| `tagIcon` | Icon of the tag. See [badges]({{% relRef "others/#badges" %}}) for more information. |
| `tagBorder` | Border of the tag. See [badges]({{% relRef "others/#badges" %}}) for more information. |
{{< cards >}}
{{< card link="../callout" title="Card with default tag" tag="tag text" >}}
{{< card link="../callout" title="Card with red tag" tag="tag text" tagColor="red" >}}
{{< card link="../callout" title="Card with blue tag" tag="tag text" tagColor="blue" >}}
{{< card link="../callout" title="Card with yellow tag" tag="tag text" tagColor="yellow" tagIcon="sparkles" tagBorder=false >}}
{{< card link="/" title="Image Card" image="/images/card-image-unprocessed.jpg" subtitle="Image" tag="tag text" tagColor="green" >}}
{{< card link="/" title="Image Card" image="images/space.jpg" subtitle="Image" tag="tag text" tagColor="purple" tagIcon="sparkles" tagBorder=false >}}
{{< /cards >}}
```
{{</* cards */>}}
{{</* card link="../callout" title="Card with default tag color" tag="tag text" */>}}
{{</* card link="../callout" title="Card with red tag" tag="tag text" tagColor="red" */>}}
{{</* card link="../callout" title="Card with blue tag" tag="tag text" tagColor="blue" */>}}
{{</* card link="../callout" title="Card with yellow tag" tag="tag text" tagColor="yellow" tagIcon="sparkles" tagBorder=false */>}}
{{</* card link="/" title="Image Card" image="/images/card-image-unprocessed.jpg" subtitle="Image" tag="tag text" tagColor="green" */>}}
{{</* card link="/" title="Image Card" image="images/space.jpg" subtitle="Image" tag="tag text" tagColor="purple" tagIcon="sparkles" tagBorder=false */>}}
{{</* /cards */>}}
```
## Columns
You can specify the maximum number of columns for cards to span by passing the `cols` parameter to the `cards` shortcode. Note that columns will still be collapsed on smaller screens.
{{< cards cols="1" >}}
{{< card link="/" title="Top Card" >}}
{{< card link="/" title="Bottom Card" >}}
{{< /cards >}}
{{< cards cols="2" >}}
{{< card link="/" title="Left Card" >}}
{{< card link="/" title="Right Card" >}}
{{< /cards >}}
```
{{</* cards cols="1" */>}}
{{</* card link="/" title="Top Card" */>}}
{{</* card link="/" title="Bottom Card" */>}}
{{</* /cards */>}}
{{</* cards cols="2" */>}}
{{</* card link="/" title="Left Card" */>}}
{{</* card link="/" title="Right Card" */>}}
{{</* /cards */>}}
```
@@ -0,0 +1,116 @@
---
title: 卡片组件
linkTitle: 卡片
---
## 示例
{{< cards >}}
{{< card link="../callout" title="提示框" icon="warning" >}}
{{< card link="../callout" title="带标签的卡片" icon="tag" tag="自定义标签">}}
{{< card link="/" title="无图标" >}}
{{< /cards >}}
{{< cards >}}
{{< card link="/" title="图片卡片" image="https://github.com/user-attachments/assets/71b7e3ec-1a8d-4582-b600-5425c6cc0407" subtitle="网络图片" >}}
{{< card link="/" title="本地图片" image="/images/card-image-unprocessed.jpg" subtitle="静态目录下的原始图片。" >}}
{{< card link="/" title="本地图片" image="images/space.jpg" subtitle="资源目录下的图片,经过Hugo处理。" method="Resize" options="600x q80 webp" >}}
{{< /cards >}}
## 使用方法
```
{{</* cards */>}}
{{</* card link="../callout" title="提示框" icon="warning" */>}}
{{</* card link="../callout" title="带标签的卡片" icon="tag" tag= "自定义标签" */>}}
{{</* card link="/" title="无图标" */>}}
{{</* /cards */>}}
```
```
{{</* cards */>}}
{{</* card link="/" title="图片卡片" image="https://source.unsplash.com/featured/800x600?landscape" subtitle="Unsplash风景图" */>}}
{{</* card link="/" title="本地图片" image="/images/card-image-unprocessed.jpg" subtitle="静态目录下的原始图片。" */>}}
{{</* card link="/" title="本地图片" image="images/space.jpg" subtitle="资源目录下的图片,经过Hugo处理。" method="Resize" options="600x q80 webp" */>}}
{{</* /cards */>}}
```
## 卡片参数
| 参数 | 描述 |
|------------|-----------------------------------------|
| `link` | 链接地址(内部或外部)。 |
| `title` | 卡片的标题。 |
| `subtitle` | 卡片的副标题(支持Markdown)。 |
| `icon` | 图标名称。 |
| `tag` | 标签文本。 |
| `tagType` | 标签类型:默认(灰色)、`info`、`warning` 和 `error`。 |
## 图片卡片
此外,卡片还支持通过以下参数添加图片并进行处理:
| 参数 | 描述 |
|--------------|-------------------|
| `image` | 指定卡片的图片URL。 |
| `method` | 设置Hugo的图片处理方法。 |
| `options` | 配置Hugo的图片处理选项。 |
| `imageStyle` | 用于填充图片标签的style属性。 |
卡片支持三种类型的图片:
1. 远程图片:在`image`参数中填写完整的URL。
2. 静态图片:使用Hugo的`static/`目录下的相对路径。
3. 处理后的图片:使用Hugo的`assets/`目录下的相对路径。
Hextra在构建时会自动检测是否需要图片处理,并应用`options`参数或默认设置(Resize,800x,质量80,WebP格式)。
目前支持的`method`有:`Resize`、`Fit`、`Fill`和`Crop`。
有关Hugo内置图片处理命令、方法和选项的更多信息,请参阅其[图片处理文档](https://gohugo.io/content-management/image-processing/)。
## 标签
卡片支持添加标签,可用于显示额外的状态信息。
{{< cards >}}
{{< card link="../callout" title="带默认标签的卡片" tag="标签文本" >}}
{{< card link="../callout" title="带错误标签的卡片" tag="标签文本" tagType="error" >}}
{{< card link="../callout" title="带信息标签的卡片" tag="标签文本" tagType="info" >}}
{{< card link="../callout" title="带警告标签的卡片" tag="标签文本" tagType="warning" >}}
{{< card link="/" title="图片卡片" image="https://github.com/user-attachments/assets/71b7e3ec-1a8d-4582-b600-5425c6cc0407" subtitle="网络图片" tag="标签文本" tagType="error" >}}
{{< /cards >}}
```
{{</* cards */>}}
{{</* card link="../callout" title="带默认标签颜色的卡片" tag="标签文本" */>}}
{{</* card link="../callout" title="带红色标签的卡片" tag="标签文本" tagType="error" */>}}
{{</* card link="../callout" title="带蓝色标签的卡片" tag="标签文本" tagType="info" */>}}
{{</* card link="../callout" title="带黄色标签的卡片" tag="标签文本" tagType="warning" */>}}
{{</* /cards */>}}
```
## 列数
可以通过向`cards`短代码传递`cols`参数来指定卡片的最大列数。请注意,在小屏幕上列数仍会折叠。
{{< cards cols="1" >}}
{{< card link="/" title="顶部卡片" >}}
{{< card link="/" title="底部卡片" >}}
{{< /cards >}}
{{< cards cols="2" >}}
{{< card link="/" title="左侧卡片" >}}
{{< card link="/" title="右侧卡片" >}}
{{< /cards >}}
```
{{</* cards cols="1" */>}}
{{</* card link="/" title="顶部卡片" */>}}
{{</* card link="/" title="底部卡片" */>}}
{{</* /cards */>}}
{{</* cards cols="2" */>}}
{{</* card link="/" title="左侧卡片" */>}}
{{</* card link="/" title="右侧卡片" */>}}
{{</* /cards */>}}
```
@@ -0,0 +1,43 @@
---
title: جزئیات
---
یک کامپوننت داخلی برای نمایش محتوای جمع‌شدنی.
<!--more-->
## مثال
{{< details title="جزئیات" >}}
این محتوای جزئیات است.
مارک‌داون **پشتیبانی می‌شود**.
{{< /details >}}
{{< details title="برای نمایش کلیک کنید" closed="true" >}}
این به‌صورت پیش‌فرض مخفی خواهد بود.
{{< /details >}}
## نحوه استفاده
````markdown
{{</* details title="جزئیات" */>}}
این محتوای جزئیات است.
مارک‌داون **پشتیبانی می‌شود**.
{{</* /details */>}}
````
````markdown
{{</* details title="برای نمایش کلیک کنید" closed="true" */>}}
این به‌صورت پیش‌فرض مخفی خواهد بود.
{{</* /details */>}}
````
@@ -0,0 +1,43 @@
---
title: 詳細
---
折りたたみ可能なコンテンツを表示するための組み込みコンポーネントです。
<!--more-->
## 例
{{< details title="詳細" >}}
これは詳細のコンテンツです。
Markdown は **サポートされています**。
{{< /details >}}
{{< details title="クリックして表示" closed="true" >}}
これはデフォルトで非表示になります。
{{< /details >}}
## 使用方法
````markdown
{{</* details title="詳細" */>}}
これは詳細のコンテンツです。
Markdown は **サポートされています**。
{{</* /details */>}}
````
````markdown
{{</* details title="クリックして表示" closed="true" */>}}
これはデフォルトで非表示になります。
{{</* /details */>}}
````
@@ -0,0 +1,43 @@
---
title: Details
---
A built-in component to display a collapsible content.
<!--more-->
## Example
{{< details title="Details" >}}
This is the content of the details.
Markdown is **supported**.
{{< /details >}}
{{< details title="Click me to reveal" closed="true" >}}
This will be hidden by default.
{{< /details >}}
## Usage
````markdown
{{</* details title="Details" */>}}
This is the content of the details.
Markdown is **supported**.
{{</* /details */>}}
````
````markdown
{{</* details title="Click me to reveal" closed="true" */>}}
This will be hidden by default.
{{</* /details */>}}
````
@@ -0,0 +1,43 @@
---
title: 详情
---
一个内置组件,用于显示可折叠的内容。
<!--more-->
## 示例
{{< details title="详情" >}}
这是详情的内容。
支持 **Markdown** 格式。
{{< /details >}}
{{< details title="点击我展开" closed="true" >}}
默认情况下,这部分内容会被隐藏。
{{< /details >}}
## 使用方法
````markdown
{{</* details title="详情" */>}}
这是详情的内容。
支持 **Markdown** 格式。
{{</* /details */>}}
````
````markdown
{{</* details title="点击我展开" closed="true" */>}}
默认情况下,这部分内容会被隐藏。
{{</* /details */>}}
````
@@ -0,0 +1,49 @@
---
title: کامپوننت FileTree
linkTitle: FileTree
---
## مثال
{{< filetree/container >}}
{{< filetree/folder name="content" >}}
{{< filetree/file name="_index.md" >}}
{{< filetree/folder name="docs" state="closed" >}}
{{< filetree/file name="_index.md" >}}
{{< filetree/file name="introduction.md" >}}
{{< filetree/file name="introduction.fr.md" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< filetree/file name="hugo.toml" >}}
{{< /filetree/container >}}
## نحوه استفاده
```text {filename="Markdown"}
{{</* filetree/container */>}}
{{</* filetree/folder name="content" */>}}
{{</* filetree/file name="_index.md" */>}}
{{</* filetree/folder name="docs" state="closed" */>}}
{{</* filetree/file name="_index.md" */>}}
{{</* filetree/file name="introduction.md" */>}}
{{</* filetree/file name="introduction.fr.md" */>}}
{{</* /filetree/folder */>}}
{{</* /filetree/folder */>}}
{{</* filetree/file name="hugo.toml" */>}}
{{</* /filetree/container */>}}
```
## خيارات
### `filetree/file`
| المعلمة | وصف |
|---------|------------|
| `name` | اسم الملف. |
### `filetree/folder`
| المعلمة | وصف |
|---------|---------------------------------------------------------------------------|
| `name` | اسم الملف. |
| `state` | حالة الملف. يمكن أن تكون `open` أو `closed`. القيمة الافتراضية هي `open`. |
@@ -0,0 +1,49 @@
---
title: FileTree コンポーネント
linkTitle: FileTree
---
## 例
{{< filetree/container >}}
{{< filetree/folder name="content" >}}
{{< filetree/file name="_index.md" >}}
{{< filetree/folder name="docs" state="closed" >}}
{{< filetree/file name="_index.md" >}}
{{< filetree/file name="introduction.md" >}}
{{< filetree/file name="introduction.fr.md" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< filetree/file name="hugo.toml" >}}
{{< /filetree/container >}}
## 使用方法
```text {filename="Markdown"}
{{</* filetree/container */>}}
{{</* filetree/folder name="content" */>}}
{{</* filetree/file name="_index.md" */>}}
{{</* filetree/folder name="docs" state="closed" */>}}
{{</* filetree/file name="_index.md" */>}}
{{</* filetree/file name="introduction.md" */>}}
{{</* filetree/file name="introduction.fr.md" */>}}
{{</* /filetree/folder */>}}
{{</* /filetree/folder */>}}
{{</* filetree/file name="hugo.toml" */>}}
{{</* /filetree/container */>}}
```
## オプション
### `filetree/file`
| パラメータ | 説明 |
|--------|----------|
| `name` | ファイルの名前。 |
### `filetree/folder`
| パラメータ | 説明 |
|---------|----------------------------------------------------------|
| `name` | ファイルの名前。 |
| `state` | ファイルの状態。`open` または `closed` のいずれかになります。デフォルトは `open` です。 |
@@ -0,0 +1,49 @@
---
title: FileTree Component
linkTitle: FileTree
---
## Example
{{< filetree/container >}}
{{< filetree/folder name="content" >}}
{{< filetree/file name="_index.md" >}}
{{< filetree/folder name="docs" state="closed" >}}
{{< filetree/file name="_index.md" >}}
{{< filetree/file name="introduction.md" >}}
{{< filetree/file name="introduction.fr.md" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< filetree/file name="hugo.toml" >}}
{{< /filetree/container >}}
## Usage
```text {filename="Markdown"}
{{</* filetree/container */>}}
{{</* filetree/folder name="content" */>}}
{{</* filetree/file name="_index.md" */>}}
{{</* filetree/folder name="docs" state="closed" */>}}
{{</* filetree/file name="_index.md" */>}}
{{</* filetree/file name="introduction.md" */>}}
{{</* filetree/file name="introduction.fr.md" */>}}
{{</* /filetree/folder */>}}
{{</* /filetree/folder */>}}
{{</* filetree/file name="hugo.toml" */>}}
{{</* /filetree/container */>}}
```
## Options
### `filetree/file`
| Parameter | Description |
|-----------|----------------------------------------------------------------------|
| `name` | The name of the file. |
### `filetree/folder`
| Parameter | Description |
|-----------|----------------------------------------------------------------------|
| `name` | The name of the file. |
| `state` | The state of the file. Can be `open` or `closed`. Default is `open`. |
@@ -0,0 +1,49 @@
---
title: 文件树组件
linkTitle: 文件树
---
## 示例
{{< filetree/container >}}
{{< filetree/folder name="content" >}}
{{< filetree/file name="_index.md" >}}
{{< filetree/folder name="docs" state="closed" >}}
{{< filetree/file name="_index.md" >}}
{{< filetree/file name="introduction.md" >}}
{{< filetree/file name="introduction.fr.md" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< filetree/file name="hugo.toml" >}}
{{< /filetree/container >}}
## 使用方法
```text {filename="Markdown"}
{{</* filetree/container */>}}
{{</* filetree/folder name="content" */>}}
{{</* filetree/file name="_index.md" */>}}
{{</* filetree/folder name="docs" state="closed" */>}}
{{</* filetree/file name="_index.md" */>}}
{{</* filetree/file name="introduction.md" */>}}
{{</* filetree/file name="introduction.fr.md" */>}}
{{</* /filetree/folder */>}}
{{</* /filetree/folder */>}}
{{</* filetree/file name="hugo.toml" */>}}
{{</* /filetree/container */>}}
```
## 选项
### `filetree/file`
| 范围 | 描述 |
|--------|--------|
| `name` | 文件的名称。 |
### `filetree/folder`
| 范围 | 描述 |
|---------|-------------------------------------|
| `name` | 文件的名称。 |
| `state` | 文件的状态。可以是`open`或`closed`。默认为`open`。 |
@@ -0,0 +1,175 @@
---
title: Hextra Shortcodes
linkTitle: Hextra
sidebar:
exclude: true
next: /docs/guide/deploy-site
---
الاستخدام الرئيسي لهذه الرموز المختصرة هو داخل التخطيط `hextra-home`.
## `hextra/feature-card`
رمز مختصر لعرض بطاقة مميزة.
### Usage
```
{{</* hextra/feature-card title="Title" subtitle="Subtitle" */>}}
```
### Options
| Parameter | Description |
|--------------|-------------------------|
| `title` | عنوان البطاقة. |
| `subtitle` | العنوان الفرعي للبطاقة. |
| `class` | فئة البطاقة. |
| `image` | صورة البطاقة. |
| `imageClass` | فئة الصورة. |
| `style` | نمط البطاقة. |
| `icon` | أيقونة البطاقة. |
| `link` | رابط البطاقة. |
## `hextra/feature-grid`
رمز مختصر لعرض شبكة الميزات.
### Usage
```
{{</* hextra/feature-grid cols="3" */>}}
{{</* hextra/feature-card title="One" */>}}
{{</* hextra/feature-card title="Two" */>}}
{{</* hextra/feature-card title="Three" */>}}
{{</* /hextra/feature-grid */>}}
```
### Options
| Parameter | Description |
|-----------|--------------|
| `cols` | عدد الأعمدة. |
| `style` | نمط الشبكة. |
## `hextra/hero-badge`
رمز مختصر لعرض شارة تحتوي على رابط.
### Usage
```
{{</* hextra/hero-badge */>}}
<div class="hx:w-2 hx:h-2 hx:rounded-full hx:bg-primary-400"></div>
<span>Free, open source</span>
{{</* icon name="arrow-circle-right" attributes="height=14" */>}}
{{</* /hextra/hero-badge */>}}
```
### Options
| Parameter | Description |
|-----------|--------------|
| `link` | رابط الشارة. |
| `class` | فئة الشارة. |
| `style` | شكل الشارة. |
## `hextra/hero-button`
رمز مختصر لعرض زر يحتوي على رابط.
### Usage
```
{{</* hextra/hero-button text="Get Started" link="/docs" */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `link` | رابط الزر. |
| `text` | نص الزر. |
| `style` | شكل الزر. |
## `hextra/hero-container`
حاوية بطل بسيطة مع صورة على الجانب الأيسر.
### Usage
```
{{</* hextra/hero-container image="images/logo.svg" imageTitle="title" */>}}
Content
{{</* /hextra/hero-container */>}}
```
### Options
| Parameter | Description |
|---------------|-----------------------------------------|
| `class` | فئة الحاوية. |
| `cols` | عدد الأعمدة (الافتراضي: `2`). |
| `image` | صورة الحاوية. |
| `imageCard` | عرض الصورة كبطاقة (الافتراضي: `false`). |
| `imageClass` | فئة الصورة. |
| `imageLink` | رابط الصورة. |
| `imageStyle` | شكل الصورة. |
| `imageTitle` | عنوان الصورة. |
| `imageWidth` | عرض الصورة (الافتراضي: `350`). |
| `imageHeight` | ارتفاع الصورة (الافتراضي: `350`). |
| `style` | شكل الحاوية. |
## `hextra/hero-headline`
رمز مختصر لعرض عنوان رئيسي.
### Usage
```
{{</* hextra/hero-headline */>}}
Build modern websites&nbsp;<br class="hx:sm:block hx:hidden" />with Markdown and Hugo
{{</* /hextra/hero-headline */>}}
```
### Options
| Parameter | Description |
|-----------|----------------|
| `style` | أسلوب العنوان. |
## `hextra/hero-section`
قسم بطل بسيط مع عنوان ونمط اختياري.
### Usage
```
{{</* hextra/hero-section heading="h3" */>}}Title{{</* /hextra/hero-section */>}}>
```
### Options
| Parameter | Description |
|-----------|--------------------------------|
| `heading` | مستوى العنوان (افتراضي: `h2`). |
| `style` | نمط العنوان. |
| `content` | محتوى العنوان. |
## `hextra/hero-subtitle`
رمز مختصر لعرض عنوان فرعي للبطل.
### Usage
```
{{</* hextra/hero-subtitle */>}}
Fast, batteries-included Hugo theme&nbsp;<br class="hx:sm:block hx:hidden" />for creating beautiful static websites
{{</* /hextra/hero-subtitle */>}}
```
### Options
| Parameter | Description |
|-----------|----------------|
| `style` | أسلوب الترجمة. |
@@ -0,0 +1,175 @@
---
title: Hextra Shortcodes
linkTitle: Hextra
sidebar:
exclude: true
next: /docs/guide/deploy-site
---
これらのショートコードの主な使用場所は、レイアウト `hextra-home` 内です。
## `hextra/feature-card`
機能カードを表示するためのショートコード。
### Usage
```
{{</* hextra/feature-card title="Title" subtitle="Subtitle" */>}}
```
### Options
| Parameter | Description |
|--------------|-------------|
| `title` | カードのタイトル。 |
| `subtitle` | カードのサブタイトル。 |
| `class` | カードのクラス。 |
| `image` | カードの画像。 |
| `imageClass` | 画像のクラス。 |
| `style` | カードのスタイル。 |
| `icon` | カードのアイコン。 |
| `link` | カードのリンク。 |
## `hextra/feature-grid`
機能グリッドを表示するためのショートコード。
### Usage
```
{{</* hextra/feature-grid cols="3" */>}}
{{</* hextra/feature-card title="One" */>}}
{{</* hextra/feature-card title="Two" */>}}
{{</* hextra/feature-card title="Three" */>}}
{{</* /hextra/feature-grid */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `cols` | 列の数。 |
| `style` | グリッドのスタイル。 |
## `hextra/hero-badge`
リンク付きのバッジをレンダリングするためのショートコード。
### Usage
```
{{</* hextra/hero-badge */>}}
<div class="hx:w-2 hx:h-2 hx:rounded-full hx:bg-primary-400"></div>
<span>Free, open source</span>
{{</* icon name="arrow-circle-right" attributes="height=14" */>}}
{{</* /hextra/hero-badge */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `link` | バッジのリンク。 |
| `class` | バッジのクラス。 |
| `style` | バッジのスタイル。 |
## `hextra/hero-button`
リンク付きのボタンをレンダリングするためのショートコード。
### Usage
```
{{</* hextra/hero-button text="Get Started" link="/docs" */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `link` | ボタンのリンク。 |
| `text` | ボタンのテキスト。 |
| `style` | ボタンのスタイル。 |
## `hextra/hero-container`
左側に画像があるシンプルなヒーロー コンテナー。
### Usage
```
{{</* hextra/hero-container image="images/logo.svg" imageTitle="title" */>}}
Content
{{</* /hextra/hero-container */>}}
```
### Options
| Parameter | Description |
|---------------|-----------------------------------|
| `class` | コンテナのクラス。 |
| `cols` | 列数(デフォルト:`2`)。 |
| `image` | コンテナの画像。 |
| `imageCard` | 画像をカードとして表示するかどうか(デフォルト:`false`)。 |
| `imageClass` | 画像のクラス。 |
| `imageLink` | 画像のリンク。 |
| `imageStyle` | 画像のスタイル。 |
| `imageTitle` | 画像のタイトル。 |
| `imageWidth` | 画像の幅(デフォルト:`350`)。 |
| `imageHeight` | 画像の高さ(デフォルト:`350`)。 |
| `style` | コンテナのスタイル。 |
## `hextra/hero-headline`
ヒーローの見出しを表示するためのショートコード。
### Usage
```
{{</* hextra/hero-headline */>}}
Build modern websites&nbsp;<br class="hx:sm:block hx:hidden" />with Markdown and Hugo
{{</* /hextra/hero-headline */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `style` | 見出しのスタイル。 |
## `hextra/hero-section`
見出しとオプションのスタイルを備えたシンプルなヒーロー セクション。
### Usage
```
{{</* hextra/hero-section heading="h3" */>}}Title{{</* /hextra/hero-section */>}}>
```
### Options
| Parameter | Description |
|-----------|----------------------|
| `heading` | 見出しレベル(デフォルト: `h2`)。 |
| `style` | 見出しのスタイル。 |
| `content` | 見出しの内容。 |
## `hextra/hero-subtitle`
ヒーローのサブタイトルを表示するためのショートコード。
### Usage
```
{{</* hextra/hero-subtitle */>}}
Fast, batteries-included Hugo theme&nbsp;<br class="hx:sm:block hx:hidden" />for creating beautiful static websites
{{</* /hextra/hero-subtitle */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `style` | 字幕のスタイル。 |
@@ -0,0 +1,175 @@
---
title: Hextra Shortcodes
linkTitle: Hextra
sidebar:
exclude: true
next: /docs/guide/deploy-site
---
The main usage of these shortcodes are within the layout `hextra-home`.
## `hextra/feature-card`
A shortcode for displaying a feature card.
### Usage
```
{{</* hextra/feature-card title="Title" subtitle="Subtitle" */>}}
```
### Options
| Parameter | Description |
|--------------|---------------------------|
| `title` | The title of the card. |
| `subtitle` | The subtitle of the card. |
| `class` | The class of the card. |
| `image` | The image of the card. |
| `imageClass` | The class of the image. |
| `style` | The style of the card. |
| `icon` | The icon of the card. |
| `link` | The link of the card. |
## `hextra/feature-grid`
A shortcode for displaying a feature grid.
### Usage
```
{{</* hextra/feature-grid cols="3" */>}}
{{</* hextra/feature-card title="One" */>}}
{{</* hextra/feature-card title="Two" */>}}
{{</* hextra/feature-card title="Three" */>}}
{{</* /hextra/feature-grid */>}}
```
### Options
| Parameter | Description |
|-----------|------------------------|
| `cols` | The number of columns. |
| `style` | The style of the grid. |
## `hextra/hero-badge`
A shortcode for rendering a badge with a link.
### Usage
```
{{</* hextra/hero-badge */>}}
<div class="hx:w-2 hx:h-2 hx:rounded-full hx:bg-primary-400"></div>
<span>Free, open source</span>
{{</* icon name="arrow-circle-right" attributes="height=14" */>}}
{{</* /hextra/hero-badge */>}}
```
### Options
| Parameter | Description |
|-----------|-------------------------|
| `link` | The link of the badge. |
| `class` | The class of the badge. |
| `style` | The style of the badge. |
## `hextra/hero-button`
A shortcode for rendering a button with a link.
### Usage
```
{{</* hextra/hero-button text="Get Started" link="/docs" */>}}
```
### Options
| Parameter | Description |
|-----------|--------------------------|
| `link` | The link of the button. |
| `text` | The text of the button. |
| `style` | The style of the button. |
## `hextra/hero-container`
A simple hero container with an image on the left side.
### Usage
```
{{</* hextra/hero-container image="images/logo.svg" imageTitle="title" */>}}
Content
{{</* /hextra/hero-container */>}}
```
### Options
| Parameter | Description |
|---------------|------------------------------------------------------------|
| `class` | The class of the container. |
| `cols` | The number of columns (default: `2`). |
| `image` | The image of the container. |
| `imageCard` | Whether to display the image as a card (default: `false`). |
| `imageClass` | The class of the image. |
| `imageLink` | The link of the image. |
| `imageStyle` | The style of the image. |
| `imageTitle` | The title of the image. |
| `imageWidth` | The width of the image (default: `350`). |
| `imageHeight` | The height of the image (default: `350`). |
| `style` | The style of the container. |
## `hextra/hero-headline`
A shortcode for displaying a hero headline.
### Usage
```
{{</* hextra/hero-headline */>}}
Build modern websites&nbsp;<br class="hx:sm:block hx:hidden" />with Markdown and Hugo
{{</* /hextra/hero-headline */>}}
```
### Options
| Parameter | Description |
|-----------|----------------------------|
| `style` | The style of the headline. |
## `hextra/hero-section`
A simple hero section with a heading and optional style.
### Usage
```
{{</* hextra/hero-section heading="h3" */>}}Title{{</* /hextra/hero-section */>}}>
```
### Options
| Parameter | Description |
|-----------|------------------------------------|
| `heading` | The heading level (default: `h2`). |
| `style` | The style of the heading. |
| `content` | The content of the heading. |
## `hextra/hero-subtitle`
A shortcode for displaying a hero subtitle.
### Usage
```
{{</* hextra/hero-subtitle */>}}
Fast, batteries-included Hugo theme&nbsp;<br class="hx:sm:block hx:hidden" />for creating beautiful static websites
{{</* /hextra/hero-subtitle */>}}
```
### Options
| Parameter | Description |
|-----------|----------------------------|
| `style` | The style of the subtitle. |
@@ -0,0 +1,175 @@
---
title: Hextra Shortcodes
linkTitle: Hextra
sidebar:
exclude: true
next: /docs/guide/deploy-site
---
这些短代码的主要用途是在布局`hextra-home`内。
## `hextra/feature-card`
显示功能卡的短代码。
### Usage
```
{{</* hextra/feature-card title="Title" subtitle="Subtitle" */>}}
```
### Options
| Parameter | Description |
|--------------|-------------|
| `title` | 卡片的标题。 |
| `subtitle` | 卡片的副标题。 |
| `class` | 卡片的类别。 |
| `image` | 卡片的图片。 |
| `imageClass` | 图片的类别。 |
| `style` | 卡片的样式。 |
| `icon` | 卡片的图标。 |
| `link` | 卡片的链接。 |
## `hextra/feature-grid`
用于显示特征网格的短代码。
### Usage
```
{{</* hextra/feature-grid cols="3" */>}}
{{</* hextra/feature-card title="One" */>}}
{{</* hextra/feature-card title="Two" */>}}
{{</* hextra/feature-card title="Three" */>}}
{{</* /hextra/feature-grid */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `cols` | 列数。 |
| `style` | 网格的样式。 |
## `hextra/hero-badge`
用于呈现带有链接的徽章的短代码。
### Usage
```
{{</* hextra/hero-badge */>}}
<div class="hx:w-2 hx:h-2 hx:rounded-full hx:bg-primary-400"></div>
<span>Free, open source</span>
{{</* icon name="arrow-circle-right" attributes="height=14" */>}}
{{</* /hextra/hero-badge */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `link` | 徽章的链接。 |
| `class` | 徽章的类别。 |
| `style` | 徽章的样式。 |
## `hextra/hero-button`
用于呈现带有链接的按钮的短代码。
### Usage
```
{{</* hextra/hero-button text="Get Started" link="/docs" */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `link` | 按钮的链接。 |
| `text` | 按钮的文本。 |
| `style` | 按钮的样式。 |
## `hextra/hero-container`
一个简单的英雄容器,左侧有一个图像。
### Usage
```
{{</* hextra/hero-container image="images/logo.svg" imageTitle="title" */>}}
Content
{{</* /hextra/hero-container */>}}
```
### Options
| Parameter | Description |
|---------------|--------------------------|
| `class` | 容器的类。 |
| `cols` | 列数(默认值:`2`)。 |
| `image` | 容器的图片。 |
| `imageCard` | 是否将图片显示为卡片(默认值:`false`)。 |
| `imageClass` | 图片的类。 |
| `imageLink` | 图片的链接。 |
| `imageStyle` | 图片的样式。 |
| `imageTitle` | 图片的标题。 |
| `imageWidth` | 图片的宽度(默认值:`350`)。 |
| `imageHeight` | 图片的高度(默认值:`350`)。 |
| `style` | 容器的样式。 |
## `hextra/hero-headline`
显示英雄标题的短代码。
### Usage
```
{{</* hextra/hero-headline */>}}
Build modern websites&nbsp;<br class="hx:sm:block hx:hidden" />with Markdown and Hugo
{{</* /hextra/hero-headline */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `style` | 标题的样式。 |
## `hextra/hero-section`
带有标题和可选样式的简单英雄部分。
### Usage
```
{{</* hextra/hero-section heading="h3" */>}}Title{{</* /hextra/hero-section */>}}>
```
### Options
| Parameter | Description |
|-----------|-----------------|
| `heading` | 标题级别(默认值:`h2`)。 |
| `style` | 标题的样式。 |
| `content` | 标题的内容。 |
## `hextra/hero-subtitle`
显示英雄字幕的短代码。
### Usage
```
{{</* hextra/hero-subtitle */>}}
Fast, batteries-included Hugo theme&nbsp;<br class="hx:sm:block hx:hidden" />for creating beautiful static websites
{{</* /hextra/hero-subtitle */>}}
```
### Options
| Parameter | Description |
|-----------|-------------|
| `style` | 字幕的样式。 |
@@ -0,0 +1,54 @@
---
title: آیکون
next: /docs/guide/shortcodes/steps
---
برای استفاده از این شورت‌کد به صورت درون‌خطی، باید قابلیت شورت‌کدهای درون‌خطی در تنظیمات فعال شود:
```yaml {filename="hugo.yaml"}
enableInlineShortcodes: true
```
لیست آیکون‌های موجود را می‌توانید در [`data/icons.yaml`](https://github.com/imfing/hextra/blob/main/data/icons.yaml) مشاهده کنید.
<!--more-->
## مثال
{{< icon "academic-cap" >}}
{{< icon "cake" >}}
{{< icon "gift" >}}
{{< icon "sparkles" >}}
## نحوه استفاده
```
{{</* icon "github" */>}}
```
آیکون‌های [Heroicons](https://v1.heroicons.com/) نسخه 1 به صورت پیش‌فرض در دسترس هستند.
### چگونه آیکون‌های خود را اضافه کنید
فایل `data/icons.yaml` را ایجاد کنید، سپس آیکون‌های SVG خود را با فرمت زیر اضافه کنید:
```yaml {filename="data/icons.yaml"}
your-icon: <svg>محتوای SVG آیکون شما</svg>
```
سپس می‌توانید از آن در شورت‌کد به این صورت استفاده کنید:
```
{{</* icon "your-icon" */>}}
{{</* card icon="your-icon" */>}}
```
نکته: [Iconify Design](https://iconify.design/) منبع خوبی برای یافتن آیکون‌های SVG برای سایت شماست.
## خيارات
| المعلمة | وصف |
|--------------|----------------|
| `name` | اسم الأيقونة |
| `attributes` | سمات الأيقونة. |
@@ -0,0 +1,54 @@
---
title: アイコン
next: /docs/guide/shortcodes/steps
---
このショートコードをインラインで使用するには、設定でインラインショートコードを有効にする必要があります:
```yaml {filename="hugo.yaml"}
enableInlineShortcodes: true
```
利用可能なアイコンの一覧は [`data/icons.yaml`](https://github.com/imfing/hextra/blob/main/data/icons.yaml) で確認できます。
<!--more-->
## 例
{{< icon "academic-cap" >}}
{{< icon "cake" >}}
{{< icon "gift" >}}
{{< icon "sparkles" >}}
## 使用方法
```
{{</* icon "github" */>}}
```
[Heroicons](https://v1.heroicons.com/) v1 のアウトラインアイコンがデフォルトで利用可能です。
### 独自のアイコンを追加する方法
`data/icons.yaml` ファイルを作成し、以下の形式で独自の SVG アイコンを追加します:
```yaml {filename="data/icons.yaml"}
your-icon: <svg>your icon svg content</svg>
```
追加したアイコンは以下のようにショートコードで使用できます:
```
{{</* icon "your-icon" */>}}
{{</* card icon="your-icon" */>}}
```
ヒント: [Iconify Design](https://iconify.design/) はサイト用の SVG アイコンを見つけるのに最適な場所です。
## オプション
| パラメータ | 説明 |
|--------------|----------|
| `name` | アイコン名 |
| `attributes` | アイコンの属性。 |
@@ -0,0 +1,54 @@
---
title: Icon
next: /docs/guide/shortcodes/steps
---
To use this shortcode inline, inline shortcode needs to be enabled in the config:
```yaml {filename="hugo.yaml"}
enableInlineShortcodes: true
```
List of available icons can be found in [`data/icons.yaml`](https://github.com/imfing/hextra/blob/main/data/icons.yaml).
<!--more-->
## Example
{{< icon "academic-cap" >}}
{{< icon "cake" >}}
{{< icon "gift" >}}
{{< icon "sparkles" >}}
## Usage
```
{{</* icon "github" */>}}
```
[Heroicons](https://v1.heroicons.com/) v1 outline icons are available out of the box.
### How to add your own icons
Create `data/icons.yaml` file, then add your own SVG icons in the following format:
```yaml {filename="data/icons.yaml"}
your-icon: <svg>your icon svg content</svg>
```
It then can be used in the shortcode like this:
```
{{</* icon "your-icon" */>}}
{{</* card icon="your-icon" */>}}
```
Tip: [Iconify Design](https://iconify.design/) is a great place to find SVG icons for your site.
## Options
| Name | Description |
|--------------|-----------------------------|
| `name` | Icon name |
| `attributes` | The attributes of the icon. |
@@ -0,0 +1,54 @@
---
title: 图标
next: /docs/guide/shortcodes/steps
---
要在行内使用此短代码,需在配置中启用行内短代码功能:
```yaml {filename="hugo.yaml"}
enableInlineShortcodes: true
```
可用图标列表可在 [`data/icons.yaml`](https://github.com/imfing/hextra/blob/main/data/icons.yaml) 中找到。
<!--more-->
## 示例
{{< icon "academic-cap" >}}
{{< icon "cake" >}}
{{< icon "gift" >}}
{{< icon "sparkles" >}}
## 使用方法
```
{{</* icon "github" */>}}
```
默认支持 [Heroicons](https://v1.heroicons.com/) v1 轮廓风格图标。
### 如何添加自定义图标
创建 `data/icons.yaml` 文件,按以下格式添加您的 SVG 图标:
```yaml {filename="data/icons.yaml"}
your-icon: <svg>您的图标 SVG 内容</svg>
```
随后即可通过短代码调用:
```
{{</* icon "your-icon" */>}}
{{</* card icon="your-icon" */>}}
```
提示:[Iconify Design](https://iconify.design/) 是寻找网站 SVG 图标的优质资源平台。
## 选项
| 范围 | 描述 |
|--------------|--------|
| `name` | 图标名称 |
| `attributes` | 图标的属性。 |
@@ -0,0 +1,79 @@
---
title: "کامپوننت Jupyter Notebook"
linktitle: "Jupyter Notebook"
math: true
sidebar:
exclude: true
---
{{< callout type="warning" >}}ویژگی آزمایشی برای گنجاندن Jupyter Notebookها از طریق یک شورتکد. توجه داشته باشید که همه انواع سلول‌ها پشتیبانی نمی‌شوند.{{< /callout >}}
[Jupyter Notebook](https://jupyter.org/) یک برنامه نوت‌بوک HTML مستقل از زبان برای [پروژه Jupyter](https://jupyter.org/) است. این برنامه به شما امکان می‌دهد اسنادی ایجاد و به اشتراک بگذارید که شامل کد زنده، معادلات، تصاویر و متن روایی هستند.
<!--more-->
## نحوه استفاده
### استفاده از یک نوت‌بوک محلی
برای استفاده از شورتکد Jupyter Notebook، باید یک فایل Jupyter Notebook در پروژه خود داشته باشید. مشابه روشی که برای [افزودن تصاویر](../../organize-files#add-images) به پروژه استفاده می‌کنید، می‌توانید Jupyter Notebookها را به پوشه `assets` اضافه کنید.
{{< filetree/container >}}
{{< filetree/folder name="assets" >}}
{{< filetree/file name="notebook.ipynb" >}}
{{< /filetree/folder >}}
{{< filetree/folder name="content" >}}
{{< filetree/folder name="docs" >}}
{{< filetree/file name="my-page.md" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/container >}}
نوت‌بوک Jupyter را در صفحه با استفاده از شورتکد `jupyter` قرار دهید:
```markdown {filename="content/docs/my-page.md"}
---
title: صفحه من
math: true
---
{{%/* jupyter "notebook.ipynb" */%}}
```
به‌عنوان جایگزین، می‌توانید از ویژگی [بسته‌های صفحه][page-bundles] هوگو استفاده کنید تا Jupyter Notebookها را همراه با فایل Markdown سازماندهی کنید.
{{< filetree/container >}}
{{< filetree/folder name="content" >}}
{{< filetree/folder name="docs" >}}
{{< filetree/folder name="my-page" >}}
{{< filetree/file name="index.md" >}}
{{< filetree/file name="notebook.ipynb" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/container >}}
```markdown {filename="content/docs/my-page/index.md"}
---
title: صفحه من
math: true
---
{{%/* jupyter "notebook.ipynb" */%}}
```
### استفاده از یک نوت‌بوک راه‌دور
همچنین می‌توانید از یک نوت‌بوک راه‌دور با ارائه URL به فایل نوت‌بوک استفاده کنید. به‌عنوان مثال، برای گنجاندن نوت‌بوک [Jupyter Notebook چیست](https://github.com/jupyter/notebook/blob/main/docs/source/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.ipynb) در صفحه، می‌توانید از شورتکد زیر استفاده کنید:
```
{{%/* jupyter "https://raw.githubusercontent.com/jupyter/notebook/main/docs/source/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.ipynb" */%}}
```
## نمونه نوت‌بوک
{{< callout type="info" >}}مثال زیر یک نمونه از فایل نوت‌بوک است که در پوشه assets پروژه گنجانده شده است.{{< /callout >}}
{{% jupyter "example.ipynb" %}}
[page-bundles]: https://gohugo.io/content-management/page-bundles/#leaf-bundles
@@ -0,0 +1,79 @@
---
title: "Jupyter Notebook コンポーネント"
linktitle: "Jupyter Notebook"
math: true
sidebar:
exclude: true
---
{{< callout type="warning" >}}Jupyter Notebook をショートコード経由で組み込む実験的機能です。すべてのセルタイプがサポートされているわけではありません。{{< /callout >}}
[Jupyter Notebook](https://jupyter.org/) は [Project Jupyter](https://jupyter.org/) の言語非依存な HTML ノートブックアプリケーションです。ライブコード、数式、可視化、説明文を含むドキュメントを作成・共有できます。
<!--more-->
## 使用方法
### ローカルノートブックの使用
Jupyter Notebook ショートコードを使用するには、プロジェクト内に Jupyter Notebook ファイルが必要です。[画像を追加する](../../organize-files#add-images)方法と同様に、Jupyter Notebook を `assets` フォルダに追加できます。
{{< filetree/container >}}
{{< filetree/folder name="assets" >}}
{{< filetree/file name="notebook.ipynb" >}}
{{< /filetree/folder >}}
{{< filetree/folder name="content" >}}
{{< filetree/folder name="docs" >}}
{{< filetree/file name="my-page.md" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/container >}}
`jupyter` ショートコードを使用してページに Jupyter Notebook を組み込みます:
```markdown {filename="content/docs/my-page.md"}
---
title: マイページ
math: true
---
{{%/* jupyter "notebook.ipynb" */%}}
```
あるいは、Hugo の [ページバンドル][page-bundles] 機能を利用して、Jupyter Notebook を Markdown ファイルと一緒に整理することもできます。
{{< filetree/container >}}
{{< filetree/folder name="content" >}}
{{< filetree/folder name="docs" >}}
{{< filetree/folder name="my-page" >}}
{{< filetree/file name="index.md" >}}
{{< filetree/file name="notebook.ipynb" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/container >}}
```markdown {filename="content/docs/my-page/index.md"}
---
title: マイページ
math: true
---
{{%/* jupyter "notebook.ipynb" */%}}
```
### リモートノートブックの使用
ノートブックファイルの URL を指定することで、リモートノートブックも使用できます。例えば、[What is the Jupyter Notebook](https://github.com/jupyter/notebook/blob/main/docs/source/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.ipynb) ノートブックをページに組み込むには、以下のショートコードを使用します:
```
{{%/* jupyter "https://raw.githubusercontent.com/jupyter/notebook/main/docs/source/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.ipynb" */%}}
```
## ノートブックの例
{{< callout type="info" >}}以下は、プロジェクトの assets フォルダに含まれるノートブックファイルの例です。{{< /callout >}}
{{% jupyter "example.ipynb" %}}
[page-bundles]: https://gohugo.io/content-management/page-bundles/#leaf-bundles
@@ -0,0 +1,79 @@
---
title: "Jupyter Notebook Component"
linktitle: "Jupyter Notebook"
math: true
sidebar:
exclude: true
---
{{< callout type="warning" >}}Experimental feature to include Jupyter Notebooks via a shortcode. Note that not all cell types are supported.{{< /callout >}}
[Jupyter Notebook](https://jupyter.org/) is a language-agnostic HTML notebook application for [Project Jupyter](https://jupyter.org/). It allows you to create and share documents that contain live code, equations, visualizations, and narrative text.
<!--more-->
## How to use
### Using a local notebook
To use the Jupyter Notebook shortcode, you need to have a Jupyter Notebook file in your project. Similar to how you would [add images](../../organize-files#add-images) to the project, you can add Jupyter Notebooks to the `assets` folder.
{{< filetree/container >}}
{{< filetree/folder name="assets" >}}
{{< filetree/file name="notebook.ipynb" >}}
{{< /filetree/folder >}}
{{< filetree/folder name="content" >}}
{{< filetree/folder name="docs" >}}
{{< filetree/file name="my-page.md" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/container >}}
Include the Jupyter Notebook in the page using the `jupyter` shortcode:
```markdown {filename="content/docs/my-page.md"}
---
title: My Page
math: true
---
{{%/* jupyter "notebook.ipynb" */%}}
```
Alternatively, you can utilize the [page bundles][page-bundles] feature of Hugo to organize the Jupyter Notebooks together with the Markdown file.
{{< filetree/container >}}
{{< filetree/folder name="content" >}}
{{< filetree/folder name="docs" >}}
{{< filetree/folder name="my-page" >}}
{{< filetree/file name="index.md" >}}
{{< filetree/file name="notebook.ipynb" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/container >}}
```markdown {filename="content/docs/my-page/index.md"}
---
title: My Page
math: true
---
{{%/* jupyter "notebook.ipynb" */%}}
```
### Using a remote notebook
You can also use a remote notebook by providing the URL to the notebook file. For example, to include [What is the Jupyter Notebook](https://github.com/jupyter/notebook/blob/main/docs/source/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.ipynb) notebook in the page, you can use the following shortcode:
```
{{%/* jupyter "https://raw.githubusercontent.com/jupyter/notebook/main/docs/source/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.ipynb" */%}}
```
## Example Notebook
{{< callout type="info" >}}The following is an example of a notebook file that is included in the project assets folder.{{< /callout >}}
{{% jupyter "example.ipynb" %}}
[page-bundles]: https://gohugo.io/content-management/page-bundles/#leaf-bundles
@@ -0,0 +1,79 @@
---
title: "Jupyter Notebook 组件"
linktitle: "Jupyter Notebook"
math: true
sidebar:
exclude: true
---
{{< callout type="warning" >}}实验性功能:通过短代码嵌入 Jupyter Notebook。注意并非所有单元格类型都受支持。{{< /callout >}}
[Jupyter Notebook](https://jupyter.org/) 是 [Project Jupyter](https://jupyter.org/) 推出的语言无关的 HTML 笔记本应用。它允许你创建和分享包含动态代码、数学公式、可视化图表和叙述性文本的文档。
<!--more-->
## 使用方法
### 使用本地笔记本
要使用 Jupyter Notebook 短代码,你需要在项目中放置一个 Jupyter Notebook 文件。与[添加图片](../../organize-files#add-images)到项目类似,你可以将 Jupyter Notebook 放入 `assets` 文件夹。
{{< filetree/container >}}
{{< filetree/folder name="assets" >}}
{{< filetree/file name="notebook.ipynb" >}}
{{< /filetree/folder >}}
{{< filetree/folder name="content" >}}
{{< filetree/folder name="docs" >}}
{{< filetree/file name="my-page.md" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/container >}}
使用 `jupyter` 短代码将笔记本嵌入页面:
```markdown {filename="content/docs/my-page.md"}
---
title: 我的页面
math: true
---
{{%/* jupyter "notebook.ipynb" */%}}
```
或者,你可以利用 Hugo 的[页面包][page-bundles]功能,将 Jupyter Notebook 与 Markdown 文件组织在一起。
{{< filetree/container >}}
{{< filetree/folder name="content" >}}
{{< filetree/folder name="docs" >}}
{{< filetree/folder name="my-page" >}}
{{< filetree/file name="index.md" >}}
{{< filetree/file name="notebook.ipynb" >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/folder >}}
{{< /filetree/container >}}
```markdown {filename="content/docs/my-page/index.md"}
---
title: 我的页面
math: true
---
{{%/* jupyter "notebook.ipynb" */%}}
```
### 使用远程笔记本
你也可以通过提供笔记本文件的 URL 来使用远程笔记本。例如,要在页面中嵌入 [什么是 Jupyter Notebook](https://github.com/jupyter/notebook/blob/main/docs/source/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.ipynb) 笔记本,可以使用以下短代码:
```
{{%/* jupyter "https://raw.githubusercontent.com/jupyter/notebook/main/docs/source/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.ipynb" */%}}
```
## 示例笔记本
{{< callout type="info" >}}以下示例展示的是项目 assets 文件夹中包含的笔记本文件。{{< /callout >}}
{{% jupyter "example.ipynb" %}}
[page-bundles]: https://gohugo.io/content-management/page-bundles/#leaf-bundles
@@ -0,0 +1,129 @@
---
title: سایر شورتکدها
linkTitle: سایر
next: /docs/guide/deploy-site
---
{{< callout type="warning" >}}
برخی از این‌ها شورتکدهای داخلی Hugo هستند.
این شورتکدها کمتر پایدار در نظر گرفته می‌شوند و ممکن است هر زمان تغییر کنند.
{{< /callout >}}
## نشان
### أمثلة
{{< badge "default" >}}&nbsp;
{{< badge content="border" border=false >}}&nbsp;
{{< badge content="color" color="green" >}}&nbsp;
{{< badge content="link" link="https://github.com/imfing/hextra/releases" >}}&nbsp;
{{< badge content="icon" icon="sparkles" >}}&nbsp;
### الاستخدام
#### تقصير
{{< badge "Badge" >}}&nbsp;
```
{{</* badge "Badge" */>}}
```
#### الألوان
{{< badge content="Badge" >}}&nbsp;
{{< badge content="Badge" color="purple" >}}&nbsp;
{{< badge content="Badge" color="indigo" >}}&nbsp;
{{< badge content="Badge" color="blue" >}} &nbsp;
{{< badge content="Badge" color="green" >}} &nbsp;
{{< badge content="Badge" color="yellow" >}} &nbsp;
{{< badge content="Badge" color="amber" >}} &nbsp;
{{< badge content="Badge" color="orange" >}} &nbsp;
{{< badge content="Badge" color="red" >}}&nbsp;
```
{{</* badge content="Badge" */>}}
{{</* badge content="Badge" color="purple" */>}}
{{</* badge content="Badge" color="indigo" */>}}
{{</* badge content="Badge" color="blue" */>}}
{{</* badge content="Badge" color="green" */>}}
{{</* badge content="Badge" color="yellow" */>}}
{{</* badge content="Badge" color="amber" */>}}
{{</* badge content="Badge" color="orange" */>}}
{{</* badge content="Badge" color="red" */>}}
```
{{< badge content="Badge" border=false >}} &nbsp;
{{< badge content="Badge" color="purple" border=false >}} &nbsp;
{{< badge content="Badge" color="indigo" border=false >}} &nbsp;
{{< badge content="Badge" color="blue" border=false >}} &nbsp;
{{< badge content="Badge" color="green" border=false >}} &nbsp;
{{< badge content="Badge" color="yellow" border=false >}} &nbsp;
{{< badge content="Badge" color="amber" border=false >}} &nbsp;
{{< badge content="Badge" color="orange" border=false >}}&nbsp;
{{< badge content="Badge" color="red" border=false >}}&nbsp;
```
{{</* badge content="Badge" border=false */>}}
{{</* badge content="Badge" color="purple" border=false */>}}
{{</* badge content="Badge" color="indigo" border=false */>}}
{{</* badge content="Badge" color="blue" border=false */>}}
{{</* badge content="Badge" color="green" border=false */>}}
{{</* badge content="Badge" color="yellow" border=false */>}}
{{</* badge content="Badge" color="amber" border=false */>}}
{{</* badge content="Badge" color="orange" border=false */>}}
{{</* badge content="Badge" color="red" border=false */>}}
```
#### المتغيرات
{{< badge content="Badge" icon="sparkles" >}}&nbsp;
{{< badge content="Releases" link="https://github.com/imfing/hextra/releases" icon="github" >}}&nbsp;
```
{{</* badge content="Badge" icon="sparkles" */>}}
{{</* badge content="Releases" link="https://github.com/imfing/hextra/releases" icon="github" */>}}
```
### خيارات
| المعلمة | وصف |
|-----------|-----------------------------------------------------------------------------------------------------------|
| `content` | نص الشارة. |
| `link` | رابط الشارة. |
| `icon` | رمز الشارة. |
| `color` | `gray` (تقصير), `purple`, `indigo`, `blue`, `green`, `yellow`, `amber`, `orange`, `red`.<br/> لون الشارة. |
| `class` | فئة الشارة. |
| `border` | إضافة أو إزالة الحدود (افتراضي: true |
## یوتیوب
تعبیه یک ویدیوی یوتیوب.
```
{{</* youtube VIDEO_ID */>}}
```
نتیجه:
{{< youtube id=dQw4w9WgXcQ loading=lazy >}}
برای اطلاعات بیشتر، به [شورتکد یوتیوب Hugo](https://gohugo.io/content-management/shortcodes/#youtube) مراجعه کنید.
## پی‌دی‌اف
با شورتکد پی‌دی‌اف، می‌توانید یک فایل پی‌دی‌اف را در محتوای خود تعبیه کنید.
```
{{</* pdf "https://example.com/sample.pdf" */>}}
```
همچنین می‌توانید فایل پی‌دی‌اف را در دایرکتوری پروژه خود قرار دهید و از مسیر نسبی استفاده کنید.
```
{{</* pdf "path/to/file.pdf" */>}}
```
مثال:
{{< pdf "https://upload.wikimedia.org/wikipedia/commons/1/13/Example.pdf" >}}
@@ -0,0 +1,129 @@
---
title: その他のショートコード
linkTitle: その他
next: /docs/guide/deploy-site
---
{{< callout type="warning" >}}
これらの一部は Hugo 組み込みのショートコードです。
これらのショートコードは安定性が低く、いつでも変更される可能性があります。
{{< /callout >}}
## バッジ
### 例
{{< badge "default" >}}&nbsp;
{{< badge content="border" border=false >}}&nbsp;
{{< badge content="color" color="green" >}}&nbsp;
{{< badge content="link" link="https://github.com/imfing/hextra/releases" >}}&nbsp;
{{< badge content="icon" icon="sparkles" >}}&nbsp;
### 使用法
#### デフォルト
{{< badge "Badge" >}}&nbsp;
```
{{</* badge "Badge" */>}}
```
#### 色
{{< badge content="Badge" >}}&nbsp;
{{< badge content="Badge" color="purple" >}}&nbsp;
{{< badge content="Badge" color="indigo" >}}&nbsp;
{{< badge content="Badge" color="blue" >}} &nbsp;
{{< badge content="Badge" color="green" >}} &nbsp;
{{< badge content="Badge" color="yellow" >}} &nbsp;
{{< badge content="Badge" color="amber" >}} &nbsp;
{{< badge content="Badge" color="orange" >}} &nbsp;
{{< badge content="Badge" color="red" >}}&nbsp;
```
{{</* badge content="Badge" */>}}
{{</* badge content="Badge" color="purple" */>}}
{{</* badge content="Badge" color="indigo" */>}}
{{</* badge content="Badge" color="blue" */>}}
{{</* badge content="Badge" color="green" */>}}
{{</* badge content="Badge" color="yellow" */>}}
{{</* badge content="Badge" color="amber" */>}}
{{</* badge content="Badge" color="orange" */>}}
{{</* badge content="Badge" color="red" */>}}
```
{{< badge content="Badge" border=false >}} &nbsp;
{{< badge content="Badge" color="purple" border=false >}} &nbsp;
{{< badge content="Badge" color="indigo" border=false >}} &nbsp;
{{< badge content="Badge" color="blue" border=false >}} &nbsp;
{{< badge content="Badge" color="green" border=false >}} &nbsp;
{{< badge content="Badge" color="yellow" border=false >}} &nbsp;
{{< badge content="Badge" color="amber" border=false >}} &nbsp;
{{< badge content="Badge" color="orange" border=false >}}&nbsp;
{{< badge content="Badge" color="red" border=false >}}&nbsp;
```
{{</* badge content="Badge" border=false */>}}
{{</* badge content="Badge" color="purple" border=false */>}}
{{</* badge content="Badge" color="indigo" border=false */>}}
{{</* badge content="Badge" color="blue" border=false */>}}
{{</* badge content="Badge" color="green" border=false */>}}
{{</* badge content="Badge" color="yellow" border=false */>}}
{{</* badge content="Badge" color="amber" border=false */>}}
{{</* badge content="Badge" color="orange" border=false */>}}
{{</* badge content="Badge" color="red" border=false */>}}
```
#### 変種
{{< badge content="Badge" icon="sparkles" >}}&nbsp;
{{< badge content="Releases" link="https://github.com/imfing/hextra/releases" icon="github" >}}&nbsp;
```
{{</* badge content="Badge" icon="sparkles" */>}}
{{</* badge content="Releases" link="https://github.com/imfing/hextra/releases" icon="github" */>}}
```
### オプション
| パラメータ | 説明 |
|-----------|--------------------------------------------------------------------------------------------------------------------------|
| `content` | バッジのテキスト。 |
| `link` | バッジのリンク。 |
| `icon` | バッジのアイコン。 |
| `color` | The color of the badge. <br/> `gray` (default), `purple`, `indigo`, `blue`, `green`, `yellow`, `amber`, `orange`, `red`. |
| `class` | バッジのクラス。 |
| `border` | 境界線を追加または削除します (デフォルト: true)。 |
## YouTube
YouTube 動画を埋め込みます。
```
{{</* youtube VIDEO_ID */>}}
```
結果:
{{< youtube id=dQw4w9WgXcQ loading=lazy >}}
詳細については、[Hugo の YouTube ショートコード](https://gohugo.io/content-management/shortcodes/#youtube)を参照してください。
## PDF
PDF ショートコードを使用すると、コンテンツ内に PDF ファイルを埋め込むことができます。
```
{{</* pdf "https://example.com/sample.pdf" */>}}
```
プロジェクトディレクトリ内に PDF ファイルを配置し、相対パスを使用することもできます。
```
{{</* pdf "path/to/file.pdf" */>}}
```
例:
{{< pdf "https://upload.wikimedia.org/wikipedia/commons/1/13/Example.pdf" >}}
@@ -0,0 +1,129 @@
---
title: Other Shortcodes
linkTitle: Others
next: /docs/guide/deploy-site
---
{{< callout type="warning" >}}
Some of these are Hugo built-in shortcodes.
These shortcodes are considered less stable and may be changed anytime.
{{< /callout >}}
## Badge
### Examples
{{< badge "default" >}}&nbsp;
{{< badge content="border" border=false >}}&nbsp;
{{< badge content="color" color="green" >}}&nbsp;
{{< badge content="link" link="https://github.com/imfing/hextra/releases" >}}&nbsp;
{{< badge content="icon" icon="sparkles" >}}&nbsp;
### Usage
#### Default
{{< badge "Badge" >}}&nbsp;
```
{{</* badge "Badge" */>}}
```
#### Colors
{{< badge content="Badge" >}}&nbsp;
{{< badge content="Badge" color="purple" >}}&nbsp;
{{< badge content="Badge" color="indigo" >}}&nbsp;
{{< badge content="Badge" color="blue" >}} &nbsp;
{{< badge content="Badge" color="green" >}} &nbsp;
{{< badge content="Badge" color="yellow" >}} &nbsp;
{{< badge content="Badge" color="amber" >}} &nbsp;
{{< badge content="Badge" color="orange" >}} &nbsp;
{{< badge content="Badge" color="red" >}}&nbsp;
```
{{</* badge content="Badge" */>}}
{{</* badge content="Badge" color="purple" */>}}
{{</* badge content="Badge" color="indigo" */>}}
{{</* badge content="Badge" color="blue" */>}}
{{</* badge content="Badge" color="green" */>}}
{{</* badge content="Badge" color="yellow" */>}}
{{</* badge content="Badge" color="amber" */>}}
{{</* badge content="Badge" color="orange" */>}}
{{</* badge content="Badge" color="red" */>}}
```
{{< badge content="Badge" border=false >}} &nbsp;
{{< badge content="Badge" color="purple" border=false >}} &nbsp;
{{< badge content="Badge" color="indigo" border=false >}} &nbsp;
{{< badge content="Badge" color="blue" border=false >}} &nbsp;
{{< badge content="Badge" color="green" border=false >}} &nbsp;
{{< badge content="Badge" color="yellow" border=false >}} &nbsp;
{{< badge content="Badge" color="amber" border=false >}} &nbsp;
{{< badge content="Badge" color="orange" border=false >}}&nbsp;
{{< badge content="Badge" color="red" border=false >}}&nbsp;
```
{{</* badge content="Badge" border=false */>}}
{{</* badge content="Badge" color="purple" border=false */>}}
{{</* badge content="Badge" color="indigo" border=false */>}}
{{</* badge content="Badge" color="blue" border=false */>}}
{{</* badge content="Badge" color="green" border=false */>}}
{{</* badge content="Badge" color="yellow" border=false */>}}
{{</* badge content="Badge" color="amber" border=false */>}}
{{</* badge content="Badge" color="orange" border=false */>}}
{{</* badge content="Badge" color="red" border=false */>}}
```
#### Variants
{{< badge content="Badge" icon="sparkles" >}}&nbsp;
{{< badge content="Releases" link="https://github.com/imfing/hextra/releases" icon="github" >}}&nbsp;
```
{{</* badge content="Badge" icon="sparkles" */>}}
{{</* badge content="Releases" link="https://github.com/imfing/hextra/releases" icon="github" */>}}
```
### Options
| Name | Description |
|-----------|--------------------------------------------------------------------------------------------------------------------------|
| `content` | The text of the badge. |
| `link` | The link of the badge. |
| `icon` | The icon of the badge. |
| `color` | The color of the badge. <br/> `gray` (default), `purple`, `indigo`, `blue`, `green`, `yellow`, `amber`, `orange`, `red`. |
| `class` | The class of the badge. |
| `border` | Adds or removes the border (default: true). |
## YouTube
Embed a YouTube video.
```
{{</* youtube VIDEO_ID */>}}
```
Result:
{{< youtube id=dQw4w9WgXcQ loading=lazy >}}
For more information, see [Hugo's YouTube Shortcode](https://gohugo.io/content-management/shortcodes/#youtube).
## PDF
With PDF shortcode, you can embed a PDF file in your content.
```
{{</* pdf "https://example.com/sample.pdf" */>}}
```
You can also place the PDF file in your project directory and use the relative path.
```
{{</* pdf "path/to/file.pdf" */>}}
```
Example:
{{< pdf "https://upload.wikimedia.org/wikipedia/commons/1/13/Example.pdf" >}}
@@ -0,0 +1,129 @@
---
title: 其他短代码
linkTitle: 其他
next: /docs/guide/deploy-site
---
{{< callout type="warning" >}}
其中部分为Hugo内置短代码。
这些短代码稳定性较低,可能随时变更。
{{< /callout >}}
## 徽章
### 示例
{{< badge "default" >}}&nbsp;
{{< badge content="border" border=false >}}&nbsp;
{{< badge content="color" color="green" >}}&nbsp;
{{< badge content="link" link="https://github.com/imfing/hextra/releases" >}}&nbsp;
{{< badge content="icon" icon="sparkles" >}}&nbsp;
### 使用
#### 默认
{{< badge "徽章" >}}&nbsp;
```
{{</* badge "徽章" */>}}
```
#### 颜色
{{< badge content="徽章" >}}&nbsp;
{{< badge content="徽章" color="purple" >}}&nbsp;
{{< badge content="徽章" color="indigo" >}}&nbsp;
{{< badge content="徽章" color="blue" >}} &nbsp;
{{< badge content="徽章" color="green" >}} &nbsp;
{{< badge content="徽章" color="yellow" >}} &nbsp;
{{< badge content="徽章" color="amber" >}} &nbsp;
{{< badge content="徽章" color="orange" >}} &nbsp;
{{< badge content="徽章" color="red" >}}&nbsp;
```
{{</* badge content="徽章" */>}}
{{</* badge content="徽章" color="purple" */>}}
{{</* badge content="徽章" color="indigo" */>}}
{{</* badge content="徽章" color="blue" */>}}
{{</* badge content="徽章" color="green" */>}}
{{</* badge content="徽章" color="yellow" */>}}
{{</* badge content="徽章" color="amber" */>}}
{{</* badge content="徽章" color="orange" */>}}
{{</* badge content="徽章" color="red" */>}}
```
{{< badge content="徽章" border=false >}} &nbsp;
{{< badge content="徽章" color="purple" border=false >}} &nbsp;
{{< badge content="徽章" color="indigo" border=false >}} &nbsp;
{{< badge content="徽章" color="blue" border=false >}} &nbsp;
{{< badge content="徽章" color="green" border=false >}} &nbsp;
{{< badge content="徽章" color="yellow" border=false >}} &nbsp;
{{< badge content="徽章" color="amber" border=false >}} &nbsp;
{{< badge content="徽章" color="orange" border=false >}}&nbsp;
{{< badge content="徽章" color="red" border=false >}}&nbsp;
```
{{</* badge content="徽章" border=false */>}}
{{</* badge content="徽章" color="purple" border=false */>}}
{{</* badge content="徽章" color="indigo" border=false */>}}
{{</* badge content="徽章" color="blue" border=false */>}}
{{</* badge content="徽章" color="green" border=false */>}}
{{</* badge content="徽章" color="yellow" border=false */>}}
{{</* badge content="徽章" color="amber" border=false */>}}
{{</* badge content="徽章" color="orange" border=false */>}}
{{</* badge content="徽章" color="red" border=false */>}}
```
#### 变体
{{< badge content="徽章" icon="sparkles" >}}&nbsp;
{{< badge content="Releases" link="https://github.com/imfing/hextra/releases" icon="github" >}}&nbsp;
```
{{</* badge content="徽章" icon="sparkles" */>}}
{{</* badge content="Releases" link="https://github.com/imfing/hextra/releases" icon="github" */>}}
```
### 选项
| 姓名 | 描述 |
|-----------|----------------------------------------------------------------------------------------------------|
| `content` | 徽章的文字。 |
| `link` | 徽章的链接。 |
| `icon` | 徽章的图标。 |
| `color` | 徽章的颜色。 <br/> `gray` (默认), `purple`, `indigo`, `blue`, `green`, `yellow`, `amber`, `orange`, `red`. |
| `class` | 徽章的等级。 |
| `border` | 添加或删除边框 (默认:true). |
## YouTube
嵌入YouTube视频。
```
{{</* youtube 视频ID */>}}
```
效果:
{{< youtube id=dQw4w9WgXcQ loading=lazy >}}
更多信息,请参阅 [Hugo 的 YouTube 短代码](https://gohugo.io/content-management/shortcodes/#youtube)。
## PDF
通过PDF短代码可在内容中嵌入PDF文件。
```
{{</* pdf "https://example.com/sample.pdf" */>}}
```
也可将PDF文件置于项目目录中并使用相对路径。
```
{{</* pdf "path/to/file.pdf" */>}}
```
示例:
{{< pdf "https://upload.wikimedia.org/wikipedia/commons/1/13/Example.pdf" >}}
@@ -0,0 +1,47 @@
---
title: مراحل
---
یک کامپوننت داخلی برای نمایش یک سری مراحل.
## مثال
{{% steps %}}
### مرحله ۱
این اولین مرحله است.
### مرحله ۲
این دومین مرحله است.
### مرحله ۳
این سومین مرحله است.
{{% /steps %}}
## نحوه استفاده
{{< callout type="warning" >}}
لطفاً توجه داشته باشید که این شورتکد **فقط برای محتوای Markdown** طراحی شده است.
اگر محتوای HTML یا شورتکدهای دیگر را به عنوان محتوای مرحله قرار دهید، ممکن است به درستی نمایش داده نشود.
{{< /callout >}}
عنوان h3 مارک‌داون را درون شورتکد `steps` قرار دهید.
```
{{%/* steps */%}}
### مرحله ۱
این اولین مرحله است.
### مرحله ۲
این دومین مرحله است.
{{%/* /steps */%}}
```
@@ -0,0 +1,47 @@
---
title: ステップ
---
一連のステップを表示するための組み込みコンポーネントです。
## 例
{{% steps %}}
### ステップ 1
これは最初のステップです。
### ステップ 2
これは2番目のステップです。
### ステップ 3
これは3番目のステップです。
{{% /steps %}}
## 使い方
{{< callout type="warning" >}}
このショートコードは **Markdown コンテンツ専用** であることに注意してください。
HTML コンテンツや他のショートコードをステップの内容として含めると、期待通りにレンダリングされない場合があります。
{{< /callout >}}
`steps` ショートコード内に Markdown の h3 ヘッダーを配置します。
```
{{%/* steps */%}}
### ステップ 1
これは最初のステップです。
### ステップ 2
これは2番目のステップです。
{{%/* /steps */%}}
```
@@ -0,0 +1,57 @@
---
title: Steps
---
A built-in component to display a series of steps.
You can use the Markdown attribute `{class="no-step-marker"}` to prevent a heading from being counted as a step.
## Example
{{% steps %}}
### Step 1
This is the first step.
### Step 2
This is the second step.
#### Step subheading {class="no-step-marker"}
This will not be counted as a step.
### Step 3
This is the third step.
{{% /steps %}}
## Usage
{{< callout type="warning" >}}
Please note that this shortcode is intended **only for Markdown content**.
If you put HTML content or other shortcodes as step content, it may not render as expected.
{{< /callout >}}
Put Markdown h3 header within `steps` shortcode.
```
{{%/* steps */%}}
### Step 1
This is the first step.
### Step 2
This is the second step.
#### Step subheading {class="no-step-marker"}
This will not be counted as a step.
{{%/* /steps */%}}
```
@@ -0,0 +1,47 @@
---
title: 步骤
---
一个内置组件,用于显示一系列步骤。
## 示例
{{% steps %}}
### 第一步
这是第一步。
### 第二步
这是第二步。
### 第三步
这是第三步。
{{% /steps %}}
## 使用方法
{{< callout type="warning" >}}
请注意,此短代码**仅适用于Markdown内容**。
如果在步骤内容中放入HTML或其他短代码,可能无法按预期渲染。
{{< /callout >}}
在`steps`短代码内放置Markdown的三级标题。
```
{{%/* steps */%}}
### 第一步
这是第一步。
### 第二步
这是第二步。
{{%/* /steps */%}}
```
@@ -0,0 +1,149 @@
---
title: تب‌ها
next: /docs/guide/deploy-site
---
## مثال
{{< tabs >}}
{{< tab name="macOS" >}}**macOS**: یک سیستم عامل دسکتاپ توسط اپل.{{< /tab >}}
{{< tab name="Linux" >}}**Linux**: یک سیستم عامل متن‌باز.{{< /tab >}}
{{< tab name="Windows" >}}**Windows**: یک سیستم عامل دسکتاپ توسط مایکروسافت.{{< /tab >}}
{{< /tabs >}}
## نحوه استفاده
### پیش‌فرض
```
{{</* tabs */>}}
{{</* tab name="JSON" */>}}**JSON**: JavaScript Object Notation (JSON) یک فرمت متنی استاندارد برای نمایش داده‌های ساختاریافته بر اساس نحو شیء جاوااسکریپت است.{{</* /tab */>}}
{{</* tab name="YAML" */>}}**YAML**: YAML یک زبان سریال‌سازی داده‌های قابل خواندن توسط انسان است.{{</* /tab */>}}
{{</* tab name="TOML" */>}}**TOML**: TOML هدفش این است که یک فرمت فایل پیکربندی حداقلی باشد که به دلیل معناشناسی واضح، خواندنش آسان باشد.{{</* /tab */>}}
{{</* /tabs */>}}
```
### مشخص کردن ایندکس انتخاب شده
از ویژگی `selected` برای مشخص کردن تب انتخاب شده استفاده کنید.
```
{{</* tabs */>}}
{{</* tab name="JSON" */>}}**JSON**: JavaScript Object Notation (JSON) یک فرمت متنی استاندارد برای نمایش داده‌های ساختاریافته بر اساس نحو شیء جاوااسکریپت است.{{</* /tab */>}}
{{</* tab name="YAML" selected=true */>}}**YAML**: YAML یک زبان سریال‌سازی داده‌های قابل خواندن توسط انسان است.{{</* /tab */>}}
{{</* tab name="TOML" */>}}**TOML**: TOML هدفش این است که یک فرمت فایل پیکربندی حداقلی باشد که به دلیل معناشناسی واضح، خواندنش آسان باشد.{{</* /tab */>}}
{{</* /tabs */>}}
```
تب `YAML` به طور پیش‌فرض انتخاب خواهد شد.
{{< tabs >}}
{{< tab name="JSON" >}}**JSON**: JavaScript Object Notation (JSON) یک فرمت متنی استاندارد برای نمایش داده‌های ساختاریافته بر اساس نحو شیء جاوااسکریپت است.{{< /tab >}}
{{< tab name="YAML" selected=true >}}**YAML**: YAML یک زبان سریال‌سازی داده‌های قابل خواندن توسط انسان است.{{< /tab >}}
{{< tab name="TOML" >}}**TOML**: TOML هدفش این است که یک فرمت فایل پیکربندی حداقلی باشد که به دلیل معناشناسی واضح، خواندنش آسان باشد.{{< /tab >}}
{{< /tabs >}}
### افزودن آیکون
با استفاده از پارامتر `icon` برای هر `tab` می‌توانید قبل از عنوان تب آیکون نمایش دهید.
برای مشاهده لیست آیکون‌های موجود، صفحه [شورت‌کد آیکون](../icon) را ببینید.
```
{{</* tabs */>}}
{{</* tab name="Photos" icon="photograph" */>}}مدیریت و سازماندهی کتابخانه عکس‌های شما.{{</* /tab */>}}
{{</* tab name="Music" icon="music-note" */>}}مرور و پخش آهنگ‌های مورد علاقه شما.{{</* /tab */>}}
{{</* tab name="Videos" icon="film" */>}}تماشا و پخش محتوای ویدیویی.{{</* /tab */>}}
{{</* /tabs */>}}
```
{{< tabs >}}
{{< tab name="Photos" icon="photograph" >}}مدیریت و سازماندهی کتابخانه عکس‌های شما.{{< /tab >}}
{{< tab name="Music" icon="music-note" >}}مرور و پخش آهنگ‌های مورد علاقه شما.{{< /tab >}}
{{< tab name="Videos" icon="film" >}}تماشا و پخش محتوای ویدیویی.{{< /tab >}}
{{< /tabs >}}
### استفاده از Markdown
نحو Markdown شامل بلوک کد نیز پشتیبانی می‌شود:
````
{{</* tabs */>}}
{{</* tab name="JSON" */>}}
```json
{ "hello": "world" }
```
{{</* /tab */>}}
... سایر تب‌ها را به همین ترتیب اضافه کنید
{{</* /tabs */>}}
````
{{< tabs >}}
{{< tab name="JSON" >}}
```json
{ "hello": "world" }
```
{{< /tab >}}
{{< tab name="YAML" >}}
```yaml
hello: world
```
{{< /tab >}}
{{< tab name="TOML" >}}
```toml
hello = "world"
```
{{< /tab >}}
{{< /tabs >}}
### همگام‌سازی تب‌ها
تب‌هایی که لیست `name` یکسانی دارند می‌توانند همگام‌سازی شوند. وقتی فعال باشد، انتخاب یک تب تمام تب‌های دیگر با `name` یکسان را به‌روز می‌کند و انتخاب را در بین صفحات به خاطر می‌سپارد.
به صورت جهانی در فایل `hugo.yaml` در بخش `page` فعال کنید:
```yaml {filename="hugo.yaml"}
params:
page:
tabs:
sync: true
```
با فعال کردن این گزینه، دو بلوک تب زیر همیشه آیتم انتخاب شده یکسانی را نمایش خواهند داد:
```markdown
{{</* tabs */>}}
{{</* tab name="A" */>}}محتوای A{{</* /tab */>}}
{{</* tab name="B" */>}}محتوای B{{</* /tab */>}}
{{</* /tabs */>}}
{{</* tabs */>}}
{{</* tab name="A" */>}}محتوای دوم A{{</* /tab */>}}
{{</* tab name="B" */>}}محتوای دوم B{{</* /tab */>}}
{{</* /tabs */>}}
```
@@ -0,0 +1,149 @@
---
title: タブ
next: /docs/guide/deploy-site
---
## 例
{{< tabs >}}
{{< tab name="macOS" >}}**macOS**: Apple が提供するデスクトップオペレーティングシステム。{{< /tab >}}
{{< tab name="Linux" >}}**Linux**: オープンソースのオペレーティングシステム。{{< /tab >}}
{{< tab name="Windows" >}}**Windows**: Microsoft が提供するデスクトップオペレーティングシステム。{{< /tab >}}
{{< /tabs >}}
## 使用方法
### デフォルト
```
{{</* tabs */>}}
{{</* tab name="JSON" */>}}**JSON**: JavaScript Object Notation (JSON) は、JavaScript オブジェクト構文に基づいた構造化データを表現する標準のテキストベースフォーマットです。{{</* /tab */>}}
{{</* tab name="YAML" */>}}**YAML**: YAML は人間が読みやすいデータシリアライゼーション言語です。{{</* /tab */>}}
{{</* tab name="TOML" */>}}**TOML**: TOML は、明確なセマンティクスにより読みやすい最小限の設定ファイルフォーマットを目指しています。{{</* /tab */>}}
{{</* /tabs */>}}
```
### 選択インデックスの指定
`selected` プロパティを使用して選択するタブを指定します。
```
{{</* tabs */>}}
{{</* tab name="JSON" */>}}**JSON**: JavaScript Object Notation (JSON) は、JavaScript オブジェクト構文に基づいた構造化データを表現する標準のテキストベースフォーマットです。{{</* /tab */>}}
{{</* tab name="YAML" selected=true */>}}**YAML**: YAML は人間が読みやすいデータシリアライゼーション言語です。{{</* /tab */>}}
{{</* tab name="TOML" */>}}**TOML**: TOML は、明確なセマンティクスにより読みやすい最小限の設定ファイルフォーマットを目指しています。{{</* /tab */>}}
{{</* /tabs */>}}
```
`YAML` タブがデフォルトで選択されます。
{{< tabs >}}
{{< tab name="JSON" >}}**JSON**: JavaScript Object Notation (JSON) は、JavaScript オブジェクト構文に基づいた構造化データを表現する標準のテキストベースフォーマットです。{{< /tab >}}
{{< tab name="YAML" selected=true >}}**YAML**: YAML は人間が読みやすいデータシリアライゼーション言語です。{{< /tab >}}
{{< tab name="TOML" >}}**TOML**: TOML は、明確なセマンティクスにより読みやすい最小限の設定ファイルフォーマットを目指しています。{{< /tab >}}
{{< /tabs >}}
### アイコンを追加する
各タブに `icon` を指定すると、ラベルの前にアイコンを表示できます。
利用可能なアイコンの一覧は [Icon ショートコード](../icon) ページを参照してください。
```
{{</* tabs */>}}
{{</* tab name="Photos" icon="photograph" */>}}写真ライブラリを管理・整理します。{{</* /tab */>}}
{{</* tab name="Music" icon="music-note" */>}}お気に入りの曲を閲覧・再生します。{{</* /tab */>}}
{{</* tab name="Videos" icon="film" */>}}動画コンテンツを視聴・ストリーミングします。{{</* /tab */>}}
{{</* /tabs */>}}
```
{{< tabs >}}
{{< tab name="Photos" icon="photograph" >}}写真ライブラリを管理・整理します。{{< /tab >}}
{{< tab name="Music" icon="music-note" >}}お気に入りの曲を閲覧・再生します。{{< /tab >}}
{{< tab name="Videos" icon="film" >}}動画コンテンツを視聴・ストリーミングします。{{< /tab >}}
{{< /tabs >}}
### Markdown の使用
コードブロックを含む Markdown 構文もサポートされています:
````
{{</* tabs */>}}
{{</* tab name="JSON" */>}}
```json
{ "hello": "world" }
```
{{</* /tab */>}}
... 他のタブも同様に追加
{{</* /tabs */>}}
````
{{< tabs >}}
{{< tab name="JSON" >}}
```json
{ "hello": "world" }
```
{{< /tab >}}
{{< tab name="YAML" >}}
```yaml
hello: world
```
{{< /tab >}}
{{< tab name="TOML" >}}
```toml
hello = "world"
```
{{< /tab >}}
{{< /tabs >}}
### タブの同期
同じ `name` リストを持つタブは同期できます。有効にすると、タブを選択すると同じ `name` を持つ他のタブも更新され、ページ間で選択が記憶されます。
`hugo.yaml` の `page` セクションでグローバルに有効にします:
```yaml {filename="hugo.yaml"}
params:
page:
tabs:
sync: true
```
これを有効にすると、以下の 2 つのタブブロックは常に同じ選択項目を表示します:
```markdown
{{</* tabs */>}}
{{</* tab name="A" */>}}A の内容{{</* /tab */>}}
{{</* tab name="B" */>}}B の内容{{</* /tab */>}}
{{</* /tabs */>}}
{{</* tabs */>}}
{{</* tab name="A" */>}}2 番目の A の内容{{</* /tab */>}}
{{</* tab name="B" */>}}2 番目の B の内容{{</* /tab */>}}
{{</* /tabs */>}}
```
@@ -0,0 +1,155 @@
---
title: Tabs
next: /docs/guide/term
---
## Example
{{< tabs >}}
{{< tab name="JSON" >}}**JSON**: JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax.{{< /tab >}}
{{< tab name="YAML" >}}**YAML**: YAML is a human-readable data serialization language.{{< /tab >}}
{{< tab name="TOML" >}}**TOML**: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.{{< /tab >}}
{{< /tabs >}}
## Usage
### Default
```
{{</* tabs */>}}
{{</* tab name="JSON" */>}}**JSON**: JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax.{{</* /tab */>}}
{{</* tab name="YAML" */>}}**YAML**: YAML is a human-readable data serialization language.{{</* /tab */>}}
{{</* tab name="TOML" */>}}**TOML**: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.{{</* /tab */>}}
{{</* /tabs */>}}
```
### Specify Selected Tab
Use `selected` property to specify the selected tab.
```
{{</* tabs */>}}
{{</* tab name="JSON" */>}}**JSON**: JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax.{{</* /tab */>}}
{{</* tab name="YAML" selected=true */>}}**YAML**: YAML is a human-readable data serialization language.{{</* /tab */>}}
{{</* tab name="TOML" */>}}**TOML**: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.{{</* /tab */>}}
{{</* /tabs */>}}
```
The `YAML` tab will be selected by default.
{{< tabs >}}
{{< tab name="JSON" >}}**JSON**: JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax.{{< /tab >}}
{{< tab name="YAML" selected=true >}}**YAML**: YAML is a human-readable data serialization language.{{< /tab >}}
{{< tab name="TOML" >}}**TOML**: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.{{< /tab >}}
{{< /tabs >}}
### Add Icons
Use the `icon` property on each `tab` to display an icon before the label.
See the [Icon shortcode](../icon) page for the list of available icons.
```
{{</* tabs */>}}
{{</* tab name="Photos" icon="photograph" */>}}Manage and organize your photo library.{{</* /tab */>}}
{{</* tab name="Music" icon="music-note" */>}}Browse and play your favorite tracks.{{</* /tab */>}}
{{</* tab name="Videos" icon="film" */>}}Watch and stream video content.{{</* /tab */>}}
{{</* /tabs */>}}
```
{{< tabs >}}
{{< tab name="Photos" icon="photograph" >}}Manage and organize your photo library.{{< /tab >}}
{{< tab name="Music" icon="music-note" >}}Browse and play your favorite tracks.{{< /tab >}}
{{< tab name="Videos" icon="film" >}}Watch and stream video content.{{< /tab >}}
{{< /tabs >}}
### Use Markdown
Markdown syntax including code block is also supported:
````
{{</* tabs */>}}
{{</* tab name="JSON" */>}}
```json
{ "hello": "world" }
```
{{</* /tab */>}}
... add other tabs similarly
{{</* /tabs */>}}
````
{{< tabs >}}
{{< tab name="JSON" >}}
```json
{ "hello": "world" }
```
{{< /tab >}}
{{< tab name="YAML" >}}
```yaml
hello: world
```
{{< /tab >}}
{{< tab name="TOML" >}}
```toml
hello = "world"
```
{{< /tab >}}
{{< /tabs >}}
### Sync Tabs
Tabs with the same list of `items` can be synchronized. When enabled, selecting a tab updates all other tabs with the same `items` and remembers the selection across pages.
Enable/disable globally in your `hugo.yaml` under the `page` section:
```yaml {filename="hugo.yaml"}
params:
page:
tabs:
sync: true
```
Enable/disable per page inside the front matter:
```yaml {filename="my_page.md"}
---
title: My page
params:
tabs:
sync: true
---
Example content.
```
With this enabled, the following two tab blocks will always display the same selected item:
```markdown
{{</* tabs */>}}
{{</* tab name="A" */>}}A content{{</* /tab */>}}
{{</* tab name="B" */>}}B content{{</* /tab */>}}
{{</* /tabs */>}}
{{</* tabs */>}}
{{</* tab name="A" */>}}Second A content{{</* /tab */>}}
{{</* tab name="B" */>}}Second B content{{</* /tab */>}}
{{</* /tabs */>}}
```
@@ -0,0 +1,149 @@
---
title: 标签页
next: /docs/guide/deploy-site
---
## 示例
{{< tabs >}}
{{< tab name="macOS" >}}**macOS**: 苹果公司开发的桌面操作系统。{{< /tab >}}
{{< tab name="Linux" >}}**Linux**: 一款开源操作系统。{{< /tab >}}
{{< tab name="Windows" >}}**Windows**: 微软公司开发的桌面操作系统。{{< /tab >}}
{{< /tabs >}}
## 使用方法
### 默认
```
{{</* tabs */>}}
{{</* tab name="JSON" */>}}**JSON**: JavaScript对象表示法(JSON)是一种基于JavaScript对象语法的标准文本格式,用于表示结构化数据。{{</* /tab */>}}
{{</* tab name="YAML" */>}}**YAML**: YAML是一种人类可读的数据序列化语言。{{</* /tab */>}}
{{</* tab name="TOML" */>}}**TOML**: TOML旨在成为一种易于阅读的最小化配置文件格式,因其明显的语义而易于理解。{{</* /tab */>}}
{{</* /tabs */>}}
```
### 指定默认选中项
使用 `selected` 属性指定默认选中的标签页。
```
{{</* tabs */>}}
{{</* tab name="JSON" */>}}**JSON**: JavaScript对象表示法(JSON)是一种基于JavaScript对象语法的标准文本格式,用于表示结构化数据。{{</* /tab */>}}
{{</* tab name="YAML" selected=true */>}}**YAML**: YAML是一种人类可读的数据序列化语言。{{</* /tab */>}}
{{</* tab name="TOML" */>}}**TOML**: TOML旨在成为一种易于阅读的最小化配置文件格式,因其明显的语义而易于理解。{{</* /tab */>}}
{{</* /tabs */>}}
```
默认会选中 `YAML` 标签页。
{{< tabs >}}
{{< tab name="JSON" >}}**JSON**: JavaScript对象表示法(JSON)是一种基于JavaScript对象语法的标准文本格式,用于表示结构化数据。{{< /tab >}}
{{< tab name="YAML" selected=true >}}**YAML**: YAML是一种人类可读的数据序列化语言。{{< /tab >}}
{{< tab name="TOML" >}}**TOML**: TOML旨在成为一种易于阅读的最小化配置文件格式,因其明显的语义而易于理解。{{< /tab >}}
{{< /tabs >}}
### 添加图标
在每个 `tab` 上使用 `icon` 参数,可以在标签文本前显示图标。
可用图标列表请参阅 [Icon 短代码](../icon) 页面。
```
{{</* tabs */>}}
{{</* tab name="Photos" icon="photograph" */>}}管理和整理您的照片库。{{</* /tab */>}}
{{</* tab name="Music" icon="music-note" */>}}浏览和播放您喜爱的曲目。{{</* /tab */>}}
{{</* tab name="Videos" icon="film" */>}}观看和串流视频内容。{{</* /tab */>}}
{{</* /tabs */>}}
```
{{< tabs >}}
{{< tab name="Photos" icon="photograph" >}}管理和整理您的照片库。{{< /tab >}}
{{< tab name="Music" icon="music-note" >}}浏览和播放您喜爱的曲目。{{< /tab >}}
{{< tab name="Videos" icon="film" >}}观看和串流视频内容。{{< /tab >}}
{{< /tabs >}}
### 使用Markdown
支持包括代码块在内的Markdown语法:
````
{{</* tabs */>}}
{{</* tab name="JSON" */>}}
```json
{ "hello": "world" }
```
{{</* /tab */>}}
... 其他标签页类似添加
{{</* /tabs */>}}
````
{{< tabs >}}
{{< tab name="JSON" >}}
```json
{ "hello": "world" }
```
{{< /tab >}}
{{< tab name="YAML" >}}
```yaml
hello: world
```
{{< /tab >}}
{{< tab name="TOML" >}}
```toml
hello = "world"
```
{{< /tab >}}
{{< /tabs >}}
### 同步标签页
具有相同 `name` 列表的标签页可以同步。启用后,选择一个标签页会更新所有具有相同 `name` 的其他标签页,并在页面间记住选择。
在 `hugo.yaml` 的 `page` 部分全局启用:
```yaml {filename="hugo.yaml"}
params:
page:
tabs:
sync: true
```
启用后,以下两个标签页块将始终显示相同的选中项:
```markdown
{{</* tabs */>}}
{{</* tab name="A" */>}}A内容{{</* /tab */>}}
{{</* tab name="B" */>}}B内容{{</* /tab */>}}
{{</* /tabs */>}}
{{</* tabs */>}}
{{</* tab name="A" */>}}第二个A内容{{</* /tab */>}}
{{</* tab name="B" */>}}第二个B内容{{</* /tab */>}}
{{</* /tabs */>}}
```
@@ -0,0 +1,28 @@
---
title: اصطلاح
next: /docs/guide/deploy-site
---
یک مؤلفهٔ داخلی برای نمایش تعریف اصطلاحات.
تعاریف اصطلاحات در یک [فایل دادهٔ YAML](/docs/advanced/additional-pages/#glossary) ساختاریافته نگهداری می‌شوند،
و برای هر زبان پشتیبانی‌شده یک فایل جداگانه تعریف می‌گردد.
## مثال
* {{< term "سازندهٔ سایت ایستا" >}}
* {{< term "SEO" >}}
## نحوهٔ استفاده
```
{{</* term "SEO" */>}}
```
اگر اصطلاحی در واژه‌نامه یافت نشود، همان‌طور که وارد شده نمایش داده می‌شود.
## گزینه‌ها
| نام | توضیح |
|---------------|----------------------------|
| `entry` | اصطلاح واژه‌نامه |
@@ -0,0 +1,28 @@
---
title: 用語
next: /docs/guide/deploy-site
---
用語の定義を表示するための組み込みコンポーネントです。
用語の定義は、構造化された YAML [データファイル](/docs/advanced/additional-pages/#glossary)で管理されており、
対応する言語ごとに1つのファイルが定義されています。
## 例
* {{< term "静的サイトジェネレーター" >}}
* {{< term "SEO" >}}
## 使用方法
```
{{</* term "SEO" */>}}
```
用語が用語集に存在しない場合は、そのまま表示されます。
## オプション
| 名前 | 説明 |
|--------------|--------------------------|
| `entry` | 用語名 |
@@ -0,0 +1,29 @@
---
title: Term
next: /docs/guide/deploy-site
---
A built-in component to display a terminology definition.
Glossary definition is maintained in a structured YAML [data file](/docs/advanced/additional-pages/#glossary),
with one file defined per supported language.
## Example
* {{< term "static site generator" >}}
* {{< term "SEO" >}}
## Usage
```
{{</* term "SEO" */>}}
```
If a term is not found in the glossary, it is returned as-is.
## Options
| Name | Description |
|--------------|-----------------------------|
| `entry` | Glossary term |
@@ -0,0 +1,28 @@
---
title: 术语
next: /docs/guide/deploy-site
---
一个用于显示术语定义的内置组件。
术语定义保存在结构化的 YAML [数据文件](/docs/advanced/additional-pages/#glossary)中,
每种支持的语言对应一个文件。
## 示例
* {{< term "静态网站生成器" >}}
* {{< term "SEO" >}}
## 用法
```
{{</* term "SEO" */>}}
```
如果术语在词汇表中未找到,则会原样返回该术语。
## 选项
| 名称 | 描述 |
|--------------|------------------|
| `entry` | 术语名称 |