Skip to content

Commit ec9fdde

Browse files
authoredDec 9, 2024··
fix: correct getByNames method examples for category and tag api (#483)
修复 categoryFinder 和 tagFinder 关于 getByNames 的错误示例。 Fixes #475 ```release-note None ```
1 parent ccde5aa commit ec9fdde

File tree

18 files changed

+50
-18
lines changed

18 files changed

+50
-18
lines changed
 

‎docs/developer-guide/theme/finder-apis/category.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import CategoryTreeVo from "../vo/_CategoryTreeVo.md"
1212
categoryFinder.getByName(name)
1313
```
1414

15+
:::info 提示
16+
通常建议配合 [主题设置](../settings.md)[分类选择器](../../form-schema.md#categoryselect) 使用,让用户自行选择所需的分类。
17+
:::
18+
1519
### 描述
1620

1721
根据 `metadata.name` 获取文章分类。
@@ -38,6 +42,10 @@ categoryFinder.getByName(name)
3842
categoryFinder.getByNames(names)
3943
```
4044

45+
:::info 提示
46+
通常建议配合 [主题设置](../settings.md)[分类选择器](../../form-schema.md#categoryselect) 使用,让用户自行选择所需的分类。
47+
:::
48+
4149
### 描述
4250

4351
根据一组 `metadata.name` 获取文章分类。
@@ -53,7 +61,7 @@ List\<[#CategoryVo](#categoryvo)\>
5361
### 示例
5462

5563
```html
56-
<div th:with="categories = ${categoryFinder.getByNames(['category-foo', 'category-bar'])}">
64+
<div th:with="categories = ${categoryFinder.getByNames({'category-foo', 'category-bar'})}">
5765
<a th:each="category : ${categories}" th:href="@{${category.status.permalink}}" th:text="${category.spec.displayName}"></a>
5866
</div>
5967
```

‎docs/developer-guide/theme/finder-apis/contributor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#ContributorVo](#contributorvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="contributors = ${contributorFinder.getContributors(['contributor-foo, 'contributor-bar'])}">
55+
<div th:with="contributors = ${contributorFinder.getContributors({'contributor-foo, 'contributor-bar'})}">
5656
<span th:each="contributor : ${contributors}" th:text="${contributor.displayName}"></span>
5757
</div>
5858
```

‎docs/developer-guide/theme/finder-apis/tag.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import TagVo from "../vo/_TagVo.md"
1111
tagFinder.getByName(name)
1212
```
1313

14+
:::info 提示
15+
通常建议配合 [主题设置](../settings.md)[标签选择器](../../form-schema.md#tagselect) 使用,让用户自行选择所需的标签。
16+
:::
17+
1418
### 描述
1519

1620
根据 `metadata.name` 获取标签。
@@ -37,6 +41,10 @@ tagFinder.getByName(name)
3741
tagFinder.getByNames(names)
3842
```
3943

44+
:::info 提示
45+
通常建议配合 [主题设置](../settings.md)[标签选择器](../../form-schema.md#tagselect) 使用,让用户自行选择所需的标签。
46+
:::
47+
4048
### 描述
4149

4250
根据一组 `metadata.name` 获取标签。
@@ -52,7 +60,7 @@ List\<[#TagVo](#tagvo)\>
5260
### 示例
5361

5462
```html
55-
<div th:with="tags = ${tagFinder.getByNames(['tag-foo', 'tag-bar'])}">
63+
<div th:with="tags = ${tagFinder.getByNames({'tag-foo', 'tag-bar'})}">
5664
<a th:each="tag : ${tags}" th:href="@{${tag.status.permalink}}" th:text="${tag.spec.displayName}"></a>
5765
</div>
5866
```

‎versioned_docs/version-2.16/developer-guide/theme/finder-apis/category.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ List\<[#CategoryVo](#categoryvo)\>
5353
### 示例
5454

5555
```html
56-
<div th:with="categories = ${categoryFinder.getByNames(['category-foo', 'category-bar'])}">
56+
<div th:with="categories = ${categoryFinder.getByNames({'category-foo', 'category-bar'})}">
5757
<a th:each="category : ${categories}" th:href="@{${category.status.permalink}}" th:text="${category.spec.displayName}"></a>
5858
</div>
5959
```

‎versioned_docs/version-2.16/developer-guide/theme/finder-apis/contributor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#ContributorVo](#contributorvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="contributors = ${contributorFinder.getContributors(['contributor-foo, 'contributor-bar'])}">
55+
<div th:with="contributors = ${contributorFinder.getContributors({'contributor-foo, 'contributor-bar'})}">
5656
<span th:each="contributor : ${contributors}" th:text="${contributor.displayName}"></span>
5757
</div>
5858
```

‎versioned_docs/version-2.16/developer-guide/theme/finder-apis/tag.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#TagVo](#tagvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="tags = ${tagFinder.getByNames(['tag-foo', 'tag-bar'])}">
55+
<div th:with="tags = ${tagFinder.getByNames({'tag-foo', 'tag-bar'})}">
5656
<a th:each="tag : ${tags}" th:href="@{${tag.status.permalink}}" th:text="${tag.spec.displayName}"></a>
5757
</div>
5858
```

‎versioned_docs/version-2.17/developer-guide/theme/finder-apis/category.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ List\<[#CategoryVo](#categoryvo)\>
5353
### 示例
5454

5555
```html
56-
<div th:with="categories = ${categoryFinder.getByNames(['category-foo', 'category-bar'])}">
56+
<div th:with="categories = ${categoryFinder.getByNames({'category-foo', 'category-bar'})}">
5757
<a th:each="category : ${categories}" th:href="@{${category.status.permalink}}" th:text="${category.spec.displayName}"></a>
5858
</div>
5959
```

‎versioned_docs/version-2.17/developer-guide/theme/finder-apis/contributor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#ContributorVo](#contributorvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="contributors = ${contributorFinder.getContributors(['contributor-foo, 'contributor-bar'])}">
55+
<div th:with="contributors = ${contributorFinder.getContributors({'contributor-foo, 'contributor-bar'})}">
5656
<span th:each="contributor : ${contributors}" th:text="${contributor.displayName}"></span>
5757
</div>
5858
```

‎versioned_docs/version-2.17/developer-guide/theme/finder-apis/tag.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#TagVo](#tagvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="tags = ${tagFinder.getByNames(['tag-foo', 'tag-bar'])}">
55+
<div th:with="tags = ${tagFinder.getByNames({'tag-foo', 'tag-bar'})}">
5656
<a th:each="tag : ${tags}" th:href="@{${tag.status.permalink}}" th:text="${tag.spec.displayName}"></a>
5757
</div>
5858
```

‎versioned_docs/version-2.18/developer-guide/theme/finder-apis/category.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ List\<[#CategoryVo](#categoryvo)\>
5353
### 示例
5454

5555
```html
56-
<div th:with="categories = ${categoryFinder.getByNames(['category-foo', 'category-bar'])}">
56+
<div th:with="categories = ${categoryFinder.getByNames({'category-foo', 'category-bar'})}">
5757
<a th:each="category : ${categories}" th:href="@{${category.status.permalink}}" th:text="${category.spec.displayName}"></a>
5858
</div>
5959
```

‎versioned_docs/version-2.18/developer-guide/theme/finder-apis/contributor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#ContributorVo](#contributorvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="contributors = ${contributorFinder.getContributors(['contributor-foo, 'contributor-bar'])}">
55+
<div th:with="contributors = ${contributorFinder.getContributors({'contributor-foo, 'contributor-bar'})}">
5656
<span th:each="contributor : ${contributors}" th:text="${contributor.displayName}"></span>
5757
</div>
5858
```

‎versioned_docs/version-2.18/developer-guide/theme/finder-apis/tag.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#TagVo](#tagvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="tags = ${tagFinder.getByNames(['tag-foo', 'tag-bar'])}">
55+
<div th:with="tags = ${tagFinder.getByNames({'tag-foo', 'tag-bar'})}">
5656
<a th:each="tag : ${tags}" th:href="@{${tag.status.permalink}}" th:text="${tag.spec.displayName}"></a>
5757
</div>
5858
```

‎versioned_docs/version-2.19/developer-guide/theme/finder-apis/category.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ List\<[#CategoryVo](#categoryvo)\>
5353
### 示例
5454

5555
```html
56-
<div th:with="categories = ${categoryFinder.getByNames(['category-foo', 'category-bar'])}">
56+
<div th:with="categories = ${categoryFinder.getByNames({'category-foo', 'category-bar'})}">
5757
<a th:each="category : ${categories}" th:href="@{${category.status.permalink}}" th:text="${category.spec.displayName}"></a>
5858
</div>
5959
```

‎versioned_docs/version-2.19/developer-guide/theme/finder-apis/contributor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#ContributorVo](#contributorvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="contributors = ${contributorFinder.getContributors(['contributor-foo, 'contributor-bar'])}">
55+
<div th:with="contributors = ${contributorFinder.getContributors({'contributor-foo, 'contributor-bar'})}">
5656
<span th:each="contributor : ${contributors}" th:text="${contributor.displayName}"></span>
5757
</div>
5858
```

‎versioned_docs/version-2.19/developer-guide/theme/finder-apis/tag.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#TagVo](#tagvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="tags = ${tagFinder.getByNames(['tag-foo', 'tag-bar'])}">
55+
<div th:with="tags = ${tagFinder.getByNames({'tag-foo', 'tag-bar'})}">
5656
<a th:each="tag : ${tags}" th:href="@{${tag.status.permalink}}" th:text="${tag.spec.displayName}"></a>
5757
</div>
5858
```

‎versioned_docs/version-2.20/developer-guide/theme/finder-apis/category.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import CategoryTreeVo from "../vo/_CategoryTreeVo.md"
1212
categoryFinder.getByName(name)
1313
```
1414

15+
:::info 提示
16+
通常建议配合 [主题设置](../settings.md)[分类选择器](../../form-schema.md#categoryselect) 使用,让用户自行选择所需的分类。
17+
:::
18+
1519
### 描述
1620

1721
根据 `metadata.name` 获取文章分类。
@@ -38,6 +42,10 @@ categoryFinder.getByName(name)
3842
categoryFinder.getByNames(names)
3943
```
4044

45+
:::info 提示
46+
通常建议配合 [主题设置](../settings.md)[分类选择器](../../form-schema.md#categoryselect) 使用,让用户自行选择所需的分类。
47+
:::
48+
4149
### 描述
4250

4351
根据一组 `metadata.name` 获取文章分类。
@@ -53,7 +61,7 @@ List\<[#CategoryVo](#categoryvo)\>
5361
### 示例
5462

5563
```html
56-
<div th:with="categories = ${categoryFinder.getByNames(['category-foo', 'category-bar'])}">
64+
<div th:with="categories = ${categoryFinder.getByNames({'category-foo', 'category-bar'})}">
5765
<a th:each="category : ${categories}" th:href="@{${category.status.permalink}}" th:text="${category.spec.displayName}"></a>
5866
</div>
5967
```

‎versioned_docs/version-2.20/developer-guide/theme/finder-apis/contributor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ List\<[#ContributorVo](#contributorvo)\>
5252
### 示例
5353

5454
```html
55-
<div th:with="contributors = ${contributorFinder.getContributors(['contributor-foo, 'contributor-bar'])}">
55+
<div th:with="contributors = ${contributorFinder.getContributors({'contributor-foo, 'contributor-bar'})}">
5656
<span th:each="contributor : ${contributors}" th:text="${contributor.displayName}"></span>
5757
</div>
5858
```

‎versioned_docs/version-2.20/developer-guide/theme/finder-apis/tag.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import TagVo from "../vo/_TagVo.md"
1111
tagFinder.getByName(name)
1212
```
1313

14+
:::info 提示
15+
通常建议配合 [主题设置](../settings.md)[标签选择器](../../form-schema.md#tagselect) 使用,让用户自行选择所需的标签。
16+
:::
17+
1418
### 描述
1519

1620
根据 `metadata.name` 获取标签。
@@ -37,6 +41,10 @@ tagFinder.getByName(name)
3741
tagFinder.getByNames(names)
3842
```
3943

44+
:::info 提示
45+
通常建议配合 [主题设置](../settings.md)[标签选择器](../../form-schema.md#tagselect) 使用,让用户自行选择所需的标签。
46+
:::
47+
4048
### 描述
4149

4250
根据一组 `metadata.name` 获取标签。
@@ -52,7 +60,7 @@ List\<[#TagVo](#tagvo)\>
5260
### 示例
5361

5462
```html
55-
<div th:with="tags = ${tagFinder.getByNames(['tag-foo', 'tag-bar'])}">
63+
<div th:with="tags = ${tagFinder.getByNames({'tag-foo', 'tag-bar'})}">
5664
<a th:each="tag : ${tags}" th:href="@{${tag.status.permalink}}" th:text="${tag.spec.displayName}"></a>
5765
</div>
5866
```

0 commit comments

Comments
 (0)
Please sign in to comment.