Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Tidy YAML

NameIsKyroNameIsKyro56 downloads

Keep YAML tidy by showing, collapsing, or hiding frontmatter.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

Tidy YAML is a simple Obsidian community plugin for hiding or collapsing YAML frontmatter without changing note contents.

  • Click the left-ribbon eye to hide or unhide YAML in the current file.
  • Click the YAML strip above a note's frontmatter to collapse or expand that file.
  • Use six direct commands for current-file toggles or deterministic vault-wide actions.

The plugin works in Source mode, Live Preview, and Reading view. It leaves Obsidian's separate Properties sidebar unchanged.

How it works

Every valid leading YAML block has one of three display states:

  • Shown: YAML is visible and the strip points down.
  • Collapsed: YAML is replaced visually by the strip, which points right.
  • Hidden: Both the YAML and strip are hidden.

Hiding remembers whether the file was Shown or Collapsed and restores that state when it is unhidden. File states are saved by vault-relative path, moved when files or folders are renamed, and removed when they are deleted.

The interface deliberately has only two visible controls:

Control Scope Action
Left-ribbon indicator Current file Hide or show YAML; clearly reports visible, hidden, or absent YAML
YAML strip Current file Collapse or expand YAML

The strip is a full-width keyboard-accessible button with a clear hover state, focus outline, tooltip, and expanded/collapsed ARIA state.

Commands

Open the command palette with Command/Ctrl + P. These six commands are always available and can be assigned hotkeys:

  • Tidy YAML: Hide all
  • Tidy YAML: Show all
  • Tidy YAML: Collapse all
  • Tidy YAML: Expand all
  • Tidy YAML: Collapse/expand this file
  • Tidy YAML: Hide/show this file

The four all commands set a definite vault state and clear saved file states so every note follows the command. The two current-file commands save only that file's state.

Source safety

Tidy YAML never edits YAML or Markdown. It uses CodeMirror decorations and view-scoped CSS to change presentation only. Notes with absent, malformed, unclosed, or non-leading YAML are left untouched, and current-file commands show a notice when there is no valid frontmatter.

Shown mode respects Obsidian's Settings → Editor → Properties in document setting. Select Visible or Source there if Obsidian's own Hidden setting prevents frontmatter from appearing. See Obsidian's Properties documentation.

Installation

Community Plugins

After the plugin is accepted into the Obsidian community directory:

  1. Open Settings → Community plugins → Browse.
  2. Search for Tidy YAML.
  3. Select Install, then Enable.

Manual installation

  1. Download or build main.js, manifest.json, and styles.css.
  2. Create <vault>/.obsidian/plugins/frontmatter-visibility/.
  3. Copy those three files into the new folder.
  4. Reload Obsidian and enable Tidy YAML under Community plugins.

For a local build:

npm ci
npm run build:release

The three ready-to-copy files will be in release/.

Settings

The settings page contains only:

  • The vault default: Shown, Collapsed, or Hidden.
  • The number of saved file states and a confirmed reset action.
  • Obsidian Properties compatibility guidance.

Upgrading from 1.x preserves the vault default and valid per-file states. Removed ribbon, status-bar, and editor-chevron settings are discarded automatically.

Development

Node.js 20 or newer is required.

npm ci
npm run dev
Command Purpose
npm run typecheck Check TypeScript without emitting files
npm run lint Run ESLint and Obsidian plugin rules
npm test Run the Vitest/JSDOM suite
npm run build Typecheck and create a production main.js
npm run verify Run typecheck, lint, tests, build, and metadata checks
npm run build:release Refresh exactly three files in release/

See CONTRIBUTING.md and the manual testing checklist.

Releasing

Tags must exactly match manifest.json without a v prefix.

npm version patch --no-git-tag-version   # or minor / major
# Update CHANGELOG.md before committing the release.
npm run verify
npm run build:release
git add package.json package-lock.json manifest.json versions.json CHANGELOG.md
git commit -m "chore: prepare version 2.1.1"
git tag 2.1.1
git push origin main
git push origin 2.1.1

Replace 2.1.1 with the version produced by the bump. The version lifecycle updates manifest.json and versions.json. A matching tag without a v prefix runs verification and creates a GitHub release containing exactly main.js, manifest.json, and styles.css.

For repository details, commit-message examples, and ready-to-copy 2.1.0 release notes, see GITHUB_RELEASE.md.

For the first Community Plugins submission, publish a GitHub release, then sign in at community.obsidian.md, connect your GitHub account, and add the repository under Plugins → New plugin. Follow the official submission and release requirements.

Privacy and safety

The plugin works locally, makes no network requests, and never edits frontmatter or note contents. Its data.json stores only the vault display preference and path-based file states.

License

MIT

HealthExcellent
ReviewSatisfactory
About
Hide or collapse YAML frontmatter per-file or vault-wide without changing note contents, using a left-ribbon eye to hide/unhide and a full-width strip to collapse/expand. Use six commands for current-file or vault-wide show/hide/collapse/expand actions, preserve file states, and keep notes unchanged while working in Source, Live Preview, and Reading view.
PropertiesInterface
Details
Current version
2.1.0
Last updated
2 weeks ago
Created
2 weeks ago
Updates
1 release
Downloads
56
Compatible with
Obsidian 1.13.7+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
NameIsKyroNameIsKyronameiskyro
GitHubnameiskyro
  1. Community
  2. Plugins
  3. Properties
  4. Tidy YAML

Related plugins

Meta Bind

Make your notes interactive with inline input fields, metadata displays, and buttons.

Front Matter Title

Define a title in frontmatter to be displayed as the filename.

Advanced Canvas

Supercharge your canvas experience. Create presentations, flowcharts and more.

Hider

Hide interface elements such as tooltips, status bar, titlebar, and more.

Note Toolbar

Add customizable toolbars to your notes.

Editing Toolbar

The Editing Toolbar is modified from cMenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.

Agent Client

Chat with Claude Code, Codex, Gemini CLI, and more via the Agent Client Protocol — right from your vault.

Hover Editor

Transform the Page Preview hover popover into a fully working editor instance.

Commander

Customize your workspace by adding commands everywhere, create macros and supercharge your mobile toolbar.

Update modified date

Automatically update a frontmatter modified date field when the file is modified.