-
I tried the following: codeexport async function GET(req: NextRequest) {
const session = await getAuthSession();
const pages = session
? source.getPages()
: source.getPages().filter((page) => publicContentPaths.includes(page.url));
const searchAPI = createSearchAPI('advanced', {
indexes: pages.map((page) => ({
id: page.url,
title: page.data.title,
description: page.data.description,
structuredData: page.data.structuredData,
tag: page.data.tag,
url: page.url,
})),
// tag: true,
});
return searchAPI.GET(req);
} After consulting the docs here: What am I missing? Thanks! Current versions:
|
Beta Was this translation helpful? Give feedback.
Answered by
fuma-nama
Sep 6, 2024
Replies: 1 comment 11 replies
-
the |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just choose the way you want,
page
has its file path and frontmatter data.to extend the frontmatter, see
schema