Aliases for note names

I see that Note Alias was added to the Obsidian Roadmap yesterday.

14 Likes

Sounds like a great idea. If so, I think it would make the most sense to store that dictionary in each note (as opposed to one giant dictionary that has the alias definitions over every note in the vault.

I could see this implemented in a few ways:

  1. A header at the top of the note. Obsidian could have it’s own syntax for marking alias names and keep it at the top of the file. (Would be nice if this header is foldable.)
  2. A “Properties” menu: the user could right-click the note, click “Properties” and within the Properties menu they could write in their alias names.
    • Disadvatage: this menu, and the metadata would probably not be readable outside of Obsidian.
  3. A hybrid of the two: Obsidian could render alias names in each “Properties” menu, but could store the actual alias metadata as plain text in Obsidian’s alias syntax. This way user’s can easily choose aliases in a menu, and yet they are still visible in other apps. (Even if other apps don’t know how to read Obsidian’s alias syntax, it should be easy to write a parser).
1 Like

The dictionary can be stored in a YAML header of each note — similar to how documents are formed for Pandoc-markdown and R-markdown.

2 Likes

The ability to customize terms that should match in the Unlinked References of a note, to help with discovering backlinks for content that doesn’t exactly match the title. As a bonus, linking these unlinked references should create an alias page link.

To illustrate:

  • Have note “AI”
  • Specify “Artificial Intelligence” as an alias in the Unlinked References
  • Find all matches to artificial intelligence and link the unlinked reference
  • Obsidian creates an alias page link [[AI|Artificial Intelligence]]

This is crucial for me in lieu of a note merging feature, which enables a hack in Roam for achieving the same end result (minus aliasing), described here Merge two documents and update backlinks

7 Likes

Aliases are now available as of v0.9.16

3 Likes

https://forum.obsidian.md/t/obsidian-release-v0-9-16-insider-build/8795

5 Likes

Is there any specific format for “front matter”?

2 Likes

YAML format

3 Likes
---
aliases: [[aOne, aTwo]]
tags: #tag1, #tag2
other: things
---

Like this? If so, super awesome!

2 Likes

That is not valid YAML.
Like this:

---
aliases: ["aOne", "aTwo"]
tags: ["#tag1", "#tag2"]
---

You can add “other: things” but it won’t do anything.

5 Likes

Oh, right, I forgot about the square brackets and the quotation marks! Links to other notes cannot be placed in the YAML header, correct? (I mean they will not work). (BTW, thanks for helping to understand this!)

1 Like

not at the moment, but we are thinking about that.
Plugins can also be used to expand the functionality of this area.

3 Likes

Great. Thanks! It would be nice to keep links in the header — then exported PDFs will be much cleaner and more readable.

At the moment I keep tags, links, and Folgezettel links in the “tail” of the note, like this (easy to cut off with a script):

---
- **TAGS:** #presentation
- **LINKS:** [[2008081925 - Complexity]]; [[IDEA - Chronicle Design]]
- **FOLGEZETTEL:** ____

Yeah, Yeah, Yeah!

Does YAML front matter always has to be at the top of a page. For people mainly working in Edit-Mode it would be great to be able to put it at the end of a page.

it has to be on top. It is just a few lines and it is optional.

2 Likes

I have started to use aliases and I am not completely satisfied with the fact that links replace automatically the alias by the filename of the note. Is there any technical reason for not keeping the alias?

: I am planning to write notes on articles and I would like to name the file with a pattern “Authors - Year - Title” because it’s nicer (and can in principle be used by other applications, for example a bibliography management). Most paper have a unique ID (arxiv, doi…) which I am using as an alias. It’s common practice to cite a paper with its ID only, which is short and clear. The automatic replacement creates huge links which make the notes less readable. Finally, it’s not a good strategy to name files with the ID because they often contain bad characters for filenames (dots, slashes…).

tags: [“#tag1”, “#tag2”]

I don’t understand the aliases for tags? How do these work? Are the tagged aliases now linked to a document?

@oyvind tags and aliases are two separate things. Anything you include in the tags: ["tag1", "#tag2"] will show up in the tag pane. Aliases go under aliases: ["An alias for my note", "An alias with a symbol not allowed in file names?"], etc.

@melsophos I don’t believe links are replaced by the alias unless both filename and Alias are exactly the same. The only way you would be getting replacements is if you selected the alias as during linking using [[.

If there are further questions, please open new threads in #help.