Use H1 or YAML property "title" instead of or in addition to filename as display name

As Icebear noted, we can get autocompletion of h1 by typing “[[##”.
It produces link in form “[[UIDfilename#readable header h1]]”.

  • issues:
    • Editing header outside Obsidian breakes corresponding links. Although link to UIDfilename will still work.
    • UIDfilename is always shown together with the header, cannot be hidden. (“UIDfilename > readable header h1”)

Here is one existing syntax for displaying up-to date link-titles as link text (see examples):
http://markua.com/#smart-crosslinks-m-
It uses markdown links, easy to adapt for wikilinks.

Writing “[[|#t ” (including trailing space) could turn on autocomplete for title / h1 / first line / filename / headers … and return link in form “[[filename|#t]]”. (Maybe it could be just “[[|#” → “[[filename|#]]”).
Writing just “[[|” could turn on autocomplete / global search for all content in all notes and return link in form “[[filename|search text]]

  • where:
  • filename” corresponds to note selected from autocomplete suggestions
  • #t” literal (or maybe just “#”)
    • when linking to file: … attempts to transclude (in preview) title / h1 / first line / filename, precedence according to this request
    • |#t” added to link to specific header “[[filename#some-header|#t]]” transcludes corresponding header only, without showing current "filename > " prefix.
  • search text” is literal text typed by user.

If this existing concise syntax is not desired for some reason then alternatively syntax used in templates could be used.


Related existing functionality: aliases

  • For start, it should be easy to recognize “title” in yaml header and treat it as one of aliases.
6 Likes