jaewone323 downloadsLink to headings, update aliases, and insert content from linked sections.

Heading Autolink helps maintain Markdown heading wikilinks. It can insert heading links with a picker, add missing heading aliases, update heading links after a heading rename, and insert content from a selected heading section.
# after a file wikilink or an existing heading wikilink, such as [[note]]#, [[note|alias]]#, [[20. Project]]#, or [[note#Heading|Heading]]#.[[note#Heading|Heading]].Command+Enter on macOS, Ctrl+Enter on Windows/Linux, or Enter when no heading result matches.- {icon} list formatting where possible.Supported examples:
[[a#title1]]
[[a#title1|title1]]
[[folder/a#title1]]
[[a.md#title1]]
[[a#heading1#heading2]]
[[a#heading1#heading2|heading2]]
[[20. Project]]#
[[a|alias]]#
[[a#title1|title1]]#
Unsupported examples:
![[a#title1]]
[[#local heading]]
[[a#^block]]
[title](a.md#title1)
Type # immediately after a file wikilink:
[[note]]#
You can also type # after a wikilink that already has an alias:
[[note|alias]]#
The same picker opens after a wikilink that already points to a heading:
[[note#Old heading|Old heading]]#
The picker opens below the cursor. Press Enter or click a heading to insert one heading link when the target note resolves to a Markdown file with headings. Use the recursive insert button to insert the selected heading and its descendants. When the trigger link already has an alias, the selected heading link replaces it. If the target note has no headings or does not exist yet, the picker still opens with an empty heading list so you can enter a fast file alias.
When the picker search has text, Command+Enter on macOS or Ctrl+Enter on Windows/Linux inserts the search text as a file alias even when heading results are visible:
[[note|search text]]
When Fast Alias is inserted from an existing heading wikilink, the heading target is preserved:
[[note#Old heading|search text]]
If the search has no matching heading results, Enter also inserts the search text as a file alias.
When auto alias is enabled, moving away from a line can change:
[[a#title1]]
to:
[[a#title1|title1]]
Hierarchical heading links use the final heading segment as the alias.
When heading rename updates are enabled, renaming title1 to newTitle1 in a.md can update matching links across Markdown files in the vault:
[[a#title1]]
[[a#title1|title1]]
to:
[[a#newTitle1]]
[[a#newTitle1|newTitle1]]
The plugin only treats the change as a rename when one heading changed and the heading count and levels stayed the same. If the old heading text was duplicated, simple links such as [[a#title1]] are not updated because the target is ambiguous.
Heading Autolink reads Markdown files in the current vault to resolve links, find headings, and build heading snapshots. It does not read files outside the vault.
The plugin can modify Markdown files in the current vault in these cases:
The plugin does not modify non-Markdown files.
# after a file wikilink or an existing heading wikilink.small, medium, or large.Turn off Enable heading rename updates to prevent automatic vault-wide link replacement. Turn off Enable auto alias to prevent automatic alias insertion in the active editor.
Use Obsidian undo for active-editor changes made by the picker, fast file alias, or auto alias. For vault-wide heading rename updates, use your normal backup or version history, such as Obsidian Sync version history, Git, Time Machine, or another vault backup. Review important notes before enabling vault-wide heading rename updates.
isDesktopOnly is set to false because the plugin uses the Obsidian API and browser APIs, and does not import Node.js or Electron modules. The plugin can run on mobile, but the current picker and editing experience are not optimized for mobile use and may not be suitable for regular mobile workflows. Mobile usability may improve in a future update.
Heading Autolink does not use network access and does not access files outside the current vault.
After the plugin is accepted into the Obsidian Community Plugins directory:
Download these files from the latest GitHub release:
main.jsmanifest.jsonstyles.cssCopy them into:
<Vault>/.obsidian/plugins/heading-autolink/
Reload Obsidian and enable Heading Autolink from Settings -> Community plugins.
Install dependencies:
npm install
Start the development watcher:
npm run dev
Run lint and a production build:
npm run lint
npm run build
The production build type-checks the plugin and bundles src/main.ts into main.js. Release assets are the root main.js, manifest.json, and styles.css files.
This project is licensed under the GNU General Public License v3.0. See LICENSE.
This plugin is built with the Obsidian plugin API, TypeScript, and esbuild. It does not include code copied from another community plugin.