fix: correct getByNames method examples for category and tag api (#483)

修复 categoryFinder 和 tagFinder 关于 getByNames 的错误示例。

Fixes https://github.com/halo-dev/docs/issues/475

```release-note
None
```
This commit is contained in:
Ryan Wang
2024-12-09 19:21:34 +08:00
committed by GitHub
parent ccde5aaee3
commit ec9fdde451
18 changed files with 50 additions and 18 deletions

View File

@@ -53,7 +53,7 @@ List\<[#CategoryVo](#categoryvo)\>
### 示例
```html
<div th:with="categories = ${categoryFinder.getByNames(['category-foo', 'category-bar'])}">
<div th:with="categories = ${categoryFinder.getByNames({'category-foo', 'category-bar'})}">
<a th:each="category : ${categories}" th:href="@{${category.status.permalink}}" th:text="${category.spec.displayName}"></a>
</div>
```

View File

@@ -52,7 +52,7 @@ List\<[#ContributorVo](#contributorvo)\>
### 示例
```html
<div th:with="contributors = ${contributorFinder.getContributors(['contributor-foo, 'contributor-bar'])}">
<div th:with="contributors = ${contributorFinder.getContributors({'contributor-foo, 'contributor-bar'})}">
<span th:each="contributor : ${contributors}" th:text="${contributor.displayName}"></span>
</div>
```

View File

@@ -52,7 +52,7 @@ List\<[#TagVo](#tagvo)\>
### 示例
```html
<div th:with="tags = ${tagFinder.getByNames(['tag-foo', 'tag-bar'])}">
<div th:with="tags = ${tagFinder.getByNames({'tag-foo', 'tag-bar'})}">
<a th:each="tag : ${tags}" th:href="@{${tag.status.permalink}}" th:text="${tag.spec.displayName}"></a>
</div>
```