web / lib /mdx.ts
quinnz's picture
fix build error
79896e9
raw
history blame contribute delete
254 Bytes
import fs from 'fs'
import path from 'path'
export function getMdxPath(lang: string, slug: string[]) {
return path.join(process.cwd(), 'content', lang, ...slug) + '.mdx'
}
export function mdxExists(mdxPath: string) {
return fs.existsSync(mdxPath)
}