Use H1 or front-matter title instead of or in addition to filename as display name

Excellent request! I would like Quick Switcher to search for the first heading of a file. It would help me quickly recall and select a UID-only filename without leaving the keyboard and the current note or thought I’m processing.

  • Maybe Settings has a toggle on/off feature for the heading search?
  • In regards to performance issues, maybe limit the search to the first heading? After selecting the file, the remaining headings can be displayed for the selected file instead of scanning every heading in the vault during the initial command?

I want to use a clean UID filename without relying on folders, but I need to find the first heading in my notes, which is the title. For now, I’m putting these UID-only files in folders with their title, so I can find them.

3 Likes

I would love this. If this were implemented and we could still sort the file explorer by actual note title while displaying the frontmatter title, it would solve the problem I’ve detailed here: Retaining the benefits of Luhmann's numbering system without damaging key Obsidian functionality?

1 Like

Excellent suggestion

Yes we need this! Is there any way we can contribute and help create these features?

3 Likes

This is extra relevant to me today since I started setting up templates for various types of media which I reference a lot in the course of my notes. (Creating intermediate nodes which act as touch points for references is something I do quite a bit.)

Because a lot of that media consists of tabletop role-playing games, you find a lot of use of colons in the title – which obviously can’t be used directly as filenames. I make it a definite habit to make an H1 “this is the real title of this thing” entry in every one. Of course, every reference requires in-line aliasing, every time it’s referred to – and that can pile up a lot if I’m using a zettelkasten style to get notes down and then make references in those notes to the media note to localize things.

I would love this feature. My personal preferences would be:

  • include both zettel id and title in the front-matter
  • still offer an option to sort notes by front-matter zettel id in Obsidian’s file explorer
  • file names would be “legalized” version of front-matter title

For example:

---
zettel id: 202009010800
title: Illegal file names: they work too!
---
# H1 heading

The displayed note title in Obsidian editor and graph views would be Illegal file names: they work too!, while the actual file name on the system hard disk would be something like Illegal file names_ they work too!.

This way, zettel IDs no longer appear in graph views or the system file names, which makes it much less cluttered when using the graph views or viewing the notes from other apps.

8 Likes

This would be essential for my workflow!

2 Likes

I realize that I never replied here, but this would also greatly improve my workflow.

1 Like

One thing that would be nice: to use the selected filename as a default title on note creation! The first time user renames a note from “Untitiled” to “FooNote”, Obsidian could simply insert “# FooNote” in the empty text. Thereafter, the user could just remove or revise it, but still better to start with something

5 Likes

iA Writer also shows a text excerpt below the filename:

Screenshot 2020-10-18 at 13.03.32

1 Like

And the date!

This is crucial for me. I’m coming from Bear background and I have imported all my Bear notes to the Obsidian. The good thing about Bear was that I didn’t need to care about filename or anything like that – note was simply named after the first h1 heading. The most often I simply need to quickly jot something down and link it with some other concepts; the title is an afterthought. I liked to include certain characters ("?", “:”, etc.) and emojis in note titles to visually distinguish them, but these do not work nicely with filesystems’ filename constraints. Ideally (in my workflow), filenames should be only unique timestamps and the title itself would be sourced from the file itself (either title frontmatter field or h1). The question is, however, how internal links would behave – would they point to the filename or to the title?

I actually think that this front-matter idea, if properly generalized, could open a wide range of possibilities and new workflows. They could be extracted, aggregated, queried etc. It would enable one to treat their notes more like database records. For example, I store created timestamp in front-matter field and sometimes I need to sort my notes according to that. But that is outside the scope of this thread.

1 Like

Can this be approximated with the new command to autocomplete using headings after ##?

I skimmed above to see if this was said already, but a cool setting would be if we could specify some kind of parametric display name using a template.

So basically it would default to the file name, but templates can be something like {title} {date_created} or {first_h1} | {date_created} or something to that effect.

1 Like

Into whatever direction this will go, the solution should not make the use of a yaml header mandatory. The current way it works is amazing exactly because it uses the information you have to give in any case (the filename) and reuses in at several occasions. I like it because it is simplistic and sets a low barrier within the workflow. Thus, what I like to see is the optional use of information from the yaml header in case it exists and a default mode that works just the way it works now.

5 Likes

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.
3 Likes

+1 I would appreciate if the graph view could toggle between the real file name as the node name and one, or any, of the following:

aliases: myalias (from the front matter yaml)
title: mytitle (from the front matter yaml)
# My H1 Title (actual, markdown title)`

I think my personal preference is aliases if there can be only one, as I currently use this to make UID links more friendly in all my notes, where I find title to be redundant as I always include a “# title” in my notes, and any given note will only ever have one “#” level heading. I am unsure if title: is used by any core functionality at this time, but I find it redundant. So aliases is just my selfish pick.

Any of these would potentially make the graph useful for those using meaningless UIDs in zettlekasten style.

Also, thank you, Obsidian is awesome software.

3 Likes

Absolutely agree with that. For instance, through a setting could be used the first (or unique) alias to be shown at graph instead of UIDs And when alias is not present, then show UID (note name) as always.

BUT maybe using a Title field in YAML would add compatibility with Zettlr, for instance.

If I had to choose one, I would take Title method for compatibility aspects.

This is the only pending point that is stopping me to start dumping all my notes to Obsidian.

2 Likes

Show [first header found in a file] next-to an ID-only-filename

Add options to show [first header found in a file] [next-to or instead-of] a filename:

  • In top bars above the page, or in vertical bars in Andy Matuschak mode (plugin).
  • In File Explorer
  • In Graph View
  • list of ‟Starred” files

Position of the header might be limited to first line if unrestricted search for header in large files is infeasible.

purpose:
Allow naming files using only concise permanent ID,
while seeing (showing to user) up-to-date human readable description in all appropriate places.

consequences of not having titles in filename:

  • Edit filename any time using any software (not only Obsidian) without breaking links.
  • Avoid need to change all links when title is changed and therefore reduce number of versions created by automatic backup systems.
  • Eliminate risk of exceeded maximum length of a pathname in some file systems.
  • Title can contain characters not permitted in filename, including forward slash.
  • Make markdown more concise/readable by using [[ID|note title]] instead of [[ID note title|note title]].

keywords: addressing, ID, zettelkasten

EDIT:
I found, it was already requested in Use H1 or front-matter title instead of or in addition to filename as display name
Related feature request: Show title of Zettelkasten notes in graph view

7 Likes

+1 to this!

1 Like