No description
Find a file
2026-07-17 07:37:25 +00:00
.claude docs(all): updated docs 2026-04-15 20:38:53 +02:00
.github ci(release): two-phase release so attestations bind to the tag commit 2026-07-17 08:48:02 +02:00
docs chore(release): 0.2.3 2026-07-17 07:37:25 +00:00
documentation feat(all): improves functions 2026-01-28 20:51:28 +01:00
scripts ci(release): two-phase release so attestations bind to the tag commit 2026-07-17 08:48:02 +02:00
src chore(all): fix obsidian review issues 2026-05-14 08:04:40 +02:00
.cz-config.cjs Initial commit 2026-01-26 06:48:31 +01:00
.editorconfig Initial commit 2026-01-26 06:48:31 +01:00
.gitattributes Initial commit 2026-01-26 06:48:31 +01:00
.gitconfig chore(all): remove husky 2026-05-13 22:03:48 +02:00
.gitignore Initial commit 2026-01-26 06:48:31 +01:00
.nvmrc Initial commit 2026-01-26 06:48:31 +01:00
.prettierignore Initial commit 2026-01-26 06:48:31 +01:00
AGENTS.md docs(all): updated agent rules 2026-05-15 13:28:41 +02:00
bun.lock chore(all): fix obsidian review issues 2026-05-14 08:04:40 +02:00
bunfig.toml chore(all): remove husky 2026-05-13 22:03:48 +02:00
CHANGELOG.md chore(release): 0.2.3 2026-07-17 07:37:25 +00:00
CLAUDE.md Initial commit 2026-01-26 06:48:31 +01:00
commitlint.config.ts Initial commit 2026-01-26 06:48:31 +01:00
CONTRIBUTING.md chore(all): remove husky 2026-05-13 22:03:48 +02:00
DEVELOPMENT.md chore(all): fixed obsidian review issues 2026-05-13 22:07:12 +02:00
eslint.config.ts Initial commit 2026-01-26 06:48:31 +01:00
LICENSE Initial commit 2026-01-26 06:48:31 +01:00
manifest.json chore(release): 0.2.3 2026-07-17 07:37:25 +00:00
package.json chore(release): 0.2.3 2026-07-17 07:37:25 +00:00
prettier.config.cjs Initial commit 2026-01-26 06:48:31 +01:00
README.md docs: align installation instructions 2026-05-14 10:36:55 +02:00
tsconfig.json Initial commit 2026-01-26 06:48:31 +01:00
versions.json chore(release): 0.2.2 2026-05-14 06:05:24 +00:00

Obsidian Expander

Replace variables across your Obsidian vault using HTML comment markers. Configure key-value pairs in settings, and Expander will automatically substitute them throughout your notes, and keep those updated too.

Features

  • Variable Replacement: Define key-value pairs that get expanded throughout your vault
  • Dynamic Values: Use function expressions like now().format("YYYY-MM-DD") for dynamic content
  • Update Modes: Control when expansions update
    • Auto: Updates automatically on file changes
    • Manual: Updates only via command or button
    • Once: Updates once, then never again
    • Once-and-Eject: Updates once, removes markers
  • Folder Filtering: Choose which folders to scan or ignore
  • Visual Feedback: Mode badges and refresh buttons in the editor
  • Commands: Replace values in current note or entire vault, add new expansion, ...

Installation

  1. In Obsidian, go to Settings → Community plugins.
  2. Disable Restricted mode if it's enabled.
  3. Select Browse, search for Expander, install it, then enable it.

You can also browse the catalog on the Obsidian Community website.

Manual installation

If the plugin isn't listed in the community catalog yet (or you want a specific version):

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Copy them into <Vault>/.obsidian/plugins/expander/.
  3. Reload Obsidian and enable Expander in Settings → Community plugins.

BRAT (bleeding edge)

BRAT (Beta Reviewers Auto-update Tool) installs plugins straight from a GitHub repo and keeps them updated automatically. Use this if you want the latest commits — things might break.

  1. Install Obsidian42 - BRAT from Settings → Community plugins → Browse and enable it.
  2. Run BRAT: Add a beta plugin for testing from the command palette.
  3. Paste https://github.com/dsebastien/obsidian-expander.
  4. Select the latest version and confirm.
  5. Enable Expander in Settings → Community plugins.

Quick Start

  1. Install the plugin (see Installation above).
  2. Open Settings → Expander
  3. Add a replacement (e.g., key: today, value: now().format("YYYY-MM-DD"))
  4. In your note, add:
    <!-- expand: today -->
    
  5. The value and closing tag will be automatically inserted

Syntax

Just add an opening tag - the closing tag is added automatically:

<!-- expand: key -->

After expansion:

<!-- expand: key -->value<!---->

Update mode variants:

  • <!-- expand: key --> - Auto mode (updates on file change)
  • <!-- expand-manual: key --> - Manual mode (update via command only)
  • <!-- expand-once: key --> - Once mode (fills once, never updates)
  • <!-- expand-once-and-eject: key --> - Once-and-eject mode (fills once, removes markers)

Functions

Dynamic values using function expressions:

Function Description Example
now() Current date/time now().format("YYYY-MM-DD")
today() Today at midnight today().format("MM/DD/YYYY")
format(pattern) Format date now().format("HH:mm")
lower() Lowercase now().format("MMMM").lower()
upper() Uppercase now().format("MMMM").upper()
trim() Trim whitespace
replace(old, new) Replace text replace("-", "/")

Documentation

Full documentation available at docs/.

Development

See DEVELOPMENT.md for build instructions, testing setup, and contribution guidelines.

Support

If you find this plugin useful, consider supporting my work:

License

MIT License - see LICENSE for details.

News & Updates

To stay up to date about this plugin, Obsidian in general, Personal Knowledge Management and note-taking:

Author

Created by Sébastien Dubois (@dSebastien)