Utilities
Resolve locale-aware routes and locate pages without depending on the UI.
Foldocs Core exports small helpers used by the application runtime and available to integrations.
Locale routing
localeFromPathnamereads a configured locale prefix.stripLocalePrefixreturns the locale-independent path.localizedPathnamecreates a route for a target locale.localeHomePathcreates the locale landing route.
Manifest lookup
findPageByUrlresolves a canonical route.findPageBySlugresolves a content slug.adjacentPagesreturns previous and next entries in navigation order.
Translation interpolation
interpolateTranslation replaces named values in UI translation templates while
keeping the translation model separate from rendering.
All helpers are deterministic and side-effect free, making them safe in build plugins, tests, and Foldkit update functions.
Last updated Aug 2, 2026