diff --git a/build_garden.js b/build_garden.js index a0ccc55f..f6ba2a33 100644 --- a/build_garden.js +++ b/build_garden.js @@ -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);