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
421
downloads
0
forks
184
days
196
days
196
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/.
Recent Files
6 years ago by Tony Grosinger
Display a list of most recently opened files
Linter
5 years ago by Victor Tao
An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
Admonition
5 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.
Metadata Menu
4 years ago by mdelobelle
For data management enthusiasts : type and manage the metadata of your notes.
Better Export PDF
3 months ago by l1xnan
Obsidian PDF export enhancement plugin
Pretty Properties
a year ago by Anareaty
Custom Frames
4 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.
Auto Card Link
4 years ago by Nekoshita Yuki
Update time on edit
5 years ago by beaussan
Force note view mode
5 years ago by Benny Wydooghe
Snipd Official
4 months ago by snipd-app
Front Matter Title
4 years ago by Snezhig
Plugin for Obsidian.md
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.
April Automatic Timelines
3 months ago by april-gras
Simple timeline generator plugin for story tellers using obsidian
Sheets Extended
3 years ago by NicoNekoru
Plugin that adds features to tables in obsidian including merging, vertical headers, and custom css
Update frontmatter modified date
3 years ago by Alan Grainger
Automatically update a frontmatter/YAML modified date field
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.
Life Tracker
4 months ago by Sébastien Dubois
Capture and visualize the data that matters in your life
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
Base Board
4 months ago by mderazon
Kanban Plugin For 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.
Banners Reloaded
6 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
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.
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.
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.
Toggle Meta Yaml
4 years ago by hua
Media Companion
2 years ago by Nick de Bruin
Conditional Properties
8 months ago by Diego Eis
Automate frontmatter property updates in your Obsidian notes using simple conditional rules.
Metadata Auto Classifier
2 years ago by Beomsu Koh
AI-powered Obsidian plugin that automatically classifies and generates metadata (tags, frontmatter) for your notes.
Base Tag Renderer
4 years ago by Darren Kuro
A lightweight obsidian plugin to render the basename of tags in preview mode.
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.
Notes dater
3 years ago by Paul Treanor
Adds created_on and updated_on dates of the active note to status bar
Bulk Exporter
3 years ago by symunona
Bulk export Markdown filtered, renamed and sorted by front matter metadata into a new structure.
Update Time
2 years ago by Sébastien Dubois
Obsidian plugin that updates front matter to include creation and last update times
Kanban Status Updater
a year ago by Ankit Kapur
Obsidian plugin that automatically updates the note property when card is moved to a column.
FuzzyTag
4 years ago by Adrian
Linked Data Vocabularies
3 years ago by kometenstaub
Add linked data to the YAML of your Obsidian notes.
Bases Toolbox
2 months ago by Grub Basket
Adds Quality of Life features to Obsidian Bases
Frontmatter Alias Display
3 years ago by muhammadv-i
A plugin for Obsidian.md to show front-matter aliases as display names in the file menu.
Add an ID to the front matter
3 years ago by llimllib
Frontmatter generator
3 years ago by Hananoshika Yomaru
A plugin for Obsidian that generates frontmatter for notes
Note aliases
4 years ago by Pulsovi
This plugin manages wikilinks aliases and save them on the aliases list of the linked note
File Title Updater
2 years ago by wenlzhang
An Obsidian plugin that synchronizes titles between filename, frontmatter, and first heading in your notes.
Auto Front Matter
3 years ago by conorzhong
Additional Icons
3 years ago by Matthew Turk
Add additional iconsets to Obsidian
Open Related Url
4 years ago by Dan Pickett
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.
Testing Vault
3 years ago by Michael Pedersen
KoReader Highlight Importer
2 years ago by Tahsin Kocaman
Imports highlights and metadata from KoReader into Obsidian notes
Copy Metadata
3 years ago by wenlzhang
An Obsidian plugin to copy metadata to clipboard and insert it into file name.
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.
Checkbox styling helper
2 years ago by JaewonE
Render theme-independent SVG icon bullets from plain Markdown markers.
Sort Frontmatter
3 years ago by Kanzi
Sort frontmatter automatically
Dataview Autocompletion
2 years ago by Daniel Bauer
Bulk Tag Manager
a month 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.
GitHub Integration
a year ago by Kirill Zhuravlev
Plugin that fetch your github stars into notes
LLM Tagger
2 years ago by David Jayatillake
Image Metadata
2 years ago by alexeiskachykhin
Adds image metadata editing capabilities to Obsidian
YAML Table
a year ago by dainakai
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.
CSS Inserter
2 years ago by Erika Gozar
Inserts user-defined css snippets into the selected text.
Paste Image Into Property
2 years ago by Nito
Book Clipper
9 months ago by Hossein Fardmohammadi
Save book details from websites into your notes
Tailwind Snippet
2 years ago by Nicholas Wilcox
An Obsidian plugin that enables usage of Tailwind CSS.
Virus Total Enrichment
2 years ago by ytisf
An Obsidian plugin to enrich a note with VirusTotal API.
Note Codes
a year ago by Ezhik
Reference your Obsidian notes from anywhere with simple 4-character codes.
Auto Move File
13 days ago by sx kan
Automatically move files based on frontmatter properties in Obsidian
Connections
8 months ago by Eric Van Cleve
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.
Metadata Validator
25 days ago by flowing-abyss
Manifest-driven metadata validation for Obsidian.
Source Mode Styling
7 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.
Boardgame Search
2 years ago by Marlon May
A plugin to create notes for boardgames based on the BGG API
Papers
a year ago by William Liang
An obsidian plugin to retrieve and import research papers.
Note Favicon
2 years ago by mdklab
Obsidian plugin – Show Favicon from Metadata
Update Time Updater
2 years ago by MURATAGAWA Kei
Obsidian plugin to update the 'update time' element when saving or manually.
Template Folder
a year ago by LucasOe
Obsidian plugin to move notes to a folder when applying a template.
ExMemo Assistant
2 years ago by ExMemo AI
Using LLMs to manage files and generating metadata such as tags and summaries.
Current File Tags
2 years ago by Trung Tran
Gantt this
a month ago by Altarok
Obsidian plugin showing multiple TTRPG calendars at once in one gantt chart.
Draft Indicator
2 years ago by Brian Boucheron
Show draft status with ✎ icons in the Obsidian file explorer.
Publish Note to Mowen Note
a year ago by ziyou
This is a mowen plugin for Obsidian (https://obsidian.md)
Simple File Info
a year ago by Lukas Capkovic
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)
Watched-Metadata
2 years ago by Nail Ahmed
Watches for changes in metadata and updates the note content accordingly.
Another Name
a year ago by Jiyuan Wang
Add a subheading to your note in Obsidian
Xyls Starmap
a month ago by xylhazlhztarr
A small little plugin for Obsidian MD to create interactive star system maps inside the note-taking app.
Property Panels
2 months ago by Eva Chen
Display and edit Obsidian frontmatter properties in configurable panels that stay inside the note's scrollable content.
Discrete
a year ago by shkarlsson
Onto Tracker
2 years ago by Jacob Hart
Plugin for obsidian allowing project management with ontologies.
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
MD Butler
a month ago by Peter Petschownik
Automatically manages YAML frontmatter fields for all notes. A reliable alternative to Templater formulas for consistent metadata.
Title-Only Tab
a year ago by tristone13th
a plugin of obsidian for to change showing tab name to short
Note Types
a month ago by jsmorabito
PixNote
a month ago by Sofia Milton
Path in tab title
4 months ago by d9k
Insert Arknights URL Banner
a year ago by Rerurate_514
Obsidianのプラグイン、img_dwnldr_wikigg_ak_ktに保存されている画像を選択してbannersプロパティに簡単に設定できるプラグイン
Trade Rythm
10 days ago by iblameaza
Trade Rythm - Obsidian trading journal plugin