HTML Frontmatter

by loonghappy
5
4
3
2
1
Score: 50/100

Description

A vibe-coded Obsidian plugin for native HTML Properties and the vault property catalog.

Reviews

No reviews yet.

Stats

0
stars
35
downloads
0
forks
29
days
28
days
29
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
10
commits

Latest Version

a month ago

Changelog

Type-safety update for the Obsidian community directory source review. Existing plugin features and supported versions are unchanged.

  • Use parse5's built-in node types for HTML metadata traversal.
  • Preserve native method receiver, argument and return types in the compatibility wrapper.
  • Declare version-specific private interfaces at the compatibility boundary.
  • Remove unsafe calls and unnecessary type assertions without disabling lint rules.

Verification

  • Type checking and release build passed.
  • All 15 existing unit tests passed.
  • All 14 native property checks and 13 catalog checks passed in the isolated Windows Obsidian 1.14.4 test vault.
  • Local type-aware linting reported no errors or warnings for all seven rule categories listed in the review: no-explicit-any, no-unsafe-assignment, no-unsafe-member-access, no-unsafe-argument, no-unsafe-call, no-unsafe-return and no-unnecessary-type-assertion. The community directory's new scan is still required.

Vibe-coded preview: developed through human-AI collaboration and AI-assisted coding. Supports desktop Obsidian 1.14.4 only; verified on Windows. HTML rendering, search and graph support remain outside scope. Global property rename/delete involving HTML remains blocked.

Installation and usage

Download html-frontmatter-0.1.2.zip below, extract it, and copy the entire html-frontmatter folder into your vault's .obsidian/plugins/ directory. Restart Obsidian, enable HTML Frontmatter under Community plugins, and enable the core Properties view plugin.

Open the command palette, search for HTML Frontmatter, run "HTML Frontmatter: 编辑 HTML 属性" (Edit HTML properties), and choose an HTML/HTM file. Edit its properties in the native sidebar. Use "Show all properties" to view the vault-wide catalog.

Installation and usage guide · 中文说明 · Verification record

HTML Frontmatter demo

Released under MIT; bundled dependencies retain their own license notices.

README file from

Github

HTML Frontmatter

English · 简体中文

Edit properties of HTML notes using Obsidian's native Properties interface, and include HTML properties in the vault-wide property catalog and occurrence counts. Metadata stays inside each HTML file as a JSON data block. No companion Markdown files or third-party HTML plugins are required.

Preview release. Supports desktop Obsidian 1.14.4 only; verified on Windows.

Vibe-coded project: Developed through human–AI collaboration and AI-assisted coding. The verification record documents the actual checks and their limits. This project is still a preview.

Features

  • Edit text, lists, numbers, checkboxes, dates, date-times, and tags with native property controls.
  • Add, rename, and delete properties within a single HTML file.
  • Preserve all HTML content, styles, and scripts outside the metadata block when saving properties.
  • Include HTML, HTM, and Markdown properties in the native vault-wide catalog, occurrence counts, and property-value suggestions.
  • Refresh the catalog after file changes, moves, deletions, or changes to excluded-file rules.

Select an HTML note, edit native properties, and see a new property appear in the vault-wide catalog

The GIF uses synthetic notes. The native property editor is on the right; the vault-wide catalog is on the left. Adding “复习计划” (Review plan) to an HTML note creates a catalog entry with an occurrence count of 1.

Installation

Manual installation

To install a release manually:

  1. Open the latest GitHub release and download the html-frontmatter-<version>.zip asset.
  2. Extract the ZIP. Copy the entire html-frontmatter folder into your vault's .obsidian/plugins/ directory. The resulting plugin folder must be .obsidian/plugins/html-frontmatter/, with main.js and manifest.json directly inside it.
  3. Restart Obsidian. Open Settings → Community plugins, allow community plugins if prompted, and enable HTML Frontmatter.
  4. Open Settings → Core plugins and enable Properties view.

Alternatively, create .obsidian/plugins/html-frontmatter/ and place the release's standalone main.js and manifest.json files inside it. License notices are embedded in main.js and also provided as separate release files. Node.js is not required to use the installed plugin.

Usage

Edit an HTML note's properties

  1. Place an .html or .htm file inside your vault.
  2. Open the command palette with Ctrl+P on Windows/Linux or Cmd+P on macOS.
  3. Search for HTML Frontmatter and run HTML Frontmatter: 编辑 HTML 属性 (“Edit HTML properties”). The plugin's command and file-menu labels are currently in Chinese.
  4. Select the HTML file. Its properties open in the native file-properties sidebar.
  5. Edit values, toggle checkboxes, or add properties. Changes are saved to the JSON metadata block inside that HTML file.

You can also right-click an HTML file in the file explorer and choose 编辑 HTML 属性. The property pane stays pinned to the selected file. Read the HTML body using your existing preferred method; this plugin does not render it.

View properties across the vault

Run Obsidian's Show all properties command to open the native vault-wide property catalog. HTML and Markdown notes contribute to the displayed property names and occurrence counts. A property used by one HTML note has an occurrence count of 1.

Metadata format

There is no need to maintain JSON manually. If a file has no metadata block, saving its first property inserts one:

<script type="application/json" id="obsidian-frontmatter">
{
  "project": "Example",
  "completed": false,
  "tags": ["demo/example"]
}
</script>

The block is non-executing JSON. Flat objects and lists of primitive values are supported; tags, aliases, and cssclasses must be string lists. Invalid, duplicate, or unsupported metadata blocks are refused rather than overwritten.

Working with agents

File-capable agents can edit the JSON block directly; Obsidian integration requires the enabled plugin. Start from the minimal HTML template and follow the agent read/write guide (Simplified Chinese) to preserve surrounding source and handle conflicts. The metadata ID and field rules are this plugin's convention. No dedicated CLI or MCP server is provided.

Limitations

  • The adapter uses some non-public APIs and refuses to load on Obsidian versions other than 1.14.4.
  • Vault-wide property renaming or deletion involving HTML is blocked, including mixed multi-selections. Single-file property renaming and deletion remain available.
  • Editing the tags field does not integrate HTML with the native tag sidebar or tag index. HTML rendering, search results, graph links, Bases, and backlinks are outside this plugin's scope. Clicking a catalog entry still invokes native search; its results are not guaranteed to include HTML.
  • Explicitly assigned property types may remain in the native catalog with a count of 0. Date-times use Obsidian's native format, including seconds.

Build from source

Use Node.js 24 and npm. The release-packaging command currently requires Windows PowerShell:

npm ci --ignore-scripts --no-audit --no-fund
npm run release

The installable folder, ZIP, and SHA-256 file are generated under dist/. Build output, dependencies, and test-vault state are excluded from the source repository.

Documentation index · Development · Verification record · Architecture · Changelog

License

MIT. Bundled dependencies retain their own notices in THIRD_PARTY_NOTICES.md. Detailed development documents are currently in Simplified Chinese.