Docusaurus 3.4
· 阅读需 4 分钟
We are happy to announce Docusaurus 3.4.
Upgrading should be easy. Our release process respects Semantic Versioning. Minor versions do not include any breaking changes.
精彩内容
Tags files
The docs and blog plugins both already supported a tags
front matter attribute, enabling you to group related content. But tags declared inline in the front matter are not always ideal.
With #10137, you can now declare a list of pre-defined tags in a tags.yml
file:
blog/tags.yml
tag1:
label: 'Tag 1'
description: 'Tag 1 description'
permalink: /tag-1-permalink
tag2:
label: 'Tag 2'
description: 'Tag 2 description'
permalink: /tag-2-permalink
These predefined tags can be used in the front matter of your blog or docs files:
blog/2024-05-31-my-blog-post.md
---
tags: [tag1, tag2]
---
# Title
Content
Keeping tags usage consistent
Use the new onInlineTags: 'throw'
plugin option to enforce the usage of predefined tags and prevent contributors from creating new unwanted tags.