Created
May 15, 2020 22:46
-
-
Save andycarrell/3b1b29148f98566418787751813b1843 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function getStaticProps({ params }) { | |
const { slug } = params; | |
const post = postFor[slug]; | |
if (!post) { | |
return { props: {} }; | |
} | |
const { default: Post, SEO } = await import(`../../posts/${post}`); | |
return { props: { Post, SEO } }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment