# Hue MD for Obsidian (`hue-md`) Renders [Hue Markdown](https://spingras.github.io/hue-md/) in Obsidian's **Reading view**: color spans, diff spans, key caps, progress bars, multi-state tasks, boxes (also side by side and nested) and ` ```hue ` fences. The plugin bundles the real Hue parser (`src/index.js` and `src/core.js` at the repo root), so a note looks the same as in VS Code, Joplin or the CLI. Colors follow Obsidian's light or dark theme. How it works with Obsidian: - **Boxes:** Obsidian renders the text inside a box, so wikilinks, embeds, tags and lists keep working there. - **Tasks:** `- [ ]` and `- [x]` stay Obsidian's own checkboxes. Hue only draws `[-]`, `[!]` and `[?]`. - **Key caps:** `[[Ctrl+C]]` becomes a key cap only when no note with that name exists. A note called `Esc` keeps `[[Esc]]` a link. - **Live Preview and Source mode** show the raw Hue text. Switch to Reading view (`Ctrl+E` or `Cmd+E`) to see it rendered. - **Commands:** `Hue MD: Insert ... box` wraps the selection in a box. `Hue MD: Insert side-by-side boxes` adds two boxes. ## Install Extract [`hue-md-obsidian.zip`](https://github.com/spingras/hue-md/releases/latest/download/hue-md-obsidian.zip) into your vault's `.obsidian/plugins/hue-md/` folder. It holds `main.js`, `manifest.json` and `styles.css`. Then open **Settings → Community plugins**, select the reload icon next to **Installed plugins** and enable **Hue MD**. ## Development `main.js`, `manifest.json` and `styles.css` are generated from `src/`. Run `npm install` once at the repo root, then build from the repo root: ```bash node packages/obsidian-hue/scripts/build.mjs ``` `npm test` at the repo root loads the built `main.js` with a stand-in `obsidian` module and checks `demo/demo.hue.md` in a jsdom page. The stand-in is not Obsidian, so the manual check below covers the real app. ## Manual check in Obsidian 1. Build, then make a test vault with the plugin and the demo note. From the repo root, in WSL bash (pick any folder under `/mnt/c/`): ```bash VAULT=/mnt/c/Users//Documents/HueTestVault ``` ```bash mkdir -p "$VAULT/.obsidian/plugins/hue-md" && cp packages/obsidian-hue/main.js packages/obsidian-hue/manifest.json packages/obsidian-hue/styles.css "$VAULT/.obsidian/plugins/hue-md/" && cp demo/demo.hue.md "$VAULT/" ``` 2. In Obsidian: **Open another vault → Open folder as vault**, pick `HueTestVault`, and trust the author when asked. 3. **Settings → Community plugins**: turn on community plugins, enable **Hue MD**. 4. Open the `demo.hue` note and switch to **Reading view** (`Ctrl+E`). Check: - [ ] `passing` green, `71%` orange, `blocked` red; the yellow highlight, the blue-on-gray span and the `#c0ffee` hex span are colored (not turned into a `#tag`); `{a: 1}` stays plain text - [ ] five boxes (blue, green, purple, orange, red) with titles, each `|` line on its own line, the bullet list inside the red box - [ ] the two boxes at the end sit side by side (green "Do this", orange "Avoid this") - [ ] tasks: `[-]` blue ◐, `[!]` red !, `[?]` purple ?, lined up with the two normal checkboxes; ticking those two still edits the note - [ ] `Ctrl+Shift+V` and `Esc` are key caps, not links - [ ] the 80% bar is blue, the 100% bar green; the Changelog line shows green inserted and red struck-through text 5. **Settings → Appearance → Base color scheme**: switch between Light and Dark; the Hue colors switch with it. 6. Optional: put a box with a `[[wikilink]]` inside, and check the link works in Reading view.