Aliases (familiar to past users of Logseq) help with grammatically relevant link names when using WikiLink-style links, and can improve (re)discoverability of notes when dealing with large/long-term PKM databases.
Aliases would be able to be used with links, as well as when searching.
There would be two sides to tackle when implementing this:
Syntax
We need syntax for defining aliases that fits well into Markdown.
It may be one of the following, but I think it would be good to support multiple styles.
Suggested option 1: YAML Metadata Tag (compatible with Pandoc & Obsidian)
YAML metadata in Markdown is not unfamiliar to users of Pandoc, nor advanced users of Obsidian.
It is put at the start of the file, delimited by lines consisting of only three dashes (---). An example (Pandoc) document that uses YAML metadata might look something like this:
---
title: A Markdown Document
subtitle: This is a document.
author: John Doe
date: Jan 1st, 2017
---
## Chapter 1. The first chapter
...
Undefined YAML tags are either ignored (Pandoc) or simply displayed (Obsidian, certain preview software), so there should be no issue including them.
The aliases could simply be a YAML array/sequence. The syntax for that would be either:
aliases:
- Alias 1
- Alias 2
- Alias 3
or:
aliases: ['Alias 1', 'Alias 2', 'Alias 3']
Which would be in line with Obsidian's alias syntax.
Suggested option 2: Slashes separating aliased titles
The syntax for aliases could be like so (inline with the title):
# Title / Alias 1 / Alias 2
This would be most intuitive to users not familiar with YAML frontmatter.
Implementation
Suggested option 1: Index file (best option)
IWE could use an index file to track whatfilenamees are assigned to what note-files. This would allow for aliases, and would also make lookups more optimized.
It would fall out-of-date when files are edited without IWE, but that can easily be rectified by rebuilding the database itermittently.
Suggested option 2: Symlinks (platform dependent)
IWE, when parsing the note file, could automatically create symlinks with the alias names in the notes folder when aliases are found. This would ensure that the aliases are treated fully as regular notes, but may have downsides:
- Garbage collection: We'd have to figure out a way to remove the symlinks when aliases are removed.
- Incorrect symlinks: If an alias is transferred from one note to another, the symlink needs to be handed over as well.
- OS-dependency: Windows partition formats don't support UNIX symlinks.
In addition, automatically deleting and recreating the symlinks from scratch wouldn't be a good idea, because some of the symlinks may be user-created, referring to files outside the notes database. An index file, on the other hand, would handle rebuilding just fine.
Suggested option 3: Brute-force (slow)
In addition to looking up filenames of notes (when searching and following links), IWE could peek in the files to see what aliases they've defined.
This would have a significant performance impact, especially with large note databases.
Aliases (familiar to past users of Logseq) help with grammatically relevant link names when using WikiLink-style links, and can improve (re)discoverability of notes when dealing with large/long-term PKM databases.
Aliases would be able to be used with links, as well as when searching.
There would be two sides to tackle when implementing this:
Syntax
We need syntax for defining aliases that fits well into Markdown.
It may be one of the following, but I think it would be good to support multiple styles.
Suggested option 1: YAML Metadata Tag (compatible with Pandoc & Obsidian)
YAML metadata in Markdown is not unfamiliar to users of Pandoc, nor advanced users of Obsidian.
It is put at the start of the file, delimited by lines consisting of only three dashes (
---). An example (Pandoc) document that uses YAML metadata might look something like this:Undefined YAML tags are either ignored (Pandoc) or simply displayed (Obsidian, certain preview software), so there should be no issue including them.
The aliases could simply be a YAML array/sequence. The syntax for that would be either:
or:
Which would be in line with Obsidian's alias syntax.
Suggested option 2: Slashes separating aliased titles
The syntax for aliases could be like so (inline with the title):
# Title / Alias 1 / Alias 2This would be most intuitive to users not familiar with YAML frontmatter.
Implementation
Suggested option 1: Index file (best option)
IWE could use an index file to track whatfilenamees are assigned to what note-files. This would allow for aliases, and would also make lookups more optimized.
It would fall out-of-date when files are edited without IWE, but that can easily be rectified by rebuilding the database itermittently.
Suggested option 2: Symlinks (platform dependent)
IWE, when parsing the note file, could automatically create symlinks with the alias names in the notes folder when aliases are found. This would ensure that the aliases are treated fully as regular notes, but may have downsides:
In addition, automatically deleting and recreating the symlinks from scratch wouldn't be a good idea, because some of the symlinks may be user-created, referring to files outside the notes database. An index file, on the other hand, would handle rebuilding just fine.
Suggested option 3: Brute-force (slow)
In addition to looking up filenames of notes (when searching and following links), IWE could peek in the files to see what aliases they've defined.
This would have a significant performance impact, especially with large note databases.