Confusion around yaml alias recommended format

Before I post on GitHub about a plugin that doesn’t recognize Obsidian recommended alias formatting in frontmatter, I just want to confirm the latest recommended formats (my search brought up different recommendations). See below for details and examples on each item.

  1. Square brackets or no?
  2. Is the multiple line beginning with a dash still good?
  3. Wrap in quotation marks?
  4. Singular or Plural?
    One last thing. Is it bad form to always use the plural aliases even if there is just the one alias? I’d rather not have to modify my queries later to include the plural everytime I add a new alias to an existing one.

Details

Item 1

The Obsidian Help File says to use this format:

aliases: [AI, Artificial Intelligence]

In the example on the same page, though, there are no square brackets:

---
aliases: alias, aliases
---

The plugin in question only recognizes aliases if there are no brackets, so I don’t know if the bracket thing has been superseded, or if the plugin needs to be updated.

Item 2

Example in the help file:

---
key: value
key2: value2
multiple: [one, two, three]
multiple:
- one
- two
- three
---

Again, I ask because the plugin doesn’t recognize aliases in this format.

Item 3

I read somewhere that the individual aliases should be wrapped in quotation marks when they include odd characters.

aliases: ["A & W", "This_or That"]

but I’ve seen a posting that implied we always need to wrap in quotation marks

aliases: ["aOne", "aTwo"]

Where is this?

https://help.obsidian.md/How+to/Add+aliases+to+note

yes

This is correct.

  1. We had the same question. We decided to stick with plural (at least for tags and alieses)

I find odd this the plugins doesn’t recognize X, because Obsidian provides API access to reading the YAML block so they should all be able to read the same thing. In other words, they don’t have each to write a function to parse the YAML frontmatter.

@WhiteNoise said: Where is this?

It’s in the local help file that comes with Obsidian

that format also works.

Interesting. I’ll see how the author replies.

Ok. Yeah, they all seem to work, I just don’t want to get caught having to fix them all at some point in the future if Obsidian gets strict about one of them, as in requiring the [ ] or something like that.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.