Alter display of tags in YAML header? #592
macrospecter
started this conversation in
Note Templates
Replies: 1 comment
-
Solved my own issue! The template to make tags from the note's parent item appear in the exported note's YAML section with a hashtag immediately in front is below. Note: technically, the tags appear in the YAML with quotes around them (e.g., '#tagname'), but that isn't an issue for my markdown editor Obsidian; it still treats them like native tags. ${await new Promise(async (r) => { |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have just created the following template for the YAML header file (ExportMDFileHeaderV2), which displays only an author and (parent item) tags. I would ideally like, though, for the tags to display in my markdown editor Obsidian with a "#" right before them, without a space. (Currently, they display with a hyphen ("-") before them.) Is this possible? I believe this would make them searchable (and changeable) within the markdown editor as native tags.
${await new Promise(async (r) => {
let header = {};
header.author = noteItem.parentItem
? noteItem.parentItem.getCreators().map((au) => au.firstName + " " + au.lastName).join("; ")
: "";
header.tags = noteItem.parentItem.getTags().map((_t) => _t.tag);
r(JSON.stringify(header));
})}
Beta Was this translation helpful? Give feedback.
All reactions