by Dean Yu
Sync Obsidian Markdown notes and images to a FireFly Astro blog through Git.
FireFly Sync
中文说明文档 (Chinese Documentation)
FireFly Sync is an Obsidian desktop plugin that synchronizes Markdown notes and referenced images to your local FireFly Astro blog repository, automatically creating Git commits and pushing changes to your remote repository.
Features
- Blog Git Status Panel: A dedicated right-sidebar view showing modified, added, and untracked files in your blog repository with quick diff review.
- Selective Syncing:
- Current Note Mode: Syncs the currently active markdown note and automatically detects and syncs all referenced images.
- Full Vault Mode: Syncs all valid markdown notes and the entire
images/directory.
- Interactive Directory Tree: Tree-view selection interface featuring search filtering, folder collapse/expand, directory-level toggles, and select/clear all.
- Diff Preview & Confirmation: Generates git diff previews for every selected file before modifying the target blog repository, allowing individual items to be unchecked before commit.
- Customizable Target Paths: Configurable blog repository root, post directory (default:
src/content/posts), and media directory (default:src/content/posts/images), equipped with native "Browse..." folder pickers. - Network Proxy Support: Configurable Git proxy supporting
http://,https://,socks4://, andsocks5://protocols for seamless pushing to GitHub or other remote hosts.
Development
Prerequisites: Node.js (>= 18) and pnpm.
# Install dependencies
pnpm install
# Run TypeScript checking and build plugin bundle
pnpm run build
# Run unit and integration tests
pnpm test
Building produces main.js in the dist/ directory. A complete plugin release package requires:
manifest.jsonmain.jsstyles.cssversions.json
Installation to Obsidian
Method 1: Portable Release (Recommended)
- Download
firefly-sync.zipfrom the Latest Release. - Extract the archive into your Obsidian vault's
.obsidian/plugins/directory (resulting in.obsidian/plugins/firefly-sync/). - Reload Obsidian (
Ctrl + R) or restart the application. - Go to Settings -> Community plugins, disable Restricted mode if active, and enable FireFly Sync.
Method 2: Manual Installation
Copy manifest.json, main.js, styles.css, and versions.json into <Your-Vault>/.obsidian/plugins/firefly-sync/.
Configuration
In Obsidian, navigate to Settings -> FireFly Sync:
- Blog Repository Path: Enter or browse for the local path of your FireFly git repository (e.g.
E:\FireFly). - Blog Posts Directory: Relative path for markdown posts (default:
src/content/posts). - Blog Images Directory: Relative path for images/attachments (default:
src/content/posts/images). - Git Remote & Branch: Remote name (
originby default) and push branch (leave blank to use the active checked-out branch). - Network Proxy: Optional proxy URL for Git push commands (e.g.,
socks5://127.0.0.1:7897orhttp://127.0.0.1:7890).
License
This project is licensed under the MIT License.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.