mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
5 lines
326 B
TypeScript
5 lines
326 B
TypeScript
// The `.md` mirror of a docs page url; the mirror of `/` is `/index.md`.
|
|
// The same rule is hand-encoded in vercel.json's Link-header routes.
|
|
// Dependency-free so Vercel's middleware bundler can include it.
|
|
export const markdownUrlFromDocsUrl = (url: string) => (url === '/' ? '/index.md' : `${url.replace(/\/$/, '')}.md`)
|