dalcantara7 / obsidian-auto-moc

GNU General Public License v3.0
40 stars 1 forks source link

Feature Request: Link named as first Alias #5

Closed naarcissus closed 2 years ago

naarcissus commented 2 years ago

I tend to name notes so that they have some sort of order to them when I browse them in my file manager, so they aren't really named well for inclusion in a list. So I use Aliases. I would like to have the option to have each link printed as [<file link>|<1st alias>] so that they show up as <first alias>.

dalcantara7 commented 2 years ago

I wanted to be sure I could implement this before replying. But yes I think that's a good feature. As it is implemented currently, it will check if the file that is being linked to has an alias first and if so, add the link with the first alias appended to the end st [|<1st alias>].

It will be made available in the same release as the alphabetical sort update. I will close this request once that release is made available.

dalcantara7 commented 2 years ago

The release has been published. You can update the plugin now.

naarcissus commented 2 years ago

Working well. Thank you for adding it this.

dalcantara7 commented 2 years ago

Just an FYI. The logic I was using to check for aliases was flawed. If you have a note with a frontmatter like the following:

---
aliases:
---

i.e. you allocate the aliases field, but don't provide any aliases,

the plugin will throw an error. I have updated the logic, but you may need to uninstall and reinstall the plugin to see the changes.