Skip to content

Commit

Permalink
debug mdx content
Browse files Browse the repository at this point in the history
  • Loading branch information
nofurtherinformation committed Apr 11, 2024
1 parent 7cd496f commit 364daec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hooks/useMdxContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export const getMdxContent = async <T extends any>(contentType: keyof typeof cli
return r
} else {
const filepath = path.join(process.cwd(), 'content', contentType, relativePath)
console.log(filepath)
// log dirs in current dir
const dirs = fs.readdirSync(path.join(process.cwd()))
console.log(dirs)
const mdxContent = fs.readFileSync(filepath, 'utf-8')
const frontMatter = matter(mdxContent)
const data: any = {
Expand Down

0 comments on commit 364daec

Please sign in to comment.