Tab Title from H1 File Title

by Herbert Jones
5
4
3
2
1
Score: 50/100

Description

Obsidian plugin to change tab title to file h1 title

Reviews

No reviews yet.

Stats

0
stars
187
downloads
0
forks
58
days
58
days
58
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
21
commits

Latest Version

2 months ago

Changelog

Cleanup and optimization

README file from

Github

Tab Title from H1

An Obsidian plugin that renames the active tab to the note's first-level heading (# H1) instead of showing the filename.

If a note has an H1 that differs from its filename, the tab header displays the H1 text. This keeps tabs readable when your filenames are terse, dated, or kebab-cased but your notes carry a human-friendly title.

How it works

The plugin listens for workspace and metadata events (layout-change, active-leaf-change, file-open, vault rename, and metadata cache changed). On each event it looks up the active file's first H1 heading and, if one exists, sets the active tab header's text to that heading.

There are no settings — the behavior is automatic once the plugin is enabled.

Installation

Manually

  1. Build the plugin (see below) or download main.js and manifest.json from a release.
  2. Copy main.js and manifest.json into your vault at VaultFolder/.obsidian/plugins/tab-title-from-file-title/.
  3. Reload Obsidian and enable Tab Title from H1 File Title in Settings → Community plugins.

Development

  • Make sure NodeJS is at least v18 (node --version).
  • npm i to install dependencies.
  • npm run dev to start compilation in watch mode.
  • npm run build to produce a production build.
  • npm run lint to run ESLint.

The plugin source is a single file: src/main.ts.

License

MIT