Skip to content

Commit

Permalink
#8 Add custom document
Browse files Browse the repository at this point in the history
  • Loading branch information
raeperd committed Jan 9, 2022
1 parent 9d961ce commit 4bbde59
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from 'fs'
import { join } from 'path'
import matter from 'gray-matter'

const postsDirectory = join(process.cwd(), '_posts')
const postsDirectory = join(process.cwd(), 'content', 'post')

export function getPostSlugs() {
return fs.readdirSync(postsDirectory)
Expand Down
15 changes: 15 additions & 0 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Document, { Head, Html, Main, NextScript } from 'next/document'

export default class MyDocument extends Document {
render() {
return (
<Html>
<Head />
<body data-menu="true">
<Main />
<NextScript />
</body>
</Html>
)
}
}

0 comments on commit 4bbde59

Please sign in to comment.