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 d5f3627 commit c94cc6bCopy full SHA for c94cc6b
netlify/functions/getPosts.js
@@ -6,12 +6,12 @@ exports.handler = async function(){
6
try {
7
8
const postsDir = path.join(process.cwd(), '_posts');
9
- const files = fs.readdirSync(postsDir);
+ /*const files = fs.readdirSync(postsDir);
10
11
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
- });
+ });*/
15
16
return {
17
statusCode: 200,
0 commit comments