10 years in Evernote gives you not regular script habits…!
Reviving this as I found a way to integrate a YAML Front Matter workflow in Obsidian that provides an optimal Tag workflow for both Obsidian and DEVONthink, so thought it might be useful to anyone who encounters YAML tag issues.
A key feature of YAML is that it allows tags to be added without any further markup, but that means DEVONthink won’t be able to recognise the tags as they aren’t signified by a #. However, if one adds the # before autocompleting the tags in the tag property of the YAML front matter, the #tag is wrapped in quotes making it both legal YAML and a traditional Markdown tag which DEVONthink will recognise. Below, you’ll see both the hybrid edit view in Obsidian and the raw Source Mode view below it. It’s worth noting that this approach will only work if you have the Front Matter Tag Suggest community plugin installed in Obsidian. If you don’t have the plugin installed, you can still work directly in the Source Mode view, but it’s a manual process which isn’t quite as convenient, plus, you need to be aware of the Pythonic white-space requirements of YAML (the most common errors encountered in typical YAML scenarios according to Wikipedia).
Hope this helps someone anyway!
I may have misunderstood something but couldn’t make sense of the second part of the sentence. This works for me to display a tag in DEVONthink (as YAML at the head of a markdown document and with no other tagging added in DT):
---
tags: photo
---
And for those who aren’t using Obsidian, tags
in MultiMarkdown metadata – non-YAML – are detected and applied as DEVONthink tags…
name: Well project
tags: water table, construction, engineering
See here for further details ref YAML - YAML - Wikipedia
It has nothing to do with Markdown, MultiMarkdown, or any other Markdown derived alternative. It’s primarily a config file syntax that was utilised as a way to add metadata in a plain text friendly fashion by the Obsidian community.
Multiple tags applear in YAML front matter as the following -
tags:
- covid
- education
- health
- mentalHealth
- youth
- skills
- pandemic
They appear as a list much like a Markdown list and the whitespace matters. This format means that the traditional way that DT imports tags from Markdown notes won’t work. Hashtags are illegal within YAML, so they have to be wrapped in quotes. That means the tag section of the YAML Front Matter needs to appear as follows if it’s to achieve it’s goals both within Obsidian and within the indexed notes within DEVONthink.
tags:
- "#covid"
- "#education"
- "#health"
- "#mentalHealth"
- "#youth"
- "#skills"
- "#pandemic"
This workflow specifically relates to those that index their Obsidian notes in DT, they don’t import them into DT.
EDIT: To be more accurate # signifies comments in YAML inclusive of in-line comments, hence it not being suitable to signify a Tag.
tags:
- covid
- education
- health
- mentalHealth
- youth
- skills
- pandemic
This form is not supported in DEVONthink. It needs to be a comma-separated list, e.g.,…
tags: covid, education, health, mentalHealth, youth, skills, pandemic
I think we’re at cross purposes here. The OP was asking for DT to provide a way to convert YAML Front Matter tags, as used in Obsidian into DT tags. I’m fully aware this isn’t possible, and I agree it was an unworkable request. My posts today regard a workaround I use so that the YAML Front Matter functions as it should in Obsidian, but when DT indexes those Obsidian Markdown notes, it’s able to recognise the tagging within the YAML front matter because those tags appear as -
tags:
- "#covid"
- "#education"
- "#health"
- "#mentalHealth"
- "#youth"
- "#skills"
- "#pandemic"
I have thousands of plaintext Markdown files indexed in DT and the tags import without error. The core of this thread from the OP onwards has been about finding a workflow which allows Obsidian and DEVONthink to be used together with minimal cognitive load, and more importantly, where each application is able to play to their strengths.
The Obsidian Front Matter of course appears in its plain text fashion in DEVONthink, but that’s not an issue, the important thing is that DT recognises and imports the tags.
There is no indication of tags being recognized in your example. WikiLinks based on names and aliases? Yes.
As you can see, no tags are applied to this document.
Also, hashtags won’t be detected and converted in the format you’re using.
So while it may work in Obsidian, it isn’t doing what you think it’s doing in DEVONthink.
Also…
The tags applied here are not due to them being presented as YAML, but solely as they are valid hashtags and the setting to convert hashtags to tags is enabled.
And lastly, as these tags were created by the hashtag conversion they are now detected as WikiLinks. Note: I removed the tags from the document and the WikiLinks to those tags are active…
… and notice there are still no tags on the document. So if you searched for tags:covid
this document would not be matched.
Jim, it is working the way I believe, as I’m showing below in a new Vault with a single note indexed from one of my Obsidian Vaults. The note doesn’t have any #tags in the body, the only place they exist is in the YAML Front Matter of the originating Markdown document. And as can be seen, there are new DT tags created, which of course happens because I have the appropriate #tag option set in my DT preferences.
The reason this is an optimal solution for Obsidian users is that they get to interact with the YAML Front Matter via a ‘rich’ interaction design, even though the underlying note is still plain text, as can be seen below. Ignore the Word Cloud, that’s just something else I add to my YAML TextExpander macro, which I use when creating new Obsidian notes, although it is another example of the rich presentation layer one can add to the editable plain text notes.
Any new tags are always added to DEVONthink automatically as and when fresh notes are indexed. The user does of course need to CMD+OPT S to update the index to reflect any new notes and tags.
Edit: Spoke too soon about there being no #tags in the body content of the note, the body also contains #meToo and #socialMedia
I am always admiring the conceptual construction of such hybrid and dyadic ‘hacks’, which shortcircuit two systems,
by playing their different rule systems simultaneously – without really going for a proper ‘conversion’, ‘equation’ or ‘tanslation’ process.
… the latter probably being the ‘way of the engineer’, which might explain the non-alignment or incongruency of thought logics playing out here.
it’s a kind of trickster logic or hack (with all advantages & disadvantages of a hack). brought about by deeper knowledge of two heterogenuous systems, and ‘playing’ them, driven by a very specific conceptual purpose. not everyone´s cup of tea. but then, it works.
Chapeau! and thx for sharing!
Well put. The whole point is that you have to come up with a solution that functions optimally for multiple applications (each of which have complimentary strengths - otherwise, why bother). The rule that can’t be broken is that there’s only a single note in a single location.