An Obsidian plugin that allows you to upload your notes to a Wiki.js instance through its GraphQL API. Supports automatic image upload, markdown conversion, bulk uploads, and auto-sync.
Fork of luashiping/note-to-wikijs with enhanced functionality including navigation menu sync, locale support, improved link conversion, and advanced sync options.
- 📤 Individual Note Upload – Upload current note or any file via command palette, ribbon icon, or right-click context menu
- 🗂️ Bulk Folder Upload – Upload entire folders with configurable conflict resolution (overwrite, skip, ask)
- 🔄 Auto-Sync Vault – Automatically sync modified notes to Wiki.js after configurable delay
- 🗑️ Auto-Sync Deletions – Delete Wiki.js pages when notes are deleted in Obsidian (optional)
- 🧹 Cleanup Orphaned Pages – Command to delete Wiki.js pages without corresponding Obsidian files
- 🖼️ Automatic Image Upload – Images referenced in notes are uploaded to Wiki.js assets with proper folder structure
- 🏷️ Tag & Metadata Support – Extracts tags from YAML frontmatter and inline hashtags
- 🌐 Locale Support – Configurable locale for new pages (default: 'en')
- 🔗 Smart Link Conversion – Converts Obsidian wikilinks to Wiki.js paths with locale and full folder structure
- ⚙️ Configurable Upload Behavior – Choose what happens when a page already exists (ask, update, create-new)
- 📋 Rich Upload Modal – Preview and edit page title, path, description, and tags before uploading
- 🎯 Navigation Menu Sync – Automatically syncs navigation tree after successful uploads
- 📊 Multiple Sync Modes – Force sync (overwrite all), sync new only (skip existing), or bulk upload with images
- 🔌 Connection Testing – Test connection to Wiki.js instance directly from settings
BRAT (Beta Reviewers Auto-update Tester) is the easiest way to install this plugin.
- Install the BRAT plugin from the Obsidian Community Plugins
- Open BRAT settings and click "Add Beta plugin"
- Enter the repository URL:
https://github.com/Pachinko0/wikijs-sync.git - Click "Add Plugin" – BRAT will download and install it automatically
- Enable Wikijs-Sync in Obsidian Settings > Community Plugins
BRAT keeps the plugin up to date automatically whenever a new release is published.
- Download the latest release from the GitHub releases page
- Extract the files to your Obsidian plugins folder:
{vault}/.obsidian/plugins/wikijs-sync/ - Enable the plugin in Obsidian Settings > Community Plugins
- Clone this repository
- Run
npm installto install dependencies - Run
npm run buildto build the plugin - Copy
main.js,manifest.json, andstyles.cssto your plugins folder - For development, use
npm run devwith Hot Reload plugin and symlink setup (see DEVELOPMENT.md)
Open Obsidian Settings > Community Plugins > Wikijs-Sync to configure:
- Wiki.js URL – The base URL of your Wiki.js instance (e.g.,
https://wiki.example.com) - API Token – Your Wiki.js API token (generate in Wiki.js Admin > API Access)
- Auto Convert Links – Automatically convert relative links to absolute Wiki.js paths (recommended: enabled)
- Preserve Obsidian Syntax – Keep Obsidian-specific syntax unchanged (e.g.,
[[links]], callouts) - Locale – Locale code for new pages (e.g.,
en,zh,fr). Default:en
-
Upload Behavior – Choose what happens when uploading a note that already exists:
ask– Prompt each time (default)update– Always update existing pagecreate-new– Always create new page
-
Bulk Upload Behavior – Conflict resolution for bulk uploads:
overwrite– Overwrite existing pagesskip– Skip existing pagesask– Ask for each page
-
Upload Images in Bulk Upload – When enabled, images referenced in notes will be uploaded to Wiki.js assets during bulk upload
-
Auto-Sync Vault – Automatically sync modified notes to Wiki.js
-
Auto-Sync Delay – Delay in seconds before syncing a modified note (prevents too frequent updates)
-
Auto-Sync Images – Upload images referenced in notes during auto-sync
-
Auto-Sync Deletions – Delete Wiki.js pages when notes are deleted in Obsidian (default: disabled)
- Open the note you want to upload
- Use one of these methods:
- Click the upload icon in the ribbon
- Use command palette (Ctrl/Cmd + P) → "Upload current note"
- Right-click the file in file explorer → "Upload to wiki.js"
- Right-click any markdown file or folder in the file explorer
- Select "Upload to wiki.js" from the context menu
OR
- Use command palette → "Upload file"
- Select the file from the list
- Use command palette → "Bulk upload folder to Wiki.js"
- Select a folder from your vault
- Choose conflict resolution behavior if configured to ask
- Force Sync Everything – Upload all notes, overwriting existing Wiki.js pages
- Sync New Files Only – Upload only notes that don't already exist in Wiki.js
- Auto-Sync – Automatically sync modified notes after the configured delay
- Clean Up Deleted Notes – Delete Wiki.js pages without corresponding Obsidian files
When uploading a note, a modal appears with:
- Wiki.js Path – Defaults to Obsidian folder structure (e.g.,
folder/subfolderfor notes in folders) - Page Title – Extracted from first heading or filename
- Description – Optional page description
- Tags – Extracted from YAML frontmatter and inline hashtags
- Upload Button – Processes the upload with image handling
The plugin automatically converts Obsidian-specific syntax to be compatible with Wiki.js:
[[Internal Link]]→[Internal Link](/en/full/path/to/internal-link)(includes locale and folder structure)[[Internal Link|Display Text]]→[Display Text](/en/full/path/to/internal-link)[[Page#heading]]→[Page#heading](/en/path/page#heading)(anchors preserved)- Original wikilinks are preserved as HTML comments for bidirectional sync:
[[Page]]→[Page](/en/page) <!-- [[Page]] --> - Relative markdown links are converted to absolute Wiki.js paths with locale
![[image.png]]→(uploaded to Wiki.js assets)- Image paths preserve folder structure relative to the note
#tag→`#tag`- Tags from YAML frontmatter are extracted and added to the Wiki.js page
- Obsidian callouts are converted to blockquotes with bold titles
- YAML frontmatter is automatically stripped (tags are preserved)
Ensure your Wiki.js API token has the following permissions:
pages:read– To check if pages existpages:write– To create new pagespages:manage– To update existing pages- Assets permissions for image upload (if using image upload features)
- Verify your Wiki.js URL is correct and accessible
- Check that your API token is valid and has the required permissions
- Check the Obsidian developer console (Ctrl+Shift+I) for detailed error messages
- Verify the target path doesn't contain invalid characters
- Ensure you have proper permissions to create/update pages in Wiki.js
- Check that the page locale matches your Wiki.js configuration
- Ensure "Auto Convert Links" is enabled in settings
- Check that wikilinks reference existing notes in your vault
- Verify locale setting matches your Wiki.js instance
See DEVELOPMENT.md for detailed development setup, including hot reload with symlinks and testing procedures.
- Clone repository and run
npm install - Create symlink:
ln -s /path/to/vault/.obsidian/plugins/wikijs-sync dist - Run
npm run devfor development build with watch mode - Install and enable Hot Reload plugin in Obsidian
- Make changes – ESBuild rebuilds automatically, Hot Reload reloads plugin
- Added auto-sync deletion feature – delete Wiki.js pages when notes are deleted in Obsidian
- Added cleanup command – delete orphaned Wiki.js pages without corresponding Obsidian files
- New setting: "Auto-sync deletions" (default: disabled) in plugin settings
- Enhanced auto-sync to handle both syncs and deletions in correct order
- Added folder deletion notice (folder sync not yet implemented)
- Fixed handling of renamed/moved notes with improved path computation
- Improved error handling and logging for deletion operations
- Added bidirectional wikilink preservation for perfect round-trip sync
- Original Obsidian wikilinks are preserved as HTML comments when uploading to Wiki.js
- When syncing from Wiki.js back to Obsidian, original wikilinks are restored exactly
- Fixes broken links and formatting when syncing complex wikilinks with spaces and paths
- Fixed folder sync conflicts and improved path normalization
- Added folder conflict check to prevent file/folder name collisions
- Rewrote resolveFolderPath to find best existing folder prefix
- Updated sanitizeSegment to normalize underscores to hyphens
- Fixed path comparison in findObsidianFileByWikiPath
- Added enhanced debug logging for sync troubleshooting
- Improved sync performance with folder reuse optimization
- Added navigation menu sync feature
- Fixed locale foreign key constraint by making locale configurable
- Enhanced link conversion with proper locale and folder structure support
- Added wikilink resolution using Obsidian's metadata cache
- Improved bulk upload with conflict resolution options
- Added auto-sync with configurable delay
- Fixed image upload path handling
- Added debug logging for troubleshooting
- Fork of luashiping/note-to-wikijs
- Added bulk folder upload with conflict resolution
- Added auto-sync capabilities
- Improved UI and upload modal
- Added locale support
- Enhanced link conversion
- Preserved all original features
Contributions are welcome! Feel free to submit a Pull Request.
If you fork this plugin for your own enhancements, please credit the original project: luashiping/note-to-wikijs.
This project is licensed under the MIT License - see the LICENSE file for details.
Original project © luashiping. Fork enhancements © contributors.
- Original plugin by luashiping
- Wiki.js for their excellent GraphQL API
- Obsidian for their extensible plugin architecture