isValidGuideFrontmatter() — supabase Function Reference
Architecture documentation for the isValidGuideFrontmatter() function in docs.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 1ed78735_5e48_6f4d_c7c0_7d9f2c098ee4["isValidGuideFrontmatter()"] ab4f49e3_ca6f_6ee7_e6ce_c61c06858edc["getContent()"] ab4f49e3_ca6f_6ee7_e6ce_c61c06858edc -->|calls| 1ed78735_5e48_6f4d_c7c0_7d9f2c098ee4 89e492b5_c893_2698_ebc1_ef4cd99938d7["getContent()"] 89e492b5_c893_2698_ebc1_ef4cd99938d7 -->|calls| 1ed78735_5e48_6f4d_c7c0_7d9f2c098ee4 e3f6760d_3d29_5416_665c_9614b409ec69["getGuidesMarkdownInternal()"] e3f6760d_3d29_5416_665c_9614b409ec69 -->|calls| 1ed78735_5e48_6f4d_c7c0_7d9f2c098ee4 56466678_bf1f_b88a_2f2d_ad073243b70d["getGuidesStaticProps()"] 56466678_bf1f_b88a_2f2d_ad073243b70d -->|calls| 1ed78735_5e48_6f4d_c7c0_7d9f2c098ee4 style 1ed78735_5e48_6f4d_c7c0_7d9f2c098ee4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/lib/docs.ts lines 38–68
export function isValidGuideFrontmatter(obj: object): obj is GuideFrontmatter {
if (!('title' in obj) || typeof obj.title !== 'string') {
throw Error(
// @ts-expect-error - Getting undefined for unknown property is desired here.
`Invalid guide frontmatter: Title must exist and be a string. Received: ${obj.title}`
)
}
if ('subtitle' in obj && typeof obj.subtitle !== 'string') {
throw Error(`Invalid guide frontmatter: Subtitle must be a sring. Received: ${obj.subtitle}`)
}
if ('description' in obj && typeof obj.description !== 'string') {
throw Error(
`Invalid guide frontmatter: Description must be a string. Received: ${obj.description}`
)
}
if ('canonical' in obj && typeof obj.canonical !== 'string') {
throw Error(`Invalid guide frontmatter: Canonical must be a string. Received: ${obj.canonical}`)
}
if ('hideToc' in obj && typeof obj.hideToc !== 'boolean') {
throw Error(`Invalid guide frontmatter: hideToc must be a boolean. Received: ${obj.hideToc}`)
}
if ('hide_table_of_contents' in obj && typeof obj.hide_table_of_contents !== 'boolean') {
throw Error(
`Invalid guide frontmatter: hide_table_of_contents must be a boolean. Received ${obj.hide_table_of_contents}`
)
}
if ('tocVideo' in obj && typeof obj.tocVideo !== 'string') {
throw Error(`Invalid guide frontmatter: tocVideo must be a string. Received ${obj.tocVideo}`)
}
return true
}
Domain
Subdomains
Source
Frequently Asked Questions
What does isValidGuideFrontmatter() do?
isValidGuideFrontmatter() is a function in the supabase codebase.
What calls isValidGuideFrontmatter()?
isValidGuideFrontmatter() is called by 4 function(s): getContent, getContent, getGuidesMarkdownInternal, getGuidesStaticProps.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free