Fix favorites
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m1s

This commit is contained in:
thepaperpilot 2024-06-15 00:11:52 -05:00
parent 67a9853718
commit 31d9933942

View file

@ -12,7 +12,7 @@ const filePath = path.resolve("./Garden/logseq/config.edn");
const data = fs.readFileSync(filePath).toString();
let favorites = [];
for (const match of data.matchAll(/:favorites \["([^\]]+)"\]/g)) {
favorites = match[1].split("\" \"").map(page => ({ title: page, link: `/garden/${page.toLowerCase().replaceAll(' ', '-')}` }));
favorites = match[1].split("\" \"").map(page => ({ text: page, link: `/garden/${page.toLowerCase().replaceAll(' ', '-')}` }));
}
module.exports = {