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.

This commit is contained in:
Xin
2025-08-14 09:32:58 +08:00
parent cc6d7e6e94
commit d6dd2550b1

View File

@@ -14,7 +14,7 @@ Hextra v0.10.0 is a big release packed with new capabilities, architectural upgr
<!--more-->
It also includes contributions from 10 [new contributors](#contributors) and addresses many long-standing requests. To upgrade to v0.10.0, update the Hugo module:
It also includes contributions from 10 [new contributors](#contributors) and addresses some long-standing requests. To upgrade to v0.10.0, update the Hugo module:
```bash
hugo mod get -u github.com/imfing/hextra@v0.10.0
@@ -44,30 +44,6 @@ menu:
![Dropdown menu navigation](https://github.com/user-attachments/assets/1816f9b9-7fe3-46e8-9546-f15e43e9914a)
### Synchronized Tab Switching
Tabs with the same items now synchronize across the page. When sync is enabled, selecting a tab updates all tab groups that share the same items list (and your selection is remembered).
```yaml {filename="hugo.yaml"}
params:
page:
tabs:
sync: true
```
### Blog List Pagination
Pagination controls have been added to blog listing pages.
```yaml {filename="hugo.yaml"}
params:
blog:
list:
pagerSize: 20 # Posts per page
```
![Blog pagination](https://github.com/user-attachments/assets/60405fb4-ec36-4733-ba13-b4066396b5c5)
### Enhanced Search Experience
- **Search in all headings**: Find content across all heading levels, not just page titles
@@ -89,12 +65,38 @@ outputs:
This will generate an `llms.txt` file at your site's root.
![Example llms txt](https://github.com/user-attachments/assets/c6e929bb-0fce-4ab2-af15-a71c5a38b22c)
### Table of Contents Scroll Highlighting
The table of contents now automatically highlights the current section as you scroll through the page, making navigation more intuitive.
![ToC scroll highlighting](https://github.com/user-attachments/assets/d623fb99-7000-428b-af95-384eb722f0eb)
### Synchronized Tab Switching
Tabs with the same items now synchronize across the page. When sync is enabled, selecting a tab updates all tab groups that share the same items list (and your selection is remembered).
```yaml {filename="hugo.yaml"}
params:
page:
tabs:
sync: true
```
### Blog List Pagination
Basic pagination controls have been added to blog listing pages.
```yaml {filename="hugo.yaml"}
params:
blog:
list:
pagerSize: 20 # Posts per page
```
![Blog pagination](https://github.com/user-attachments/assets/60405fb4-ec36-4733-ba13-b4066396b5c5)
### MathJax Support
Render mathematical expressions with [MathJax](https://www.mathjax.org/) alongside the default KaTeX support. Choose the engine that best fits your needs.