MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / getLearnBySlug

Function getLearnBySlug

apps/baseai.dev/src/lib/get-learn-by-slug.ts:3–18  ·  view source on GitHub ↗
({
	slug,
	section
}: {
	slug: string;
	section?: string;
})

Source from the content-addressed store, hash-verified

1import learnContent from '../../content/learn/learn.json';
2
3export async function getLearnBySlug({
4 slug,
5 section
6}: {
7 slug: string;
8 section?: string;
9}) {
10 const docContent = learnContent.find(
11 doc => doc.slug === slug && doc.section === section
12 );
13
14 return {
15 content: docContent?.content,
16 frontmatter: docContent?.frontmatter
17 };
18}

Callers 4

LearnPageFunction · 0.90
generateMetadataFunction · 0.90
generateMetadataFunction · 0.90
generateMetadataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected