added canonicalUrl support

This commit is contained in:
Onur Geneş
2022-01-18 12:28:41 +03:00
parent 507d32ab9d
commit 25e82e58bf
5 changed files with 28 additions and 3 deletions

View File

@ -40,6 +40,7 @@ const genFrontMatter = (answers) => {
summary: ${answers.summary ? answers.summary : ' '}
images: []
layout: ${answers.layout}
canonical: ${answers.canonical}
`
if (answers.authors.length > 0) {
@ -92,6 +93,11 @@ inquirer
type: 'list',
choices: getLayouts,
},
{
name: 'canonical',
message: 'Enter canonical url:',
type: 'input',
},
])
.then((answers) => {
// Remove special characters and replace space with -