mirror of
https://github.com/imfing/hextra.git
synced 2025-08-23 20:36:37 -04:00
docs(blog): prepare for v0.10 release post (#746)
* docs(blog): prepare for v0.10 release post * Update v0.10.md * Update v0.10.md to refine upgrade instructions and enhance blog features. Added synchronized tab switching and pagination controls, while improving the search experience and table of contents navigation. * Enhance v0.10 release documentation with detailed upgrade instructions and migration guide. Added Tailwind theme variable customization section and clarified breaking changes. Improved clarity on CSS class prefix changes for better user experience. * Update v0.10.md to enhance upgrade instructions, clarify breaking changes, and improve overall readability. Adjusted formatting for consistency and added details on asset management and user experience improvements. * Add notable new features to v0.10.md, including dropdown menu support, enhanced search experience, and blog list pagination. Updated FlexSearch upgrade details for clarity and improved migration guide by removing redundant breaking change notes. * chore: update zh-cn translation * chore: update ja translation * chore: update fa and ja translations * chore: prepare release
This commit is contained in:
@@ -14,10 +14,10 @@ linkTitle: 卡片
|
||||
{{< 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" >}}
|
||||
{{< card link="/" title="本地图片" image="images/space.jpg" subtitle="资源目录下的图片,经过Hugo处理。" method="Resize" options="600x q80 webp" >}}
|
||||
{{< /cards >}}
|
||||
|
||||
## 用法
|
||||
## 使用方法
|
||||
|
||||
```
|
||||
{{</* cards */>}}
|
||||
@@ -29,9 +29,9 @@ linkTitle: 卡片
|
||||
|
||||
```
|
||||
{{</* cards */>}}
|
||||
{{</* card link="/" title="图片卡片" image="https://source.unsplash.com/featured/800x600?landscape" subtitle="Unsplash 风景" */>}}
|
||||
{{</* 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" */>}}
|
||||
{{</* card link="/" title="本地图片" image="images/space.jpg" subtitle="资源目录下的图片,经过Hugo处理。" method="Resize" options="600x q80 webp" */>}}
|
||||
{{</* /cards */>}}
|
||||
```
|
||||
|
||||
@@ -39,37 +39,37 @@ linkTitle: 卡片
|
||||
|
||||
| 参数 | 描述 |
|
||||
|----------- |-----------------------------------------------------------------|
|
||||
| `link` | URL(内部或外部)。 |
|
||||
| `title` | 卡片的标题。 |
|
||||
| `subtitle` | 卡片的副标题(支持 Markdown)。 |
|
||||
| `icon` | 图标的名称。 |
|
||||
| `tag` | 标签中的文本。 |
|
||||
| `tagColor` | 标签的颜色:`gray`(默认)、`yellow`、`red` 和 `blue`。 |
|
||||
| `link` | 链接地址(内部或外部)。 |
|
||||
| `title` | 卡片的标题。 |
|
||||
| `subtitle` | 卡片的副标题(支持Markdown)。 |
|
||||
| `icon` | 图标名称。 |
|
||||
| `tag` | 标签文本。 |
|
||||
| `tagColor` | 标签颜色:`gray`(默认)、`yellow`、`red` 和 `blue`。 |
|
||||
|
||||
## 图片卡片
|
||||
|
||||
此外,卡片支持通过以下参数添加图片并进行处理:
|
||||
此外,卡片还支持通过以下参数添加图片并进行处理:
|
||||
|
||||
| 参数 | 描述 |
|
||||
|-----------|--------------------------------------|
|
||||
| `image` | 指定卡片的图片 URL。 |
|
||||
| `method` | 设置 Hugo 的图片处理方法。 |
|
||||
| `options` | 配置 Hugo 的图片处理选项。 |
|
||||
| 参数 | 描述 |
|
||||
|----------- |---------------------------------------------|
|
||||
| `image` | 指定卡片的图片URL。 |
|
||||
| `method` | 设置Hugo的图片处理方法。 |
|
||||
| `options` | 配置Hugo的图片处理选项。 |
|
||||
|
||||
卡片支持三种类型的图片:
|
||||
|
||||
1. 远程图片:`image` 参数中的完整 URL。
|
||||
2. 静态图片:使用 Hugo `static/` 目录中的相对路径。
|
||||
3. 处理后的图片:使用 Hugo `assets/` 目录中的相对路径。
|
||||
1. 远程图片:在`image`参数中填写完整的URL。
|
||||
2. 静态图片:使用Hugo的`static/`目录下的相对路径。
|
||||
3. 处理后的图片:使用Hugo的`assets/`目录下的相对路径。
|
||||
|
||||
Hextra 在构建时自动检测是否需要图片处理,并应用 `options` 参数或默认设置(Resize,800x,质量 80,WebP 格式)。
|
||||
目前支持以下 `method`:`Resize`、`Fit`、`Fill` 和 `Crop`。
|
||||
Hextra在构建时会自动检测是否需要图片处理,并应用`options`参数或默认设置(Resize,800x,质量80,WebP格式)。
|
||||
目前支持的`method`有:`Resize`、`Fit`、`Fill`和`Crop`。
|
||||
|
||||
有关 Hugo 内置图片处理命令、方法和选项的更多信息,请参阅其[图片处理文档](https://gohugo.io/content-management/image-processing/)。
|
||||
有关Hugo内置图片处理命令、方法和选项的更多信息,请参阅其[图片处理文档](https://gohugo.io/content-management/image-processing/)。
|
||||
|
||||
## 标签
|
||||
|
||||
卡片支持添加标签,这对于显示额外的状态信息非常有用。
|
||||
卡片支持添加标签,可用于显示额外的状态信息。
|
||||
|
||||
{{< cards >}}
|
||||
{{< card link="../callout" title="带默认标签的卡片" tag="标签文本" >}}
|
||||
@@ -90,7 +90,7 @@ Hextra 在构建时自动检测是否需要图片处理,并应用 `options`
|
||||
|
||||
## 列数
|
||||
|
||||
您可以通过将 `cols` 参数传递给 `cards` 短代码来指定卡片的最大列数。请注意,在较小的屏幕上,列仍会折叠。
|
||||
可以通过向`cards`短代码传递`cols`参数来指定卡片的最大列数。请注意,在小屏幕上列数仍会折叠。
|
||||
|
||||
{{< cards cols="1" >}}
|
||||
{{< card link="/" title="顶部卡片" >}}
|
||||
|
Reference in New Issue
Block a user