Wiki Editor Setup Guide
This guide explains how to set up in-browser editing for your Veritect AI wiki.
Option 1: Decap CMS (Recommended)
What is Decap CMS?
Decap CMS (formerly Netlify CMS) is a git-based CMS that provides a user-friendly interface for editing content stored in GitHub.
Setup Steps
-
Enable GitHub OAuth
- Go to GitHub Settings > Developer settings > OAuth Apps
- Create new OAuth App with:
- Homepage URL:
https://wiki.veritect.ai - Callback URL:
https://wiki.veritect.ai/admin/
- Homepage URL:
-
Configure Authentication
- Use Netlify Identity or self-hosted OAuth server
- Or use GitHub as OAuth provider directly
-
Access the CMS
- Navigate to
https://wiki.veritect.ai/admin/index.html - Or click "Quick Links > CMS Admin" in the navbar
- Login with GitHub credentials
- Create and edit content with live preview
- Navigate to
Features
- ✅ WYSIWYG editor
- ✅ Live preview
- ✅ Media uploads
- ✅ Draft/publish workflow
- ✅ No coding required
Option 2: Custom Editor Page
We've created a custom editor at /editor with:
- Markdown editor with preview
- Frontmatter generation
- Syntax highlighting
- Save to GitHub (requires setup)
To Enable GitHub Saving
-
Create GitHub App
// Install Octokit
npm install @octokit/rest -
Add API Route (if using Cloudflare Workers)
export async function onRequestPost({ request, env }) {
const { content, path, message } = await request.json();
// Use GitHub API to create/update file
const octokit = new Octokit({
auth: env.GITHUB_TOKEN,
});
await octokit.repos.createOrUpdateFileContents({
owner: 'veritect-ai',
repo: 'wiki',
path: path,
message: message,
content: Buffer.from(content).toString('base64'),
branch: 'main',
});
return new Response('Success', { status: 200 });
}
Option 3: Third-Party Solutions
GitBook
- Pros: Full-featured, great UX
- Cons: Paid for private repos
Prose.io
- Pros: Free, simple
- Cons: Limited features
GitHub Web Editor
- Press
.on any GitHub page - Opens VS Code in browser
- Direct editing with preview
Security Considerations
-
Authentication Required
- Only authorized users can edit
- Use GitHub teams for access control
-
Branch Protection
- Require PR reviews for main branch
- Use preview deployments for drafts
-
Audit Trail
- All changes tracked in Git
- Author information preserved
Quick Start
For immediate use:
-
Use GitHub's Built-in Editor
- Click "Edit this page" on any wiki page
- Make changes in GitHub's web editor
- Commit directly or create PR
-
Use the Custom Editor
- Go to
/editoron your wiki - Create content with preview
- Copy markdown to GitHub manually
- Go to
-
Set up Decap CMS
- Already configured at
/admin/ - Just needs OAuth setup
- Already configured at
Workflow Options
For Non-Technical Users
- Use Decap CMS at
/admin/ - Visual editor with preview
- Auto-commits to GitHub
For Technical Users
- Use custom editor at
/editor - GitHub web editor (press
.) - Local development with VS Code
For Reviewers
- All changes create PRs
- Preview deployments on Cloudflare
- Approve and merge
Next Steps
- Choose your preferred editor option
- Set up GitHub OAuth
- Configure user permissions
- Train team on chosen workflow
Need help? Contact the dev team on Slack #wiki-help