Deploying MakeAWiki to Vercel
This guide will walk you through the process of deploying your MakeAWiki instance to Vercel, providing free hosting with excellent performance and reliability.
Prerequisites
Before you start, you'll need:
- A GitHub account
- A Vercel account (you can sign up with your GitHub account)
- Your MakeAWiki project pushed to a GitHub repository
Steps to Deploy
1. Prepare Your Project for Deployment
Your MakeAWiki project comes with a vercel.json file that configures the build process. If you've made any changes to the project structure, make sure to update this file accordingly.
The default vercel.json should look like this:
{
"version": 2,
"builds": [
{ "src": "index.js", "use": "@vercel/node" }
],
"routes": [
{ "src": "/(.*)", "dest": "/index.js" }
]
}
2. Push Your Project to GitHub
If you haven't already, push your MakeAWiki project to a GitHub repository:
# Initialize Git repository if needed
git init
# Add all files
git add .
# Commit the changes
git commit -m "Initial commit"
# Add your GitHub repository as remote
git remote add origin https://github.com/yourusername/yourrepository.git
# Push to GitHub
git push -u origin main
3. Connect to Vercel
- Go to Vercel and sign in with your GitHub account
- Click on "Import Project"
- Select "Import Git Repository"
- Choose the GitHub repository that contains your MakeAWiki project
4. Configure Your Project
On the project configuration screen:
- Project Name: Enter a name for your project (this will be part of your deployment URL)
- Framework Preset: Select "Other" or "Node.js"
- Root Directory: Leave as default if your MakeAWiki is in the repository root
- Build and Output Settings: Build to -
npm run buildand Output Directory -.
5. Deploy
Click the "Deploy" button and wait for the deployment to complete.
6. Custom Domain (Optional)
To use your own domain instead of the default .vercel.app domain:
- Go to your project dashboard on Vercel
- Click on "Settings" and then "Domains"
- Add your custom domain and follow the instructions to configure DNS
Environment Variables
If you need to set environment variables for your deployment:
- Go to your project settings on Vercel
- Navigate to the "Environment Variables" section
- Add any required variables (e.g.,
NODE_ENV=production)
Continuous Deployment
Vercel automatically sets up continuous deployment from your GitHub repository. Any changes pushed to your main branch will trigger a new deployment.
Managing Content
There are several ways to manage your wiki content on Vercel:
- Direct Git Updates: Edit files in your repository and push changes
- CMS Integration: Connect a headless CMS like Netlify CMS
- Admin Interface: Create a custom admin interface that commits changes to GitHub
Troubleshooting Common Issues
Build Failures
If your build fails, check:
- The Vercel build logs for specific errors
- Your
vercel.jsonconfiguration - Any dependencies that might be missing
Missing Content
If content is missing:
- Make sure your
pagesdirectory is included in your repository - Check that paths are correctly referenced in your code
Next Steps
Now that your MakeAWiki is deployed, you might want to: