Merge pull request #354 from edwincoronado/master
fix: Create `data/blog` directory if missing
This commit is contained in:
commit
11923a0a6a
@ -101,6 +101,7 @@ inquirer
|
||||
.replace(/ /g, '-')
|
||||
.replace(/-+/g, '-')
|
||||
const frontMatter = genFrontMatter(answers)
|
||||
if (!fs.existsSync('data/blog')) fs.mkdirSync('data/blog', { recursive: true })
|
||||
const filePath = `data/blog/${fileName ? fileName : 'untitled'}.${
|
||||
answers.extension ? answers.extension : 'md'
|
||||
}`
|
||||
|
Loading…
x
Reference in New Issue
Block a user