mirror of
https://github.com/halo-dev/docs.git
synced 2026-01-21 02:12:47 +08:00
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:
@@ -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>
|
||||
```
|
||||
|
||||
@@ -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>
|
||||
```
|
||||
|
||||
@@ -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>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user