Closed Mara-Li closed 11 months ago
If anyone is interested, you can try my PR using the release ! https://github.com/Lisandra-dev/obsidian-banners/releases/tag/2.0.2-beta
Pardon the delay, had an exam week, ahah.
So I moved around a few things, but in a nutshell:
transformers.ts
since in hindsight, it makes sense to keep that logic together there at the level where the YAML is turned into relevant banner data.header
property can't be of different types, so it has to remain a text/string property. As a compromise, I implemented the ability to add multiple fields within the curly braces that can act as fallbacks (so something like {{author, title, filename}}
). It's a bit more flexible this way as a result too.null
values work differently though. Empty text properties (ie null
values) are now treated as empty in favor of {{filename}}
. This is because it can act as an override to the "Display header by default" settingDo tell if this may still present issues!
Hello! Thanks for the reply <3 you have better idea than me!
I added just a little information in the settings about the {{property, property2, filename}}
fallback syntax!
feat(header): use a list for banner_header, allowing to use frontmatter keys
Support list and string.
{{key}}
, allowing to combine keys and simple value.Key supported:
Also added new settings:
See #125