1
0
Fork 0

feat(fs.dev): Loading MDX is now ok

This commit is contained in:
Joost De Cock 2021-12-18 09:54:53 +01:00
parent 092c81f535
commit c5e971e8a7
11 changed files with 231 additions and 49 deletions

View file

@ -0,0 +1,10 @@
import path from 'path'
const useMdx = (slug=false) => {
if (!slug) null
const file = ['markdown', 'dev', ...slug.split('/'), 'en.md'].join('/')
const mdx = require(file)
return <p>{file}</p>
}
export default useMdx