Skip to content

zackszhu/Obsidian-Auto-Title-Plugin

Repository files navigation

Auto Title Plugin for Obsidian

Automatically sets or updates the YAML title field of your Markdown notes based on the filename. Includes options for manual command, auto-title on save, and folder exclusions.

Features

  • Set YAML title to filename: Adds or updates the title field in your note's YAML frontmatter to match the filename (without extension).
  • Auto-set on save: Optionally updates the title automatically every time you save a note.
  • Exclude folders: Specify folders (one per line) where notes should NOT be auto-titled.
  • Manual command: Run the "Set YAML title to filename" command from the command palette for one-off updates.

Settings

Open the plugin settings in Obsidian to configure:

  • Auto-set title on save: Toggle to enable or disable automatic title updates when saving.
  • Excluded folders: Enter one folder path per line (e.g., Templates/ or Archive/). Notes in these folders will be ignored by the auto-title feature.

Usage

  1. Enable the plugin in Obsidian settings.
  2. (Optional) Open plugin settings to enable "Auto-set title on save" and/or specify excluded folders.
  3. Manual command: Open the command palette and run "Set YAML title to filename" on the active note.
  4. Automatic: If enabled, just save your note—if it doesn't already have a title (and isn't in an excluded folder), the plugin will set it for you.

Example

Suppose you have a note at Notes/Project Plan.md with this content:

---
date: 2025-06-21
---

# Project Plan
Details...

After saving (with auto-title enabled), it will become:

---
title: Project Plan
date: 2025-06-21
---

# Project Plan
Details...

Installation

  1. Copy main.js, manifest.json, and (optionally) styles.css to your vault's .obsidian/plugins/auto-title/ folder.
  2. Reload Obsidian and enable the plugin.

Development

  • Clone the repo into your .obsidian/plugins/auto-title/ folder.
  • Run npm install and npm run dev to build in watch mode.
  • Edit main.ts and reload Obsidian to test changes.

Feedback & Issues

If you encounter bugs or have feature requests, please open an issue on the repository.


Enjoy seamless YAML title management in your Obsidian vault!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published