Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Shared Blocks

siulved54siulved542 downloads

Reuse one block of text in many notes. Edit the block in its source note and every reference re-renders live. Everything stays in your vault, with no network access.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

Write a block of text once, in one note, and reuse it anywhere in your vault. When you edit the original, every place that references it re-renders while you look at it.

Everything happens locally. The plugin reads and renders notes from your vault and nothing else: no account, no server, no telemetry, no network access of any kind.

How it works

Define a block in any note, between two markers on lines of their own:

==share:contact==
**Support:** [email protected]
Office hours: 9:00 – 17:00 CET
==/share==

The name accepts letters (accented and non-Latin included), digits, _ and -. A block with an empty body is ignored, so a half-written block reports itself as missing instead of quietly rendering nothing.

Reference it from any other note:

==ref:Company handbook^contact==

Company handbook is the note holding the definition — the same link text you would put in [[ ]], so a bare name, a subfolder path, or anything Obsidian can resolve from the note you are writing in. contact is the block name.

The reference renders the block's markdown in place, styled as a quoted block. Edit the definition and every reference on screen updates, without reopening the note.

References can be nested: a shared block may itself contain a reference to another one. A cycle is detected and reported in place rather than hanging.

Commands

Command What it does
Refresh all blocks Rescans the whole vault and re-renders every reference on screen
Show cache stats Reports how many blocks are currently cached

You should not normally need the refresh command; it is there for when a block goes stale after an edit made outside Obsidian.

Performance

Opening a vault costs nothing: there is no scan at startup. A block is read the first time a reference asks for one, and edits are coalesced rather than handled per keystroke. The manual refresh scans in chunks, yielding between them, so a large vault does not freeze the window.

Limitations

  • References render in Reading view and in rendered sections of Live Preview. The raw ==ref:…== text is what you see while you are editing that line.
  • The markers use Obsidian's highlight syntax, so a block definition shows as a highlighted line in its source note.
  • Blocks are matched by note path and block name. Renaming a note is handled; renaming a block means updating the references yourself.

Installing manually

Copy main.js, manifest.json and styles.css into <vault>/.obsidian/plugins/shared-blocks/ and enable the plugin in Settings → Community plugins.

Development

npm install
npm run dev     # esbuild in watch mode
npm run build   # type-check, then a production bundle
npm test        # unit tests for the parsing and cache logic

Tests run on plain Node with no extra dependency — Node strips the types itself from 22.18 onward, which is what engines asks for. They cover src/blocks.ts, the pure half of the plugin: block parsing, reference parsing, cache keys, and which blocks changed between two reads of a note. main.ts is the only file that touches the vault, the metadata cache or the DOM.

License

MIT. See LICENSE.

HealthExcellent
ReviewSatisfactory
About
Create reusable content blocks in one note and reference them anywhere in your vault. Update the source to refresh every on-screen reference instantly. Nest references and detect cycles in place, with all content read and rendered locally and no network, account, or telemetry.
TemplatingLinks
Details
Current version
0.1.0
Last updated
14 hours ago
Created
15 hours ago
Updates
1 release
Downloads
2
Compatible with
Obsidian 1.3.5+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
siulved54siulved54
GitHubperezamadorluisenrique-gif
  1. Community
  2. Plugins
  3. Templating
  4. Shared Blocks

Related plugins

Excalidraw

Visual PKM powerhouse. Create and edit Excalidraw drawings.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

Advanced URI

Control everything with URI.

Breadcrumbs

Visualise the hierarchy of your vault using a breadcrumb trail or matrix view.

QuickAdd

Quickly add new notes or content to your vault.

Supercharged Links

Add attributes to internal links with the values of target note's frontmatter attributes.

Find orphaned files and broken links

Find files that are not linked anywhere and would otherwise be lost in your vault. In other words: files with no backlinks.

Consistent Attachments and Links

Move note attachments and update links automatically.

Templater

Create and use dynamic templates.

Folder notes

Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.