mirror of
https://github.com/pedersen/obsidian-testing-vault.git
synced 2026-07-22 07:30:23 +00:00
Update how tags are formatted so that Obsidian will work with them correctly.
This commit is contained in:
parent
d78d663c6a
commit
0295ff4346
1 changed files with 2 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ function newFrontMatter({
|
||||||
}
|
}
|
||||||
// generate tags here
|
// generate tags here
|
||||||
const numTags = randomInt(minTags, maxTags);
|
const numTags = randomInt(minTags, maxTags);
|
||||||
const chosenTags = randomSubset(tags, numTags).join(',')
|
const chosenTags = randomSubset(tags, numTags).join('"\n - "');
|
||||||
const status = randomChoice(["Backlog", "In progress", "Done"]);
|
const status = randomChoice(["Backlog", "In progress", "Done"]);
|
||||||
const published = randomChoice([0, 1]);
|
const published = randomChoice([0, 1]);
|
||||||
const weight = randomInt(1, 100);
|
const weight = randomInt(1, 100);
|
||||||
|
|
@ -60,7 +60,7 @@ function newFrontMatter({
|
||||||
const end = new Date(start.getTime() + 31536000000); // magic number, milliseconds in a year
|
const end = new Date(start.getTime() + 31536000000); // magic number, milliseconds in a year
|
||||||
const duedate = randomDateInRange(start, end);
|
const duedate = randomDateInRange(start, end);
|
||||||
|
|
||||||
return `---\ntags: ${chosenTags}\ncssclass: ${cssclass}\n`
|
return `---\ntags: \n - "${chosenTags}"\ncssclass: ${cssclass}\n`
|
||||||
+ `aliases: ${alias}\npublish: ${publish}\n`
|
+ `aliases: ${alias}\npublish: ${publish}\n`
|
||||||
+ `status: ${status}\npublished: ${published}\n`
|
+ `status: ${status}\npublished: ${published}\n`
|
||||||
+ `due: ${duedate.toISOString().substring(0, 10)}\n`
|
+ `due: ${duedate.toISOString().substring(0, 10)}\n`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue