(category: string)
| 4 | import { allDocs } from '.contentlayer/generated' |
| 5 | |
| 6 | export 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 | |
| 14 | export interface NewsArticle { |
| 15 | title: string |
no outgoing calls
no test coverage detected