Frontmatter Cleaner

by sharfaroz
5
4
3
2
1
Score: 50/100

Description

Notes accumulate stray frontmatter properties over time: leftovers from templates, one-off experiments, plugin residues or fields you no longer use. Frontmatter Cleaner gives you a single tap-friendly list of the current note's properties so you can pick the ones to remove and delete them in one action.

Reviews

No reviews yet.

Stats

0
stars
100
downloads
0
forks
63
days
29
days
29
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
16
commits

Latest Version

a month ago

Changelog

1.2.1 Bug fix update.

README file from

Github

Frontmatter Cleaner

Quickly review and remove frontmatter (YAML) properties from the note you're currently viewing — without opening the YAML block and editing it by hand.

Usage

  1. Open the note you want to clean up.
  2. Run Clean frontmatter properties of current file from the command palette, or click the list-checks icon in the ribbon.
  3. A modal lists every property in that note's frontmatter, with its current value shown alongside it.
  4. Tap or click anywhere on a row — not just the checkbox — to select it for deletion. Selected rows are highlighted.
  5. Use the toolbar above the list to select faster: Select all, Select none, or Empty (n) — which catches blank strings, null, and empty lists/objects. The Empty button is disabled when there's nothing of that kind to select.
  6. Select Delete selected (n) to remove those properties from the note's frontmatter, or Cancel to close without changes.

Non-destructive deletion

Instead of discarding removed properties, you can keep a record of them written into the note itself:

  1. In the modal, check "Keep a record instead of just deleting".
  2. Choose a format:
    • Markdown table
    • property: value
    • property:: value (Dataview inline field syntax)
  3. Choose a location:
    • Top of note
    • Bottom of note
    • Under a heading — the heading text and level are configured once in the plugin's settings tab, and the plugin creates that heading if it isn't already in the note.

Your last-used format and location are remembered as the new defaults. Go to Settings → Frontmatter Cleaner to set the heading text/level, or to have "Keep a record" pre-checked every time the modal opens.

Both the property list and the record options work the same way on desktop and mobile; rows use a 44px minimum touch target so they're easy to tap accurately on iPhone.

Notes

  • Frontmatter edits use Obsidian's own processFrontMatter API, so the rest of the frontmatter block keeps its existing formatting and order.
  • If a note has no frontmatter, the modal tells you instead of showing an empty list.

License

MIT