Closed zanodor closed 1 year ago
I am using standard Obsidian function to modify frontmatter https://marcus.se.net/obsidian-plugin-docs/reference/typescript/classes/FileManager#processfrontmatter
And yes, this function doesn't keep formatting and uses own one. I already spent some little time thinking how to do it better, but there is no good and easy solution.
I can create a feature request into Obsidian, so they improve their processfrontmatter function. I guess all plugin developers and all their users can profit from that then.
There is one problem, I have no arguments why it makes sense to keep formatting. For me personally the frontmatter YAML is about contained data and i do not care how it is formatted. So if you have some good reasons why formatting must be kept, so it makes sense to spent on that some effort then I can create a feature request and you can add there a explanation why you need that. WDYT?
I remember a thread (or two) where more experienced computer jugglers were arguing over and criticizing Obsidian's (former/current?) ability to handle what they (the commenters) thought was standard or otherwise. To be honest, no skin off my nose.
I just picked a syntax copying the style of someone who seemed knowledgeable and was arguing (in a YouTube video) that metadata in square brackets is easily used for Dataview (which, incidentally, I don't have much use for and by the time I might do, that plugin would have been superseded anyway).
So if you say your hands are tied at the moment (and if the others say – if that was the discussion about in that forum post, I don't really remember – what they said about the syntax being used), then I either wait or just use the plugin as it is.
In any case, thank you for your endeavours
Z.
So as long as there is no real issue with default Obsidian behavior / formatting of YAML frontmatter, I suggest to not invest effort there and to close this issue. Otherwise let's reopen this issue, collect the good arguments and let's start discussion on Discord in Obsidian feature requests to have that done. ... or may be some other solution which solves the well described problem caused by different YAML formatting
Thanks for the great plugin!
I tried it and it does what it's supposed to be doing. I even like the fact the existing aliases are updated. The only thing I am missing is keeping the syntax I am using in my YAML frontmatter.
A probably well-liked Feature Request would be to have the plugin recognize the tag, alias, etc. convention in use and add the new alias in keeping with the syntax (and not touch the tags, etc.).
Existing aliases in YAML:
alias: [Hephtalite, heftalita]
After using the plugin:
I am omitting example lines to show how the plugin freely modifies other existing parts of YAML. Not that I am making full use of my YAML, but I wouldn't like to use differing syntax in my notes.
Current workaround: make regex replacements to convert YAML back to original syntax.
I know it's early days but one of the most important next step would be this.
Köszönöm, barátom