Feature: Note Aliases

I would love to see the ability to assign additional note aliases to notes for the purpose of more natural linking.

Say I have a note called Turkey which contains information about the country.

I can link to this note by writing: “Ankara is the capital of [[Turkey]]”

If, however, I wanted to make reference to turkish food I would want to say: “Last night I went to a [[turkish]] restaurant.” Where [[turkish]] is an alias for my Turkey note.

4 Likes

The way it was solved in some other apps was with this notation: [[alias|actual note name]]

1 Like

Love this implementation! Very elegant, very flexible.

The only problem the developers may have is the backwards compatibility with notes written in Bear 1.x where people used the pipe in their note title.

Perhaps a double pipe; e.g. [[alias||Actual Note Name]] is less likely to collide with as many current notes?

1 Like

I can think of at least 20 notes on top of my head which have a pipe used in the title.

Double pipe is better.

Out of curiosity: what contexts to do use a pipe in? I don’t think I ever used this symbol in my life outside of code.

1 Like

I use it as a separator.

Like Brands | Taglines which lists all my small brands and their taglines.
Articles | Published has links to all the notes containing articles that have been published.
And so on…

Makes sense. Thanks.

Haha, it does look nice. It’s an extra button push on phone keyboard and for that reason alone not part of my lexicon; would just use a dash

I’d suggest using the normal liking along with the note’s link and make use of the link title as an alias. Something like this

Last night I went to a [turkish](bear://x-callback-url/open-note?id=70A7D96B...) restaurant.

But maybe I’m missing something here

I think you’re missing the usability aspect. To link via [[this]] I don’t need to search for the note if I remember its title. But I’m never going to remember the note ID so your solution requires multiple steps:

  • find the note I want to link to
  • copy the URL
  • go back to the note where I want to paste the link
  • type out the link

EDIT: and while in English it may seem like a niche use case, it is way more useful in languages with noun declensions. Otherwise you end up with a lot of ungrammatical sentences. (Think case endings in Latin).

1 Like

+1 to everything @gnome.irdan said in his comment.

I would also stress the immense helpfulness of the suggestion drop-down when using the [[link]] syntax, a feature that cannot be used in the x-call-back workaround.

1 Like

I was searching for the same thing…

Maybe this could be solved using “YAML Front Matter” within the Panda Release.

I.e. Obsidian supports that using this at the top of a note:

---
aliases: turkish, another-alias, …
---
2 Likes

Since this topic was posted I’ve seen more and more ways this is useful. Can’t it just be the case that [[link]] notation has a clickable icon after (like normal note links) that opens a model to edit the text and link? That being said, wouldn’t be as pretty as [[link]] notation

It’s an interesting topic.

It may be something we decide not to implement, but we’ll have a look into it more when considering it.

1 Like

Thanks @TedwardBear , prob not a priority with everything y’all are doing!

I am thinking… that @trix180 's method can work quite well, if there can be a little bit of tweak involved. Since this is a power user feature anyway, When bringing up notes list for [[ maybe give an option to copy the url with an icon on the right hand side. It will still be a couple step more than what people here want to have, but at least it would be less cumbersome than searching, going into the note, coming back, pasting, changing note name compared to [[note title, tap to replace as link, change note title. Maybe, show url edit panel right away. I am actually not a user of this feature, but just sharing an idea that just popped on my head. :thinking:

One more option for aliases, that does not require excessive hacking of the existing MD spec and abuse of the YAML frontmatter.

Use the reference-style link definition like so

I want to visit a [turkish][1] restuarant.


[1]: [[Turkey]]

Note that for this to work Panda would need to treat a Wiki-link in a reference like any other http link, while keeping the ability to update the title everywhere.

Right now I work around this by using footnotes, which looks very much the same, but the link is not clickable.

I want to visit a turkish[^1] restuarant.


[^1]: [[Turkey]]

I absolutely advocate the usage of aliases. The op showed how useful they are.

A simple and humanfriendly syntax is more appropriate than the geeky url-x-syntax

Thank you for the alternative suggestion, i’ll pass it onto the rest of the team to discuss and see what they think :slight_smile: