Metadata/Frontmatter of current note in Obsidian

Get the metadata or the frontmatter of the currently open note in Obsidian plugin development. This uses the Obsidian metadata cache.

const noteFile = this.app.workspace.getActiveFile(); // Get the currently Open Note
const metadata = this.app.metadataCache.getFileCache(noteFile);
Author: Binny V A
A philosopher programmer who specializes in backend development and stoicism.

Leave a Reply

Your email address will not be published. Required fields are marked *