UNPKG

@signalwire/docusaurus-plugin-llms-txt

Version:

Generate Markdown versions of Docusaurus HTML pages and an llms.txt index file

18 lines (17 loc) 600 B
/** * Route conversion utilities * Convert between different route representations (RouteConfig ↔ CachedRouteInfo) */ /** * Convert cached route info back to RouteConfig objects * This allows CLI to use the same processing pipeline as postBuild * @internal */ export function cachedRoutesToRouteConfigs(cachedRoutes) { return cachedRoutes.map((cachedRoute) => ({ path: cachedRoute.path, component: '', // Not needed for processing exact: true, // Not needed for processing plugin: cachedRoute.plugin ? { name: cachedRoute.plugin } : undefined, })); }