A modern, personal wiki application built with React, Vite, and Electron.
Latest Release: v0.5.0 is out! Download for macOS/Windows/Linux
RectoWiki offers the best of both worlds: a Static Web Wiki for hosting your knowledge online, and a Native Desktop App for offline editing and management.
Built with React, Vite, and Electron, it seamlessly bridges the gap between a public digital garden and a private, local-first note-taking tool.
- Markdown Support: Write content in standard Markdown.
- Math Equations: LaTeX support via KaTeX (
$E=mc^2$). - Code Highlighting: Syntax highlighting for code blocks.
- Wiki Links: Internal linking using
[[Wiki Link]]syntax. - Clean URLs: Path-based routing (e.g.,
/Category/Page). - Responsive Design: Mobile-friendly with a collapsible sidebar.
- Dark Mode: Toggle between light and dark themes.
- Search & Filtering: Real-time search and tag filtering.
- File-Based: Content is generated from a local folder structure.
recto-wiki/
├── content/ # Your Markdown files (the wiki content)
├── public/ # Static assets
│ ├── content.json # Generated content index (for dev/web)
│ └── logo.png # Application logo
├── scripts/ # Build scripts
│ └── generate-content.js # Script to parse markdown and generate JSON
├── electron/ # Electron main process code
│ ├── main.cjs # Main process entry point
│ ├── preload.cjs # Preload script
│ └── contentManager.mjs # Content indexing and watching logic
├── src/ # React source code
├── index.html # Entry point
├── vite.config.js # Vite configuration
└── package.json # Dependencies and scripts
- Node.js (v18 or higher)
- npm (v9 or higher)
-
Clone the repository:
git clone https://github.com/yourusername/recto-wiki.git cd recto-wiki -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The app will be available at
http://localhost:5173/. -
Adding Content:
- Create
.mdfiles in thecontent/directory. - You can use subdirectories to create categories (e.g.,
content/Physics/Quantum.md). - Add frontmatter to your markdown files for metadata:
--- title: My Note Title date: 2023-10-27 tags: [tag1, tag2] ---
- Create
-
Updating Content:
- Web Mode: Run
npm run gen-contentto updatecontent.json. - Electron Mode: Content is updated automatically in real-time as you save files!
- Web Mode: Run
This project provides a robust desktop application wrapper built with Electron.
- Real-Time Updates: Edits to markdown files are reflected instantly in the app.
- Custom Content Location: Choose any folder on your computer to serve as your wiki.
- Local File System: Directly edit files on your hard drive.
- Native Menus: Context menus for file operations (rename, delete, etc.).
- Offline Capable: Works without an internet connection.
-
Start the development version:
npm run electron:dev
-
Build for production (Mac/Windows/Linux):
npm run electron:build
The executable will be in the
dist_electron/folder.Note for macOS Users: If you see a "damaged" error when opening the app, run this command in your terminal to bypass Gatekeeper:
xattr -cr /Applications/RectoWiki.app
We use vitest for unit testing. The test suite covers the Content Manager, File System utilities, and Build Scripts.
Run all tests with:
npm testIf you are using the Desktop App and want to publish your notes as a website (like this one), follow these steps:
-
Get the Web Engine:
- Fork and clone this repository to your computer.
-
Connect the App:
- Open the Desktop App settings.
- In "Content Location", click Browse and select the
contentfolder inside your cloned repository. - Now, anything you write in the App is saved directly to your repository!
-
Deploy:
- GitHub Pages: Go to your repository Settings -> Pages, select "GitHub Actions" as the source. Then push your changes to the
mainbranch. - Netlify/Vercel: Connect your repository and use
npm run buildas the build command anddistas the output directory.
- GitHub Pages: Go to your repository Settings -> Pages, select "GitHub Actions" as the source. Then push your changes to the
- Logo: Replace
public/logo.pngwith your own image. - Styles: Edit
src/index.cssortailwind.config.jsto customize the look and feel.
MIT


