Files
hextra_mirror/exampleSite/content/blog/v0.11.zh-cn.md
Xin 6d0e59b16f chore: release blog for Hextra v0.11 (#806)
* feat: release Hextra v0.11 with new features and improvements

- Updated banner key to 'announcement-v0.11' with a new message.
- Added new padding option 'hx:px-8' in hugo_stats.json.
- Introduced new blog post for Hextra v0.11 detailing UX enhancements, new components, and stability fixes.
- Added translations for the new blog post in French, Japanese, and Simplified Chinese.
- Updated getting started documentation to include instructions for using the development branch.
- Removed outdated banner HTML for v0.10.

* feat: update language banners for Hextra v0.11 release

- Added localized banner messages for Persian, Japanese, and Simplified Chinese.
- Updated the main announcement message format in the configuration file.

* Update exampleSite/content/blog/v0.11.md

Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>

* Update exampleSite/content/blog/v0.11.md

Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>

* Update blog post for Hextra v0.11 release

- Refined upgrade guide and removed unnecessary breaking change note.
- Enhanced descriptions for new features including the top banner, callouts, and analytics configuration.
- Improved clarity in code examples and added links to documentation for new components.
- Updated navbar enhancements and breadcrumbs enablement instructions.
- Fixed formatting inconsistencies and improved overall readability.

* Add blog post for Hextra v0.11 in Persian, Japanese, and Simplified Chinese

- Introduced new features including a site-wide top banner, redesigned callouts, and analytics support for Umami and Matomo.
- Enhanced navigation with icon support and improved layout.
- Added Asciinema shortcode for terminal recordings and external link decoration options.
- Updated upgrade guide and documentation for new components.
- Included stability fixes and quality of life improvements.

---------

Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
2025-08-30 13:48:04 +01:00

130 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Hextra v0.11"
date: 2025-08-30
authors:
- name: imfing
link: https://github.com/imfing
image: https://github.com/imfing.png
tags:
- Release
---
Hextra v0.11.0 专注于打磨使用体验并带来数个实用新组件:站点级顶部横幅、改进的提示框与徽章、更丰富的卡片、分析工具集成,以及多项导航优化。同时包含稳定性修复和文档更新。
<!--more-->
## 升级指南
对大多数站点而言没有破坏性变更。使用 [Hugo Modules](https://gohugo.io/hugo-modules/use-modules/) 更新:
```bash
hugo mod get -u github.com/imfing/hextra
```
## 亮点
- 用于公告的顶栏横幅组件
- 重新设计的提示框,样式更清晰
- 支持 Umami 与 Matomo 分析
- Asciinema 短代码用于终端录屏
- 外链装饰选项
- 单页(非文档、非博客)支持面包屑
- 导航栏增强:图标链接项与更优布局
- 徽章与卡片的自定义能力提升
- 主题切换增加「System」选项
## 新功能
### 顶部横幅
为公告、发布或状态消息添加一个站点级、可关闭的横幅。
```yaml {filename="hugo.yaml"}
params:
banner:
key: "announcement"
message: Welcome!
```
![顶部横幅](https://github.com/user-attachments/assets/33a08c9b-db84-4200-b37c-1a53c1bef08d)
### 提示框重设计
[Callout]({{% relref "docs/guide/shortcodes/callout" %}}) 获得样式刷新,在各主题下具备更好的可读性与强调效果。
![提示框刷新](https://github.com/user-attachments/assets/b3154dbb-e582-4c84-a8b8-1ecb02c3464d)
### 分析Umami 与 Matomo
内置以下分析平台的配置支持:
- [Umami]({{% relref "docs/guide/configuration.md#umami-analytics" %}})
- [Matomo]({{% relref "docs/guide/configuration.md#matomo-analytics" %}})
### Asciinema 短代码
使用全新的 [Asciinema 短代码]({{% relref "docs/guide/shortcodes/asciinema.md" %}}) 嵌入 [Asciinema](https://www.asciinema.org/) 终端录屏。
```md
{{</* asciinema id="123456" autoplay=true loop=true */>}}
```
![Asciinema](https://github.com/user-attachments/assets/3c33a8ef-3c01-4e30-9832-3ccb784ec538)
### 导航栏增强
- 支持在导航栏链接项中使用图标
- 优化菜单的相对位置,使其与语言切换器等项协同更佳
![带图标项的导航栏](https://github.com/user-attachments/assets/6c035eee-cd7d-44d8-bcf7-9cbd7f92ab42)
值得一提的是,版本 [0.10.2](https://github.com/imfing/hextra/releases/tag/v0.10.2) 已支持在导航栏添加语言切换器与主题切换。
### 外链装饰
可选地为外部链接添加轻量的外链标识装饰。
```yaml {filename="hugo.yaml"}
params:
externalLinkDecoration: true
```
### 启用面包屑
在单页(非文档、非博客)上,通过在 Front Matter 中设置 `breadcrumbs: true` 启用面包屑。
```yaml {filename="content/about.md"}
---
title: About
breadcrumbs: true
---
```
### 卡片与徽章的改进
- [卡片]({{% relref "docs/guide/shortcodes/cards.md" %}}):新增 `tagIcon` 与 `tagBorder` 选项。
- [徽章]({{% relref "docs/guide/shortcodes/others.md" %}}):新增颜色与边框样式。
## 使用体验优化
- 主题切换增加「System」选项
![主题切换](https://github.com/user-attachments/assets/54a1d315-9243-4814-9154-6e63af9ea2e8)
- 字体排版:改进带复选框的任务列表样式
![任务列表](https://github.com/user-attachments/assets/53722651-63b6-4469-95e7-326849a30306)
- 语言切换器:与图标菜单项的排序更合理
## 修复
- Giscus正确同步主题与语言
- 卡片:修复 RTL 场景下的徽章渲染
- 导航栏:优化菜单位置与交互
## 文档与 i18n
- 文档:新增页面介绍 Hextra 的短代码
- i18n为 `zh-cn` 增加 `copyCode` 与 `system` 翻译
---
**完整变更日志**: https://github.com/imfing/hextra/compare/v0.10.2...v0.11.0