We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9562b12 commit d4c1a5fCopy full SHA for d4c1a5f
netlify/functions/getPosts.js
@@ -6,9 +6,9 @@ exports.handler = async function(){
6
try {
7
8
const postsDir = path.join(__dirname, '_posts');
9
- /*const files = fs.readdirSync(postsDir);
+ const files = fs.readdirSync('_posts');
10
11
- const posts = files.filter(file => file.endsWith('.json')).map(file => {
+ /*const posts = files.filter(file => file.endsWith('.json')).map(file => {
12
const content = fs.readFileSync(path.join(postsDir, file), 'utf-8');
13
return JSON.parse(content);
14
});*/
0 commit comments