MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getDocsByCategory

Function getDocsByCategory

web/src/lib/docs.ts:6–12  ·  view source on GitHub ↗
(category: string)

Source from the content-addressed store, hash-verified

4import { allDocs } from '.contentlayer/generated'
5
6export function getDocsByCategory(category: string) {
7 if (!allDocs) return []
8 return (allDocs as Doc[])
9 .filter((doc: Doc) => doc.category === category)
10 .filter((doc: Doc) => !doc.slug.startsWith('_'))
11 .sort((a: Doc, b: Doc) => (a.order ?? 0) - (b.order ?? 0))
12}
13
14export interface NewsArticle {
15 title: string

Callers 3

doc-sidebar.tsxFile · 0.90
CategoryPageFunction · 0.90
DocPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected