Skip to content

Commit 0c97212

Browse files
committed
autocomplete author
1 parent f2e2abb commit 0c97212

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

_cms.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ cms.collection(
8888
[
8989
"title: text",
9090
url,
91-
"author: text",
91+
{
92+
name: "author",
93+
type: "text",
94+
init(field, { data }) {
95+
field.options = data.site?.search.values("author");
96+
},
97+
},
9298
"date: date",
9399
{
94100
name: "draft",

0 commit comments

Comments
 (0)