--- import { config } from "../../config"; import { getDocs, getTitle, getSlug } from "../content-utils"; const docs = await getDocs(); const { id, headings } = Astro.props; const numberOfSecondHeadings = headings.filter( (heading: { depth: number }) => heading.depth === 2 ).length; ---
{ config.SITE_FAVICON ? (
{config.SITE_FAVICON}
) : null }
{config.SITE_NAME}
{ docs.map((category) => (
{category.category ? (

{category.category[0].toUpperCase() + category.category.slice(1)}

) : null}
{category.docs.map((doc) => (
{getTitle(doc)} {id === doc.id ? (
) : null} {id === doc.id ? (
{headings.map( (heading: { depth: number; text: string; slug: string }) => heading.depth === 2 && numberOfSecondHeadings > 1 && ( {heading.text} ) )}
) : null}
))}
{category.category ? (
) : null}
)) }