outstatic
outstatic copied to clipboard
No such file or directory — `.gitkeep.md`
Currently, the existence of files other than mdx?
(ex: .gitkeep
) within a collection folder results in an error:
Error: ENOENT: no such file or directory, open "blog/outstatic/content/posts/.gitkeep.md"
Same issue here. Deleting .gitkeep from the folder fixed for me. But if you do that make sure to add at least one .md file into the directory to ensure it is properly uploaded to git.
Currently, the existence of files other than
mdx?
(ex:.gitkeep
) within a collection folder results in an error:
Error: ENOENT: no such file or directory, open "blog/outstatic/content/posts/.gitkeep.md"
@avitorio @clemmurphy
I think as slugs we should only consider mdx?
files name (without extension).
// now
getDocumentSlugs('posts') // ['post-1.md', 'post-2.mdx', 'images', '.gitkeep']
// then
getDocumentSlugs('posts') // ['post-1', 'post-2']
Hey @mamunonweb, I wasn't aware this was happening. I'll take a look at it and try to create a fix sometime this week. Feel free to try to fix it yourself and create a PR if possible.
By the way, we need that .gitkeep
to create the collection folder, otherwise git will just ignore it.