Frontmatter to HTML Attributes

by Tarek Saier
5
4
3
2
1
Score: 35/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

stars
166
downloads
0
forks
48
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

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.
Add an ID to the front matter
3 years ago by llimllib
Additional Icons
2 years ago by Matthew Turk
Add additional iconsets to Obsidian
Admonition
5 years ago by Jeremy Valentine
Adds admonition block-styled content to Obsidian.md
AI Note Tagger
a year ago by Jasper Mayone
Auto tagging obsidian notes w/ AI
AI Tagger Universe
a year 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.
Another Name
a year ago by Jiyuan Wang
Add a subheading to your note in Obsidian
April's Automatic Timelines
3 years ago by April Gras
Simple timeline generator plugin for story tellers using obsidian
Auto Card Link
4 years ago by Nekoshita Yuki
Auto Front Matter
3 years ago by conorzhong
Auto Tag
3 years ago by Control Alt
Easily generate relevant tags for your Obsidian notes.
Banners Reloaded
2 months ago by Dani García
A simple, fast, and lightweight way to add customizable banners to your notes.
Base Tag Renderer
3 years ago by Darren Kuro
A lightweight obsidian plugin to render the basename of tags in preview mode.
Binary File Manager
4 years ago by qawatake
An Obsidian plugin to manage binary files
Blueprint
3 months ago by François Vaux
Repeatable templates plugin for Obsidian
Boardgame Search
a year ago by Marlon May
A plugin to create notes for boardgames based on the BGG API
Book Clipper
5 months ago by Hossein Fardmohammadi
Save book details from websites into your notes
Bulk Exporter
3 years ago by symunona
Bulk export Markdown filtered, renamed and sorted by front matter metadata into a new structure.
Checkbox styling helper
2 years ago by JaewonE
Helps you styling checkboxes in preview mode.
Code Styler
3 years ago by Mayuran Visakan
A plugin for Obsidian.md for styling codeblocks and inline code
Colorful Note Background
3 months ago by andresgongora
Set note background based on file location or frontmatter metadata
Completr
4 years ago by tth05
Auto-completion plugin for the obsidian editor.
Conditional Properties
4 months ago by Diego Eis
Automate frontmatter property updates in your Obsidian notes using simple conditional rules.
Connections
4 months ago by Eric Van Cleve
Content Cards
a year 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.
Contextual Typography
5 years ago by mgmeyers
Copy Metadata
3 years ago by wenlzhang
An Obsidian plugin to copy metadata to clipboard and insert it into file name.
CSS Inserter
2 years ago by Erika Gozar
Inserts user-defined css snippets into the selected text.
css snippets
5 years ago by Daniel Brandenburg
Obsidian plugin for css snippets
Current File Tags
a year ago by Trung Tran
Current View
10 months ago by Lucas Ostmann
Automatically set the view mode (Reading, Live Preview, Source) for notes in Obsidian using folder rules, file patterns, or frontmatter.
Custom Classes
3 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.
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
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.
Dataview (to) Properties
9 months ago by Mara-Li
Sync inline Dataview to properties (YAML frontmatter)
Dataview Autocompletion
a year ago by Daniel Bauer
DevOps Companion
9 months ago by Jobelin Kom
Obsidian DevOps Companion is a developer-oriented plugin that brings DevOps context awareness directly inside your Obsidian vault.
Discrete
9 months ago by shkarlsson
Draft Indicator
2 years ago by Brian Boucheron
Show draft status with ✎ icons in the Obsidian file explorer.
ExMemo Assistant
a year ago by ExMemo AI
Using LLMs to manage files and generating metadata such as tags and summaries.
Featured Image
a year 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.
File Index
2 years ago by Steffo
Obsidian plugin to create a metadata file about the files present in the Vault
File Title Updater
a year ago by wenlzhang
An Obsidian plugin that synchronizes titles between filename, frontmatter, and first heading in your notes.
Fold Properties By Default
a year ago by Tommy Bergeron
Always have editor/metadata properties folded by default.
Force note view mode
5 years ago by Benny Wydooghe
Front Matter Timestamps
2 years ago by LighthouseDino
Front Matter Title
4 years ago by Snezhig
Plugin for Obsidian.md
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.
Frontmatter generator
3 years ago by Hananoshika Yomaru
A plugin for Obsidian that generates frontmatter for notes
Frontmatter Markdown Links
a year ago by mnaoumov
Obsidian Plugin that adds support for markdown links in frontmatter
Frontmatter Metadata Link Classes
10 months ago by Varvara Zmeeva / zmeeva.io
Enhanced internal links with automatic classnames based on frontmatter metadata.
Frontmatter Tag Sugest
4 years ago by Jonathan Miller
Autocompletes tags in Obsidian YAML frontmatter. No more deleting #!
FuzzyTag
3 years ago by Adrian
GitHub Integration
a year ago by Kirill Zhuravlev
Plugin that fetch your github stars into notes
Image Metadata
2 years ago by alexeiskachykhin
Adds image metadata editing capabilities to Obsidian
Insert Arknights URL Banner
10 months ago by Rerurate_514
Obsidianのプラグイン、img_dwnldr_wikigg_ak_ktに保存されている画像を選択してbannersプロパティに簡単に設定できるプラグイン
Kanban Status Updater
a year ago by Ankit Kapur
Obsidian plugin that automatically updates the note property when card is moved to a column.
KoReader Highlight Importer
a year ago by Tahsin Kocaman
Imports highlights and metadata from KoReader into Obsidian notes
Linked Data Vocabularies
3 years ago by kometenstaub
Add linked data to the YAML of your Obsidian notes.
Linter
5 years ago by Victor Tao
An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
LLM Tagger
a year ago by David Jayatillake
Markdown Attributes
5 years ago by Jeremy Valentine
Add attributes to elements in Obsidian
Markdown Tags
a year 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.
Media Companion
a year ago by Nick de Bruin
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.
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 Auto Classifier
2 years ago by Beomsu Koh
AI-powered Obsidian plugin that automatically classifies and generates metadata (tags, frontmatter) for your notes.
Metadata Extractor
5 years ago by kometenstaub
Obsidian Plugin that provides metadata export for use with third-party apps.
Metadata Icon
2 years ago by Benature
change metadata entry icon
Metadata Menu
4 years ago by mdelobelle
For data management enthusiasts : type and manage the metadata of your notes.
MetaEdit
5 years ago by Christian B. B. Houmann
MetaEdit for Obsidian
My Thesaurus
a year 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)
NetClip
a year ago by Elhary
this plugin is for Obsidian that allows you to browse the web and clip webpages directly into your vault.
Note aliases
3 years ago by Pulsovi
This plugin manages wikilinks aliases and save them on the aliases list of the linked note
Note Codes
8 months ago by Ezhik
Reference your Obsidian notes from anywhere with simple 4-character codes.
Note Favicon
a year ago by mdklab
Obsidian plugin – Show Favicon from Metadata
Note UID Generator
a year ago by Valentin Pelletier
Allow you to automatically generate UID for the notes in your vault.
Notes dater
3 years ago by Paul Treanor
Adds created_on and updated_on dates of the active note to status bar
Obsidian Stylist
3 years ago by ixth
Obsidian plugin that allows to add classes and styles on markdown blocks
Onto Tracker
2 years ago by Jacob Hart
Plugin for obsidian allowing project management with ontologies.
Open Related Url
4 years ago by Dan Pickett
Papers
8 months ago by William Liang
An obsidian plugin to retrieve and import research papers.
Paste Image Into Property
a year ago by Nito
Pretty Properties
6 months ago by Anareaty
Publish Note to Mowen Note
9 months ago by ziyou
This is a mowen plugin for Obsidian (https://obsidian.md)
Sentinel
a year ago by Giorgos Sarigiannidis
A plugin for Obsidian that allows you to update properties or run commands based on document visibility changes.
Sheets Extended
3 years ago by NicoNekoru
Plugin that adds features to tables in obsidian including merging, vertical headers, and custom css
Simple Banner
10 months ago by Sandro Ducceschi
Visually enhance your Obsidian notes with a customizable banner. Supports icons and time/date display.
Simple File Info
a year ago by Lukas Capkovic
Sort Frontmatter
2 years ago by Kanzi
Sort frontmatter automatically
Source Mode Styling
3 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.
Supercharged Links
5 years ago by mdelobelle
obsidian plugin to add attributes and context menu options to internal links
Symbol linking
10 months 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.
Tag Tactician
a year ago by Scott Tomaszewski
Tailwind Snippet
2 years ago by Nicholas Wilcox
An Obsidian plugin that enables usage of Tailwind CSS.
Template Folder
9 months ago by LucasOe
Obsidian plugin to move notes to a folder when applying a template.
Testing Vault
3 years ago by Michael Pedersen
Time Things
2 years ago by Nick Winters
Show clock, track time spent editing a note, and track the last time a note has been edited.
Title-Only Tab
a year ago by tristone13th
a plugin of obsidian for to change showing tab name to short
Toggle Meta Yaml
3 years ago by hua
Update frontmatter modified date
3 years ago by Alan Grainger
Automatically update a frontmatter/YAML modified date field
Update Time
2 years ago by Sébastien Dubois
Obsidian plugin that updates front matter to include creation and last update times
Update time on edit
5 years ago by beaussan
Update Time Updater
2 years ago by MURATAGAWA Kei
Obsidian plugin to update the 'update time' element when saving or manually.
Virus Total Enrichment
2 years ago by ytisf
An Obsidian plugin to enrich a note with VirusTotal API.
Watched-Metadata
2 years ago by Nail Ahmed
Watches for changes in metadata and updates the note content accordingly.
YAML Table
a year ago by dainakai