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 7664769 commit d6f30fdCopy full SHA for d6f30fd
netlify/functions/getPosts.js
@@ -5,8 +5,8 @@ exports.handler = async function(){
5
6
try {
7
8
- const postsDir = path.join(__dirname);
9
- const files = fs.readdirSync('');
+ const postsDir = path.join(__dirname, '_posts');
+ const files = fs.readdirSync(postsDir);
10
11
var posts = '';
12
files.map(file => {
0 commit comments