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
|
// Add title to the top
|
||||||
data = data.replaceAll(
|
data = data.replaceAll(
|
||||||
/---\n\n/gm,
|
/---\n\n/gm,
|
||||||
`---\n# ${title}\n\n`);
|
`---\n# ${data.match(/title: "(.+)"/)[1]}\n\n`);
|
||||||
|
|
||||||
const fd = fs.openSync(filePath, "w+");
|
const fd = fs.openSync(filePath, "w+");
|
||||||
fs.writeSync(fd, data);
|
fs.writeSync(fd, data);
|
||||||
|
|
Loading…
Reference in a new issue