/** * Content loading utilities for Astro docs. * * Scans the filesystem for `.md` / `.mdx` content files, * extracts frontmatter, and builds a navigation tree compatible * with @farming-labs/docs DocsConfig. */ import { type OrderingItem, type PageAgentFrontmatter, type DocsOkfTrustMetadataInput, type ResolvedDocsRelatedLink, type SidebarFolderIndexBehavior } from "@farming-labs/docs"; export interface PageNode { type: "page"; name: string; url: string; icon?: string; description?: string; } export interface FolderNode { type: "folder"; name: string; icon?: string; index?: PageNode; folderIndexBehavior?: SidebarFolderIndexBehavior; children: NavNode[]; } export type NavNode = PageNode | FolderNode; export interface NavTree { name: string; children: NavNode[]; } export interface ContentPage { slug: string; url: string; title: string; description?: string; related?: ResolvedDocsRelatedLink[]; agent?: PageAgentFrontmatter; okf?: DocsOkfTrustMetadataInput; icon?: string; sourcePath?: string; lastmod?: string; lastModified?: string; locale?: string; framework?: string; version?: string; tags?: string[]; content: string; rawContent: string; agentContent?: string; agentRawContent?: string; agentLastModified?: string; agentFallbackContent?: string; agentFallbackRawContent?: string; } export declare function normalizeDocsFrontmatterLastmod(value: unknown): string | undefined; /** * Scan a content directory and return all docs pages. * Expects a flat or nested structure of `.md` files: * content/docs/index.md → /docs * content/docs/installation.md → /docs/installation * content/docs/guides/auth.md → /docs/guides/auth */ export declare function loadDocsContent(contentDir: string, entry?: string): ContentPage[]; /** * Build a navigation tree from a content directory. */ export declare function loadDocsNavTree(contentDir: string, entry?: string, ordering?: "alphabetical" | "numeric" | OrderingItem[]): NavTree; /** * Flatten a navigation tree into an ordered list of pages. * Useful for computing previous/next page links. */ export declare function flattenNavTree(tree: NavTree): PageNode[]; //# sourceMappingURL=content.d.ts.map