feat(fs.dev): Loading MDX is now ok
This commit is contained in:
parent
092c81f535
commit
c5e971e8a7
11 changed files with 231 additions and 49 deletions
10
packages/freesewing.dev/hooks/useMdx.js
Normal file
10
packages/freesewing.dev/hooks/useMdx.js
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue