chore: fix typo
This commit is contained in:
commit
16a4f962a8
@ -7,7 +7,7 @@ const generateRssItem = (post) => `
|
||||
<guid>${siteMetadata.siteUrl}/blog/${post.slug}</guid>
|
||||
<title>${escape(post.title)}</title>
|
||||
<link>${siteMetadata.siteUrl}/blog/${post.slug}</link>
|
||||
${post.summary && <description>escape(post.summary)</description>}
|
||||
${post.summary && `<description>${escape(post.summary)}</description>`}
|
||||
<pubDate>${new Date(post.date).toUTCString()}</pubDate>
|
||||
<author>${siteMetadata.email} (${siteMetadata.author})</author>
|
||||
${post.tags && post.tags.map((t) => `<category>${t}</category>`).join('')}
|
||||
|
@ -59,7 +59,7 @@ inquirer
|
||||
type: 'input',
|
||||
},
|
||||
{
|
||||
name: 'extention',
|
||||
name: 'extension',
|
||||
message: 'Choose post extension:',
|
||||
type: 'list',
|
||||
choices: ['mdx', 'md'],
|
||||
@ -102,7 +102,7 @@ inquirer
|
||||
.replace(/-+/g, '-')
|
||||
const frontMatter = genFrontMatter(answers)
|
||||
const filePath = `data/blog/${fileName ? fileName : 'untitled'}.${
|
||||
answers.extention ? answers.extention : 'md'
|
||||
answers.extension ? answers.extension : 'md'
|
||||
}`
|
||||
fs.writeFile(filePath, frontMatter, { flag: 'wx' }, (err) => {
|
||||
if (err) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user