Add title to each page
This commit is contained in:
parent
71a0fe3493
commit
060cfcbbfe
1 changed files with 4 additions and 0 deletions
|
@ -115,6 +115,10 @@ function toSlug(string) {
|
|||
/---\n\n/gm,
|
||||
`---\n\n> Referenced by: ${referencedBy[title].map(tag => `[${tag}](${pageLinks[tag]})`).join(", ")}\n\n`);
|
||||
}
|
||||
// Add title to the top
|
||||
data = data.replaceAll(
|
||||
/---\n\n/gm,
|
||||
`---\n# ${title}\n\n`);
|
||||
|
||||
const fd = fs.openSync(filePath, "w+");
|
||||
fs.writeSync(fd, data);
|
||||
|
|
Loading…
Reference in a new issue