feat(docs): add static generation and search indexes

This commit is contained in:
Maofeng
2026-09-20 16:23:32 +08:00
parent a57fdbe7c6
commit 9635de56e8
19 changed files with 529 additions and 169 deletions
+21
View File
@@ -0,0 +1,21 @@
import { createContext, useContext, type ReactNode } from "react"
const PathnameContext = createContext("/")
export function PathnameProvider({
children,
pathname,
}: {
children: ReactNode
pathname: string
}) {
return (
<PathnameContext.Provider value={pathname}>
{children}
</PathnameContext.Provider>
)
}
export function usePathname() {
return useContext(PathnameContext)
}