markdownPagePathToRoutePath #
Converts a source-relative Markdown page path to its public route path.
Usage #
TypeScript
import { markdownPagePathToRoutePath } from 'kawapress'
const route = markdownPagePathToRoutePath('guide/index.md')
Parameters
pagePathstring
Path of the page relative to the source folder, for example guide/intro.md.
Returns The route path, for example /guide/intro.
Full type signature
TypeScript
function markdownPagePathToRoutePath(pagePath: string): string

Comments