Skip to content

Commit

Permalink
Resolve promise with .toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrickaby committed Oct 14, 2020
1 parent 9307788 commit 0a495f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/migrating/from-gatsby.md
Expand Up @@ -84,10 +84,10 @@ import { getPostBySlug, getAllPosts } from '../lib/blog'

export async function getStaticProps({ params }) {
const post = getPostBySlug(params.slug)
const content = await remark()
const markdown = await remark()
.use(html)
.process(post.content || '')
.toString()
const content = markdown.toString()

return {
props: {
Expand Down

0 comments on commit 0a495f5

Please sign in to comment.