Tag filter of search #1227
-
From the docs: import { source } from "@/lib/source";
import { createFromSource } from "fumadocs-core/search/server";
export const { GET } = createFromSource(source, (page) => ({
title: page.data.title,
description: page.data.description,
url: page.url,
id: page.url,
structuredData: page.data.structuredData,
tag: "<value>"
}));
...
<RootProvider
search={{
options: {
defaultTag: "value",
tags: [
{
name: "name",
value: "value",
},
],
},
}}
>
{children}
</RootProvider> What should be the value of tag? Do we need to keep the arrows (<>)? What exactly is page? I want to filter by folders names, similar to how in the fumadocs site we can filter by framework, core etc. How would I do that? I can't wrap my head around the examples. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
EnhancedJax
Jan 5, 2025
Replies: 1 comment 7 replies
-
The value is exactly the value you provided for |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Figured it out. You need to use
page.file.dirname
. Page means a specific page in the docs.