No description
Find a file
2025-05-07 23:19:17 +09:00
docs styles revised 2025-05-02 20:01:06 +09:00
src link modified 2025-05-07 23:12:04 +09:00
.gitignore style.css on root and mainjs compiled 2025-05-02 20:37:03 +09:00
esbuild.config.mjs yaml-table init commit 2025-05-02 18:10:03 +09:00
LICENSE yaml-table init commit 2025-05-02 18:10:03 +09:00
main.js link modified 2025-05-07 23:12:04 +09:00
manifest.json Update manifest.json 2025-05-07 23:18:32 +09:00
package-lock.json yaml-table init commit 2025-05-02 18:10:03 +09:00
package.json yaml-table init commit 2025-05-02 18:10:03 +09:00
README.md Update README.md 2025-05-07 23:18:03 +09:00
styles.css style.css cleaned 2025-05-07 15:56:25 +09:00
tsconfig.json yaml-table init commit 2025-05-02 18:10:03 +09:00
version-bump.mjs yaml-table init commit 2025-05-02 18:10:03 +09:00
versions.json yaml-table init commit 2025-05-02 18:10:03 +09:00

YAML Table for Obsidian

An Obsidian plugin that renders YAML code blocks as HTML tables for better visualization.

Features

  • Automatically transforms YAML code blocks with the language identifier (default: yaml-table) into HTML tables
  • Real-time preview: tables update instantly as you edit the YAML code
  • Supports various YAML structures:
    • Simple key-value pairs
    • Lists (both simple values and object lists)
    • Nested objects

Usage

  1. Create a code block in your Obsidian note like this:
```yaml-table
title: Project Plan
tasks:
  - name: Task 1
    due: 2025-05-05
  - name: Task 2
    due: 2025-05-07
```

To add a caption to your table, specify it after a colon in the language identifier line:

```yaml-table: Table 1. Project Plan Details
title: Project Plan
tasks:
  - name: Task 1
    due: 2025-05-05
  - name: Task 2
    due: 2025-05-07
```
  1. In Reading View or Live Preview, this code block will automatically be displayed as an HTML table, with the caption centered above it.
  2. Click on the table to edit the original YAML code.

Installation

From Community Plugins

  1. Open Obsidian Settings
  2. Go to "Third-party plugins" and browse Community Plugins
  3. Search for "YAML Table"
  4. Install and enable the plugin

Manual Installation

  1. Download the latest release main.js styles.css and manifest.json from the releases
  2. Put them to your Obsidian vault's .obsidian/plugins/yaml-table directory
  3. Restart Obsidian and enable the plugin in settings

Settings

The plugin settings offer the following option:

  • Code block language: Language identifier for YAML code blocks to be rendered as tables (default: yaml-table)

Examples

Basic Key-Value

title: blog_idea_parking_lot
author: hogehoge
date: 2025-05-07

List of Objects with Caption

```yaml-table: Table 2. Event Schedule
schedule:
  - time: Mid-May
    action: Event A
  - time: Late May
    action: Event B
```

Nested Objects

project:
  name: YAML Table Plugin
  version: 1.1.0
  features:
    - table rendering
    - hogehoge
    - hogehoge

License

This plugin is released under the MIT License.

Development

Prerequisites

  • Node.js and npm

Setup

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm run dev to start development with hot-reload
  4. Run npm run build to build the production version

Testing in Obsidian

  1. Build the plugin using npm run build
  2. Copy main.js, manifest.json, and styles.css to your Obsidian vault's plugins directory: .obsidian/plugins/yaml-table/
  3. Enable the plugin in Obsidian settings