Skip to content

luashiping/note-to-wikijs

Repository files navigation

Note to Wiki.js

An Obsidian plugin that allows you to Upload your notes to Wiki.js through GraphQL API.

English | 简体中文

Features

  • 📤 Upload individual notes to Wiki.js
  • 🖼️ Automatic image upload to Wiki.js assets
  • 🔄 Automatic conversion of Obsidian syntax to Wiki.js compatible markdown
  • 🏷️ Support for tags and metadata
  • ⚙️ Configurable upload behavior (create new, update existing, or ask)
  • 🔗 Automatic link conversion
  • 📋 Rich upload modal with content preview
  • 🎯 Right-click context menu integration

Installation

Install via BRAT (Recommended)

BRAT (Beta Reviewers Auto-update Tester) is the easiest way to install this plugin before it's available in the official Obsidian community plugins list.

  1. Install the BRAT plugin from the Obsidian Community Plugins
  2. Open BRAT settings and click "Add Beta plugin"
  3. Enter the repository URL: https://github.com/luashiping/note-to-wikijs
  4. Click "Add Plugin" — BRAT will download and install it automatically
  5. Enable Note to Wiki.js in Obsidian Settings > Community Plugins

BRAT also keeps the plugin up to date automatically whenever a new release is published.

Manual Installation

  1. Download the latest release from GitHub Releases
  2. Extract the files to your Obsidian plugins folder: {vault}/.obsidian/plugins/note-to-wikijs/
  3. Enable the plugin in Obsidian settings

Building from Source

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm run build to build the plugin
  4. Copy main.js, manifest.json, and styles.css to your plugins folder

Configuration

  1. Open Obsidian Settings
  2. Navigate to "Community Plugins" > "Note to Wiki.js"
  3. Configure the following settings:

Required Settings

  • 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 this in Wiki.js Admin > API Access)

Optional Settings

  • Default Tags: Comma-separated list of default tags to add to uploaded pages
  • Auto Convert Links: Automatically convert relative links to absolute Wiki.js paths
  • Preserve Obsidian Syntax: Keep Obsidian-specific syntax unchanged (e.g., [[links]], callouts)
  • Upload Behavior: Choose what happens when uploading a note that already exists

Usage

Upload Current Note

  1. Open the note you want to upload
  2. Use one of these methods:
    • Click the upload icon in the ribbon
    • Use the command palette (Ctrl/Cmd + P) and search for "Upload current note to Wiki.js"
    • Use the keyboard shortcut (if configured)

Upload Specific File

  1. Right-click on any markdown file in the file explorer
  2. Select "Upload to Wiki.js" from the context menu

OR

  1. Use the command palette and search for "Upload file to Wiki.js"
  2. Select the file from the list

Markdown Conversion

The plugin automatically converts Obsidian-specific syntax to be compatible with Wiki.js:

Links

  • [[Internal Link]][Internal Link](/internal-link)
  • [[Internal Link|Display Text]][Display Text](/internal-link)

Tags

  • #tag`#tag`

Callouts

> [!info] Information
> This is an info callout

Becomes:

> **Information**
>
> This is an info callout

YAML Frontmatter

YAML frontmatter is automatically stripped, but tags from frontmatter are extracted and added to the Wiki.js page.

API Permissions

Ensure your Wiki.js API token has the following permissions:

  • pages:read - To check if pages exist
  • pages:write - To create new pages
  • pages:manage - To update existing pages

Troubleshooting

Connection Issues

  1. Verify your Wiki.js URL is correct and accessible
  2. Check that your API token is valid and has the required permissions
  3. Use the "Test Connection" button in settings to verify connectivity

Upload Failures

  1. Check the browser console for detailed error messages
  2. Verify the target path doesn't contain invalid characters
  3. Ensure you have proper permissions to create/update pages in Wiki.js

Markdown Conversion Issues

  1. If links aren't converting properly, check the "Auto Convert Links" setting
  2. If you want to preserve Obsidian syntax, enable "Preserve Obsidian Syntax"
  3. Review the content preview in the upload modal before uploading

Roadmap

Future features planned for development:

  • 📁 Bulk Upload Folder - Upload entire folders with all files and images at once

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

1.0.0

  • Initial release
  • Single file upload functionality
  • Automatic image upload to Wiki.js assets
  • Markdown conversion
  • Page overwrite confirmation
  • Settings configuration
  • Context menu integration

About

An Obsidian plugin that allows you to upload your notes to Wiki.js through its GraphQL API.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors