YAML for content automation

Use case or problem

Obsidian uses YAML {{ tags }} for content generation in templates, but not all declared information is currently being useful. I propose YAML as variables for content.

Proposed solution

Offer YAML metadata as a vehicle for autocompletion, like for writing references.
As {{ tagging }} is already established and in use for templates, I suggest adding a exclamation mark to enable the functionality.

---
title: How to Take Smart Notes
author: Ahrens, Sönke
publisher: CreateSpace Independent Publishing Platform
edition: 1st edition
publishdate: 2017
versiondate: 2017
---

Reference: !{{ author }}. (!{{ publishdate }}) !{{ title }} (!{{ edition }}). !{{ publisher }}, !{{ versiondate }}.

Reference: Ahrens, Sönke. (2017) How to Take Smart Notes (1st edition). CreateSpace Independent Publishing Platform, 2017.

Current workaround)

Dealing with Zotero for metadata management, which is causing duplicates and manually fiddling middle steps.

I use the features of either Dataview or Templater for that:

  • =this.variable (enclose in single backticks `)
  • <%+ tp.frontmatter.variable %>
1 Like

I’m sorry, this is new for me. ¿Where can I find more examples of this?

Probably just install the Dataview and Templater community plugins and try these out.

Templater Docs
Dataview Docs

My latest example on using these, a recipe database: Help: #howto Build Recipe "database" in Obsidian (complex) (mainly Dataview, though).

HTH