This commit is contained in:
parent
c8f0bc1d7b
commit
db58828d3f
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ function toSlug(string) {
|
|||
// Add title to the top
|
||||
data = data.replaceAll(
|
||||
/---\n\n/gm,
|
||||
`---\n# ${title}\n\n`);
|
||||
`---\n# ${data.match(/title: "(.+)"/)[1]}\n\n`);
|
||||
|
||||
const fd = fs.openSync(filePath, "w+");
|
||||
fs.writeSync(fd, data);
|
||||
|
|
Loading…
Reference in a new issue