feat(tags): improve usability of tags (#698)

* feat(tags): improve usability of tags

* Tags can be shown also at docs
* Documented tag-related config flags
* Added example tags to the site
* Made rendered tags active

* Move tags listing to ToC

* Hide tags section on no tags
This commit is contained in:
yuri
2025-06-13 23:09:05 +02:00
committed by GitHub
parent 32a55bb8ee
commit e22b8d5c0e
6 changed files with 40 additions and 7 deletions

View File

@@ -1,6 +1,9 @@
---
title: Getting Started
weight: 1
tags:
- Docs
- Guide
next: /docs/guide
prev: /docs
---

View File

@@ -1,6 +1,8 @@
---
title: Configuration
weight: 2
tags:
- Config
---
Hugo reads its configuration from `hugo.yaml` in the root of your Hugo site.
@@ -228,6 +230,19 @@ params:
dateFormat: "January 2, 2006"
```
### Tags
To display page tags, set following flags in the config file:
```yaml {filename="hugo.yaml"}
params:
blog:
list:
displayTags: true
toc:
displayTags: true
```
### Page Width
The width of the page can be customized by the `params.page.width` parameter in the config file: