Frontmatter to HTML Attributes

by Tarek Saier
5
4
3
2
1
Score: 50/100

Description

The Frontmatter to HTML Attributes plugin exposes a note's YAML frontmatter in the page HTML as data attributes, so you can target notes with CSS instead of relying on manual classes or fixed layouts. Each frontmatter key becomes a matching data-* attribute on the note container, which makes metadata driven styling straightforward for titles, headings and other interface elements. It also shows how tags can be matched with attribute selectors, which is useful when you want styles to react to note categories. Lists and objects are converted to JSON while other values become plain strings, so the output stays predictable.

Reviews

No reviews yet.

Stats

5
stars
742
downloads
0
forks
229
days
241
days
241
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
3
commits

README file from

Github

Frontmatter to HTML Attributes

An Obsidian plugin that makes a note’s YAML frontmatter available in HTML as data-* attributes for metadata based CSS styling.

Examples

With the plugin installed, you can use CSS snippets like below

  1. Display an island icon with the title of every note tagged "travel".
    div.workspace-leaf-content[data-tags*='"travel"'] div.inline-title:after {
      content: " \1F3DD\FE0F"; /** 🏝️ */
    }
    
  2. Underline headings in notes with the "sections" attribute checked.
    div.workspace-leaf-content[data-sections="true"] .HyperMD-header-1, /** editing mode */
    div.workspace-leaf-content[data-sections="true"] h1 { /** reading mode */
      border-bottom: dashed 2px var(--interactive-accent); 
    }
    

Usage

For every item in the YAML frontmatter <foo>, an equivalent attribute data-<foo> is added to the note’s HTML container div.workspace-leaf-content. To style notes based on these attributes, create CSS snippets using attribute selectors.

To match a YAML frontmatter item XXX with value YYY, create a CSS rule for the attribute data-XXX like below.

div.workspace-leaf-content[data-XXX="YYY"] /** additional selectors */ {
  /** styling */
}

To match a tag, use *= instead of = and add quotes, as shown below.

div.workspace-leaf-content[data-tags*='"YYY"'] /** additional selectors */ {
  /** styling */
}

Data types

Lists and objects will be turned into JSON, everything else into a simple string.

For example, a note with a YAML frontmatter

---
tags:
  - travel
  - asia
start: 2025-10-27
end:
insurance: true
---

will be rendered in a container with data attributes as follows.

<div
    class="workspace-leaf-content"
    data-tags='["travel","asia"]'
    data-start="2025-10-27"
    data-end="null"
    data-insurance="true"
>
    <!-- content -->
</div>

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Dataview
6 years ago by Michael Brenan
A data index and query language over Markdown files, for https://obsidian.md/.
Linter
5 years ago by Victor Tao
An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
Recent Files
6 years ago by Tony Grosinger
Display a list of most recently opened files
Admonition
6 years ago by Jeremy Valentine
Adds admonition block-styled content to Obsidian.md
Meta Bind Plugin
4 years ago by Moritz Jung
A plugin for Obsidian to make your notes interactive with inline input fields, metadata displays, and buttons.
Better Export PDF
5 months ago by l1xnan
Obsidian PDF export enhancement plugin
Pretty Properties
a year ago by Anareaty
Metadata Menu
4 years ago by mdelobelle
For data management enthusiasts : type and manage the metadata of your notes.
Custom Frames
5 years ago by Ellpeck
An Obsidian plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.
Code Styler
3 years ago by Mayuran Visakan
A plugin for Obsidian.md for styling codeblocks and inline code
Supercharged Links
5 years ago by mdelobelle
obsidian plugin to add attributes and context menu options to internal links
Custom File Explorer sorting
4 years ago by SebastianMC
Take full control over the order and sorting of folders and notes in File Explorer in Obsidian
MetaEdit
5 years ago by Christian B. B. Houmann
MetaEdit for Obsidian
Contextual Typography
6 years ago by mgmeyers
Completr
5 years ago by tth05
Auto-completion plugin for the obsidian editor.
Front Matter Title
4 years ago by Snezhig
Plugin for Obsidian.md
Auto Card Link
5 years ago by Nekoshita Yuki
Media DB Plugin
4 years ago by Moritz Jung
A plugin that can query multiple APIs for movies, series, anime, games, music and wiki articles, and import them into your vault.
Snipd Official
6 months ago by snipd-app
Update time on edit
5 years ago by beaussan
Force note view mode
5 years ago by Benny Wydooghe
Sheets Extended
3 years ago by NicoNekoru
Plugin that adds features to tables in obsidian including merging, vertical headers, and custom css
April Automatic Timelines
5 months ago by april-gras
Simple timeline generator plugin for story tellers using obsidian
Update frontmatter modified date
3 years ago by Alan Grainger
Automatically update a frontmatter/YAML modified date field
Life Tracker
5 months ago by Sébastien Dubois
Capture and visualize the data that matters in your life
Featured Image
2 years ago by Johan Sanneblad
Obsidian plugin to automatically set a featured image property in your notes based on the first image, YouTube link, or Auto Card Link image found in your document. This allows you to create rich note galleries using Folder Notes and Dataview.
TTRPG UI Toolkit
24 days ago by hay-kot
UI elements for building dnd character sheets and DM notes
Base Board
5 months ago by mderazon
Kanban Plugin For Obsidian
Frontmatter Tag Sugest
5 years ago by Jonathan Miller
Autocompletes tags in Obsidian YAML frontmatter. No more deleting #!
Metadata Extractor
5 years ago by kometenstaub
Obsidian Plugin that provides metadata export for use with third-party apps.
Markdown Attributes
5 years ago by Jeremy Valentine
Add attributes to elements in Obsidian
Simple Banner
a year ago by Sandro Ducceschi
Visually enhance your Obsidian notes with a customizable banner. Supports icons and time/date display.
Frontmatter Markdown Links
2 years ago by mnaoumov
Obsidian Plugin that adds support for markdown links in frontmatter
AI Tagger Universe
2 years ago by Hu Nie
An intelligent Obsidian plugin that leverages AI to automatically analyze note content and suggest relevant tags, supporting both local and cloud-based LLM services.
Front Matter Timestamps
2 years ago by LighthouseDino
Track note created and modified times in front matter, kept up to date automatically.
Fold Properties By Default
2 years ago by Tommy Bergeron
Always have editor/metadata properties folded by default.
Current View
a year ago by Lucas Ostmann
Automatically set the view mode (Reading, Live Preview, Source) for notes in Obsidian using folder rules, file patterns, or frontmatter.
Banners Reloaded
7 months ago by Dani García
Banners Reloaded offers a simple, fast, and lightweight way to add beautiful and customizable banners to your Obsidian notes. Designed for performance, it gives you powerful control over your vault's appearance through an intuitive interface. Set banners globally, by tag, or override them on any individual note.
Binary File Manager
5 years ago by qawatake
An Obsidian plugin to manage binary files
Markdown Tags
2 years ago by John Smith III
Enhance your Markdown documents with custom tags. Use predefined or custom labels, customizable colors, and arrow indicators to visually track tasks and statuses.
NetClip
2 years ago by Elhary
this plugin is for Obsidian that allows you to browse the web and clip webpages directly into your vault.
Objects
2 months ago by Finn
Conditional Properties
10 months ago by Diego Eis
Automate frontmatter property updates in your Obsidian notes using simple conditional rules.
Custom Classes
4 years ago by Lila Rest
A minimal Obsidian plugin that allows you to add your own HTML classes to chosen Markdown elements directly from your notes.
Auto Tag
3 years ago by Control Alt
Easily generate relevant tags for your Obsidian notes.
Media Companion
2 years ago by Nick de Bruin
Toggle Meta Yaml
4 years ago by hua
Metadata Auto Classifier
2 years ago by Beomsu Koh
Obsidian plugin that uses AI providers to generate tags and frontmatter metadata for your notes.
Bases Toolbox
3 months ago by Grub Basket
Adds Quality of Life features to Obsidian Bases
Bulk Exporter
3 years ago by symunona
Bulk export Markdown filtered, renamed and sorted by front matter metadata into a new structure.
Metadata Icon
3 years ago by Benature
change metadata entry icon
Content Cards
2 years ago by leo
Insert content cards in Markdown, such as timeline, highlightblock, target card, book information card, music information card, movie information card, photoes ablum, business card, content subfield, countdown, SWOT,BCG.
Frontmatter generator
3 years ago by Hananoshika Yomaru
A plugin for Obsidian that generates frontmatter for notes
Update Time
2 years ago by Sébastien Dubois
Obsidian plugin that updates front matter to include creation and last update times
Base Tag Renderer
4 years ago by Darren Kuro
A lightweight obsidian plugin to render the basename of tags in preview mode.
Notes dater
3 years ago by Paul Treanor
Adds created_on and updated_on dates of the active note to status bar
Linked Data Vocabularies
3 years ago by kometenstaub
Add linked data to the YAML of your Obsidian notes.
Kanban Status Updater
2 years ago by Ankit Kapur
Obsidian plugin that automatically updates the note property when card is moved to a column.
Metadata Validator
2 months ago by flowing-abyss
Manifest-driven metadata validation for Obsidian.
KoReader Highlight Importer
2 years ago by Tahsin Kocaman
Imports highlights and metadata from KoReader into Obsidian notes
Open Related Url
4 years ago by Dan Pickett
FuzzyTag
4 years ago by Adrian
Add an ID to the front matter
3 years ago by llimllib
Frontmatter Alias Display
4 years ago by muhammadv-i
A plugin for Obsidian.md to show front-matter aliases as display names in the file menu.
Auto Front Matter
3 years ago by conorzhong
Symbol linking
a year ago by Evan Bonsignori ; Mara-Li
Adds ability to link with any trigger in Obsidian. Each trigger can limit linking to specific folders or file.
File Title Updater
2 years ago by wenlzhang
An Obsidian plugin that synchronizes titles between filename, frontmatter, and first heading in your notes.
Note aliases
4 years ago by Pulsovi
This plugin manages wikilinks aliases and save them on the aliases list of the linked note
Bulk Tag Manager
3 months ago by ducktapekiller
A comprehensive utility to standarize the entire front matter. Features a dashboard for bulk renaming, enforcing casing rules (lowercase/uppercase), swapping separators (snake/kebab), and generating master tag lists.
Copy Metadata
3 years ago by wenlzhang
An Obsidian plugin to copy metadata to clipboard and insert it into file name.
Additional Icons
3 years ago by Matthew Turk
Add additional iconsets to Obsidian
Gantt this
3 months ago by Altarok
Obsidian plugin showing multiple TTRPG calendars at once in one gantt chart.
Book Clipper
a year ago by Hossein Fardmohammadi
Save book details from websites into your notes
Testing Vault
4 years ago by Michael Pedersen
GitHub Integration
a year ago by Kirill Zhuravlev
Plugin that fetch your github stars into notes
Checkbox styling helper
2 years ago by JaewonE
Render theme-independent SVG icon bullets from plain Markdown markers.
File Index
3 years ago by Steffo
Obsidian plugin to create a metadata file about the files present in the Vault
Note UID Generator
a year ago by Valentin Pelletier
Allow you to automatically generate UID for the notes in your vault.
CSS Inserter
2 years ago by Erika Gozar
Inserts user-defined css snippets into the selected text.
Connections
9 months ago by Eric Van Cleve
Sort Frontmatter
3 years ago by Kanzi
Sort frontmatter automatically
Source Mode Styling
9 months ago by Chris Howard
Obsidian plugin. Provides a customisable raw look in source mode using a monospace font to clearly differentiate from Live Preview.
Advanced Metadata Cache
a month ago by Michael Naumov
Maintains the vault indexes that are otherwise rebuilt on every call, and answers the built-in lookups from them, so backlinks come from an index instead of a fresh scan of every note.
Dataview Autocompletion
2 years ago by Daniel Bauer
Auto Move File
2 months ago by sx kan
Automatically move files based on frontmatter properties in Obsidian
DevOps Companion
a year ago by Jobelin Kom
Obsidian DevOps Companion is a developer-oriented plugin that brings DevOps context awareness directly inside your Obsidian vault.
Xyls Starmap
3 months ago by xylhazlhztarr
A small little plugin for Obsidian MD to create interactive star system maps and planet-side views inside the note-taking app.
YAML Table
a year ago by dainakai
My Thesaurus
2 years ago by Mara-Li
A plugin that auto tags file based on contents and a csv file or a Markdown table (inspired by https://github.com/pmartinolli/MyThesaurus)
Paste Image Into Property
2 years ago by Nito
LLM Tagger
2 years ago by David Jayatillake
Image Metadata
2 years ago by alexeiskachykhin
Adds image metadata editing capabilities to Obsidian
Note Types
3 months ago by jsmorabito
Tailwind Snippet
2 years ago by Nicholas Wilcox
An Obsidian plugin that enables usage of Tailwind CSS.
Another Name
a year ago by Jiyuan Wang
Add a subheading to your note in Obsidian
Update Time Updater
3 years ago by MURATAGAWA Kei
Obsidian plugin to update the 'update time' element when saving or manually.
Note Codes
a year ago by Ezhik
Reference your Obsidian notes from anywhere with simple 4-character codes.
Base Source Editor
a month ago by fronglemog
Edit the YAML source of a Base without leaving Obsidian.
Papers
a year ago by William Liang
An obsidian plugin to retrieve and import research papers.
Antigravity
2 months ago by ke yongcheng
Autonomous vault management, knowledge organization, and agentic intelligence powered by Google Antigravity (agy).
Vault Shelf
2 months ago by Lukas Proprentner
Your Obsidian vault as a browsable library: shelves of books built from titles, dates, people, tags, folders or any note property. Customizable to make it your own.
Sentinel
2 years ago by Giorgos Sarigiannidis
A plugin for Obsidian that allows you to update properties or run commands based on document visibility changes.
Simple File Info
2 years ago by Lukas Capkovic
Publish Note to Mowen Note
a year ago by ziyou
This is a mowen plugin for Obsidian (https://obsidian.md)
Mapa neuronal
2 months ago by Felipe Córdova
A graph that explains itself: your Obsidian vault as a layered neural map, with the reason each note links to the next.
MD Butler
3 months ago by Peter Petschownik
Automatically manages YAML frontmatter fields for all notes. A reliable alternative to Templater formulas for consistent metadata.
Ontomark
22 days ago by DreamLab AI
Offline ontology reasoning, SPARQL and reviewed frontmatter edits for Obsidian
Note Favicon
2 years ago by mdklab
Obsidian plugin – Show Favicon from Metadata
ExMemo Assistant
2 years ago by ExMemo AI
Using LLMs to manage files and generating metadata such as tags and summaries.
Virus Total Enrichment
2 years ago by ytisf
An Obsidian plugin to enrich a note with VirusTotal API.
Boardgame Search
2 years ago by Marlon May
A plugin to create notes for boardgames based on the BGG API
Draft Indicator
3 years ago by Brian Boucheron
Show draft status with ✎ icons in the Obsidian file explorer.
Template Folder
a year ago by LucasOe
Obsidian plugin to move notes to a folder when applying a template.
Notion Suite
2 months ago by craigstfn
Obsidian plugin: Notion-style databases, views, relations, rollups, charts and a / menu
Current File Tags
2 years ago by Trung Tran
Discrete
a year ago by shkarlsson
F2 Quick Rename
a month ago by 熊猫别熬夜
F2 to quick rename the current note, or an embedded note/image under the cursor (including wiki aliases and markdown image alt text).
Choreday
16 days ago by Paul Chiu
Obsidian plugin for tracking recurring household chores as plain-markdown notes, with a due list, one-tap done, snooze and skip, and a short history per chore.
Title-Only Tab
a year ago by tristone13th
a plugin of obsidian for to change showing tab name to short
Watched-Metadata
2 years ago by Nail Ahmed
Watches for changes in metadata and updates the note content accordingly.
Property Panels
3 months ago by Eva Chen
Display and edit Obsidian frontmatter properties in configurable panels that stay inside the note's scrollable content.
Path in tab title
6 months ago by d9k
Frontmatter Metadata Link Classes
a year ago by Varvara Zmeeva / zmeeva.io
Enhanced internal links with automatic classnames based on frontmatter metadata.
Hephaistos Importer
2 years ago by Skallaturi
Non-official plugin for importing characters from Hephaistos.online to Obsidian.md
Onto Tracker
2 years ago by Jacob Hart
Plugin for obsidian allowing project management with ontologies.
PixNote
2 months ago by Sofia Milton
Coherence Wizard
12 days ago by coherence-wizard
Obsidian Plugin With Powerful Tools For Creating Order and Coherence
Trade Rythm
2 months ago by iblameaza
Trade Rythm - Obsidian trading journal plugin
Insert Arknights URL Banner
a year ago by Rerurate_514
Obsidianのプラグイン、img_dwnldr_wikigg_ak_ktに保存されている画像を選択してbannersプロパティに簡単に設定できるプラグイン
Markdown Tasks
12 days ago by jsmorabito