Skip to content

Multiple title and linking systems #28

Open
@tchayen

Description

@tchayen

I am opening a common issue to discuss various systems for linking and discovering titles that I am aiming to support at some point in the extension.

I would love to have some discussion here first to find out what people expect and what are the chances that those expectations can live together.

Linking

As a reminder, there are only two ways to link files in Markdown: links and references. All the other methods like [[Linking by title]], linking by some arbitrary ID ([[20200715001]], <g04d0sa2>) are not part of the CommonMark standard and will be present in Markdown Links only as configurable options.

Possible options

  • [[Wiki link]] maps to kebab case filename of the same string Support Markdown Notes style of wiki links #21 (Some kind of a title links to some-kind-of-a-title.md if such file exists).
  • [[Wiki link]] maps to title (see Title discovery below).
  • [[Wiki link|Alias]] (as the two above).
  • Zettlr-style links (already supported by default, will be moved out to an option).
  • Neuron-style links (<iD0f4f1l3>). Deprecated.
  • [[[Folgezettel link]]] used in Neuron and described here.
  • Foam-like references ([Reference]: file-name instead of [Reference]: file-name.md)

Title discovery

I have used an assumption that title of the file will be the first heading of rank 1, but of course it is not true for everyone.

What comes to my mind is settle on several ways to discover a title, give them some default precedence and make it configurable.

An example default can be:

  1. Frontmatter title
  2. Rank 1 header if there is only one
  3. Filename if globally unique
  4. Filename with the enclosing directory

What's next?

Please comment the issue with your idea about linking if you have one. Please share your feedback about the the things I have mentioned above. As soon as we find a way to support all alternatives (or come to conclusion that it is out of scope) we can start implementing support for those.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions