diff --git a/docs/basic-features/data-fetching.md b/docs/basic-features/data-fetching.md index 866c97182a57bc9..ac7e6f2ed47936b 100644 --- a/docs/basic-features/data-fetching.md +++ b/docs/basic-features/data-fetching.md @@ -131,7 +131,7 @@ export async function getStaticProps() { const posts = filenames.map(filename => { const filePath = path.join(postsDirectory, filename) - const fileContents = fs.readFileSync(fullPath, 'utf8') + const fileContents = fs.readFileSync(filePath, 'utf8') // Generally you would parse/transform the contents // For example you can transform markdown to HTML here