obsidian-dataview
obsidian-dataview copied to clipboard
Support Markdown first heading as a metadata
It'll be great if the first heading in Markdown (followed by #
, typically at the top of file) can be treated as an inline metadata to be displayed in TABLE.
I organize my vault in a way that all the filenames are in lower-kebab-case-with-ascii-characters-only so that I can interact with them more comfortably in command line. These filenames, however, if displayed in a table would be difficult to read. Including the real title in the header would improve readability.
I can think of two ways to implement this feature:
- Solution A: Add a new implicit metadata
file.title
orfile.heading1
to represent the first heading of Markdown. - Solution B: If the key
title
is used, then treat the first heading as a fallback value for thetitle
if it's not set in the front matter (or anywhere else as inline metadata).
It doesn't have to search the whole file to find the title, looking at the first non-blank line after front matter would be sufficient.
On top of that, it'll be even better if we have an option to display [[file.name|file.title]]
instead of [[file-name]]
in the first column.
I was about to open the same feature request, glad I found this one before.
My use case is that I have hundred of notes with a timestamp as filename. It occured to me that it is weird to use a special syntax for the header given that Markdown has us covered there
There is a fix proposed in #2290
https://github.com/blacksmithgu/obsidian-dataview/issues/2290
Would this solve your problem?