Fix favorites
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m1s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m1s
This commit is contained in:
parent
67a9853718
commit
31d9933942
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ const filePath = path.resolve("./Garden/logseq/config.edn");
|
||||||
const data = fs.readFileSync(filePath).toString();
|
const data = fs.readFileSync(filePath).toString();
|
||||||
let favorites = [];
|
let favorites = [];
|
||||||
for (const match of data.matchAll(/:favorites \["([^\]]+)"\]/g)) {
|
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 = {
|
module.exports = {
|
||||||
|
|
Loading…
Reference in a new issue