Skip to content → Skip to footer →

Note title’s source of truth - Filename vs. H1 vs. Frontmatter


1PAGE 389 words last modified 25 days ago
🌱 stub This note is a stub.
☑️ terms Terms of Service
By reading, you agree to the site's Terms of Service — TL;DR: doubt and fact-check everything I've written!

There are three different places to declare a note’s title.

  1. 📄 #Filename on the file system (Note Title.md)
  2. #️⃣ #Heading 1 (# Note Title)
  3. 🗃️ #Frontmatter (title: 'Note Title')
// '📄 Filename.md'
---
title: '🗃️ Frontmatter Title'
---
# #️⃣ Heading 1

Lorem ipsum....

They each have their pros and cons, things to consider from an Obsidian markdown perspective, also depending on your workflow.

Using notes in Obsidian

Seems like Obsidian primarily prefers note tiles to be in 📄 Filenames.

  • In the Obsidian note editor space
    • [p] Of course, #️⃣ Heading 1 will show up
    • [p] Obsidian enables (and recommends) Inline Title (direct 📄 Filename) by default
      • back then, we didn’t have this!
    • [c] 🗃️ Frontmatter titles won’t show up at all
  • 📄 Filename is the only title used by Obsidian’s Quick Switcher
    • If you are using the two other methods, you can get around this by putting your title in aliases frontmatter property also
  • Obsidan Bases (and Dataview)
    • [p] You can easily grab 📄 file.name and 🗃️ Frontmatter properties
    • [c] But you can’t1 extract the #️⃣ Heading 1
  • Some markdown specs prefer only one #️⃣ Heading 1 in your note
    • The Excalidraw plugin creates a H1 to store data in your note

Seems like Obsidian prefers and recommends using 📄 Filename note titles.

Using notes outside Obsidian

Publishing notes (to the web)

  • Not familiar about Obsidian Publish’s system

Filename on the file system

  • [c] Has the most restricted Safe character set for note titles
  • [c] When converting to HTML for web publishing, you’ll need an extra step to extract and insert the title as Heading 1 at the top of the document

Heading 1

  • [p] Shows up in your editor/prose
  • [c] You need to make sure you don’t have

Frontmatter

  • [c] When converting to HTML for web publishing, you’ll need an extra step to extract and insert the title as Heading 1 at the top of the document

Daily Notes

  • I want my daily notes to be alphanumerical sorted in the filesystem.
  • I want a human-readable title like “10 Mar 2026” but this date format is not alphanumerically sortable (“10 Mar 2026” would come before “2 Mar 2026”)
  • So I maintain two separate file titles
    • On the filesystem, they are of the date format YYYY-MM-DD.md.
    • In the Heading 1, they are of the date format # {{date: D MMMM YYYY, dddd}}
      • I like to keep the day of the week in the note’s Heading 1
    • but I also have frontmatter alias of the format aliases: {{ DATE:D MMMM YYYY }}, so I can query the Quick Switcher with something like 20 Mar

Footnotes

  1. You could parse the markdown… but that’s way too complex