Updates to readme.

This commit is contained in:
Glenn R. Martin 2026-07-18 15:10:53 -04:00
parent ac2d1a595a
commit 1b239f85eb

View file

@ -6,7 +6,21 @@ Drop a `[TOC]` tag into a note and it renders as a live table of contents built
## Status
Early development, bootstrapped from the [official Obsidian sample plugin](https://github.com/obsidianmd/obsidian-sample-plugin). Not yet functional or published.
Functional. Bootstrapped from the [official Obsidian sample plugin](https://github.com/obsidianmd/obsidian-sample-plugin); not yet published to the community plugin directory.
## Features
- **`[TOC]` tag detection** — matches the literal `[TOC]` tag by default, plus any number of your own regular expressions (Settings → TOC patterns), so alternate conventions can be recognized too.
- **Configurable insert marker** — the "Insert table of contents" command (and its right-click context-menu item) drops your configured marker text at the cursor, wrapped in blank lines if needed to keep it on its own paragraph. Defaults to `[TOC]`, but can be set to anything, including multi-line text like a fenced ` ```toc ` code block.
- **Live Preview rendering** — a matched line renders as a real, built-out table of contents (or is hidden entirely, per the "Display inline" setting), while raw source mode is left completely untouched. Raw marker text stays visible and editable while your cursor is on that line.
- **Reading View / export rendering** — renders as a real table of contents with clickable, native `#id`-anchor links to each heading (duplicate heading names get disambiguated with `-1`, `-2`, etc., same as Obsidian's own convention).
- **Stays in sync** — the TOC updates automatically as headings are added, edited, or removed, without needing to reopen the note.
## Settings
- **Display inline** — how a recognized TOC tag renders: `Links` (a real, built-out table of contents) or `Hide` (nothing).
- **Insert marker text** — the text the insert command/menu item drops at the cursor. Defaults to `[TOC]`.
- **TOC patterns** — regular expressions matched against a line to recognize it as a TOC tag, in addition to the default `^\[TOC\]$` pattern.
## Known issues
@ -31,8 +45,8 @@ Copy (or symlink) `main.js`, `styles.css`, and `manifest.json` into `VaultFolder
## Releasing
- Bump the version with `npm version patch|minor|major` (updates `manifest.json`, `package.json`, and `versions.json` together), or update `manifest.json`/`versions.json` manually.
- Create a GitHub release using the exact version number (no `v` prefix) as the tag.
- Attach `manifest.json`, `main.js`, and `styles.css` as binary attachments to the release. `manifest.json` must also stay committed at the repo root.
- Push a git tag matching the exact version number (no `v` prefix). The [release workflow](.github/workflows/release.yml) builds the plugin and creates a **draft** GitHub release with `main.js`, `manifest.json`, and `styles.css` attached automatically.
- Review the draft release on GitHub and publish it.
## License