How to add a space in alias

I’m creating notes for people. The file name is their full name, but elsewhere in the vault, I’ll reference them just by first and last name.

How do I get Obsidian to recognize the space in alias?

What do you mean by this? Spaces should work in aliases without doing anything special. What did you do, what did you expect to happen, and what actually happened?

1 Like

What Cawlin said above. I was just about to reply and took the screenshot already, so here goes:

Source mode | Live preview

---
aliases:
  - Leonard Tiberius. Skywalker
  - Tony "the Turtle" Mangrove
---

Spaces and punctuation are fine in aliases. How are you entering the aliases?

Hello! It’s not working for me. I created several thousands of Markdown files and in the YAML text property field, it looks like this (I read somewhere that plain wiki links won’t work in YAML, so I have to put quotation marks around it):

person: “[[Jane Smith]]”

Note: When I try to edit the Source Mode to change it to [[Jane Smith]], Obsidian automatically changes it to:

[[“Jane Smith”]]

I get an orange alert that says, “Display as text? Your unknown data is not compatible. It will be adapted to fit the new format.” I clicked Yes on that and then had to click Jane Smith in the suggestions for person. When I do that, I’m taken to a blank new file.

I checked my Jane Smith page (which is an alias to Jane Doe Smith) and the alias “Jane Smith” is listed. That’s why I’m looking at this like “…why does the space in the alias seem to break it in the YAML?”

I appreciate any guidance you may have.

I think it’s unrelated to spaces.

You might know some of this, but I’ll start from the beginning to make sure everything is set up properly.

The way to make an alias is to have a property in the YAML called “aliases”. It’s a list and would look like this in Source Mode:

---
aliases:
  - Jane Smith
  - Janey
  - Janie from the Block
---

No links there. Must be a list.

Let’s say the real name of that note is “Jane Alexandria Smith.md”.

When I want to use one of those aliases, I would start typing this:
[[Jani
… and a popup would appear where I can click to select an alias without having to type the rest:

Clicking on my choice creates a link where my cursor was, with the alias I selected as the display text:

[[Jane Alexandria Smith|Jane Smith]]

That way, when my cursor is not on the line (and all the time in Reading mode), the link looks like this:

But I still always need to use the note’s real name when I link to it, even when manually typing it:

[[Jane Alexandria Smith|whatever text I want to display]]

The following link will not link to that note:

[[Jane Smith]]

… It will link to a note called “Jane Smith.md”.


As for the front matter, if your person property is text, then this is the format in Source mode:

---
person: "[[Jane Alexandria Smith|Jane Smith]]"
---

If it’s a list, then:

---
person:
  - "[[Jane Alexandria Smith|Jane Smith]]"
  - "[[Macheath|Mack the Knife]]"
---