obsidian-svelte-plugin-starter Svelte Themes

Obsidian Svelte Plugin Starter

Starter template for Obsidian.md plugins using Svelte and Bun.sh

obsidian-svelte-plugin-starter

A modern Obsidian plugin starter template that integrates Svelte for UI development, powered by esbuild and Bun for fast builds and dependency management.


✨ Features

  • Svelte Integration – Build reactive plugin interfaces using Svelte
  • Esbuild for Svelte – Fast bundling via esbuild with Svelte support
  • 🐰 Bun Lockfile – Uses Bun for dependency resolution and a bun.lockb file
  • 📦 Standard Structure – Source code in a src/ folder, output to a dist/ folder
  • 🔁 Automatic Rebuilds – Run bun run dev to watch for changes and auto-export to dist/
  • 🚀 Release Ready – Includes a GitHub Actions release.yml workflow for building and publishing releases

✅ Requirements

Before you begin, make sure you have the following installed:

  • Bun – required for dependency management and running build scripts
  • Node.js v22 (suggested) – for optimal compatibility with modern APIs and tooling

You can verify your environment with:

bun --version
node --version

📦 Getting Started

  1. Click "Use this template" on GitHub to create your own plugin repository

  2. Install dependencies:

    bun install
    
  3. Build the plugin into the dist/ folder, run:

    bun run dev
    
  4. To test the plugin locally in your Obsidian vault, create a symbolic link:

    ln -s /path/to/your/template/dist /path/to/your/vault/.obsidian/plugins/your-plugin-name
    

    e.g.

    ln -s /decaf-dev/repos/my-plugin/dist /decaf-dev/desktop/obsidian-development/.obsidian/plugins/my-plugin
    
  5. Open Obsidian. Navigate to Community Plugins and enable your plugin

🔁 Setting Up GitHub Releases

To automatically generate plugin bundles when tagging a new release:

  1. Go to your repository on GitHub

  2. Navigate to SettingsActionsGeneral

  3. Under Workflow permissions, select:
    Read and write permissions

  4. Click Save to apply changes

    Now, to trigger a release, simply tag a version:

    git tag 1.1.0
    git push 1.1.0
    

    This will run the release.yml workflow and generate your plugin build in the release assets.

Top categories

Loading Svelte Themes