UNPKG

@mdfriday/foundry

Version:

The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.

52 lines 1.43 kB
import { Menus } from '../valueobject/menu'; import { ContentService } from '../type'; /** * MenuBuilder - Entity responsible for building menus from content directory structure * Implements the logic described in menu.md */ export declare class MenuBuilder { private readonly contentService; constructor(contentService: ContentService); /** * Build menus for a specific language * Walks through pages and builds hierarchical menu structure */ buildMenusForLanguage(langIndex: number): Promise<Menus>; /** * Process a single page and update menu structure */ private processPage; /** * Check if path is valid for menu generation */ private isValidMenuPath; /** * Parse path into meaningful parts for menu structure */ private parsePathParts; /** * Build hierarchical menu structure */ private buildMenuStructure; /** * Format directory/file name into menu title */ private formatTitle; /** * Build URL from path parts */ private buildUrl; /** * Calculate weight for sorting (lower weight = higher priority) */ private calculateWeight; /** * Convert MenuStructure map to Menus */ private convertToMenus; /** * Recursively build Menu from MenuStructure */ private buildMenuFromStructures; } //# sourceMappingURL=menu-builder.d.ts.map