Code to create a personal wiki based on MDwiki
Download and Setup MDwiki
Let's assume you're using OS X, Dropbox to sync your files, and your username is
Make a directory, 'personalwiki'
Make a folder,
personalwiki, under your root Dropbox folder:
mkdir -p /Users/YourUserNameHere/Dropbox/personalwiki
Set up the mdwiki base site
- Download the zip file from the releases page
- Copy the zip file and its mdwiki.html file to the personalwiki directory
- Rename mdwiki.html to index.html
Install and Configure Nginx
I'm going to assume you're using Homebrew
brew install nginx sudo nginx cd /usr/local/etc/nginx/
Navigate to http://localhost:8080/ to confirm that it's working.
- Make an Nginx config file (
nginx.conf) that limits access to localhost. Use my configuration file if you'd like.
- Copy the nginx config file to
/usr/local/etc/nginx. Make sure it's named
To have launchd start nginx now and restart at login:
brew services start nginx
- Installing Nginx in Mac OS X Maverick With Homebrew
- Allow only local users in nginx
- How to Host a Static Website with Nginx
Once you have MDwiki and Nginx installed, you need to set up your site! I made a basic configuration using 3 files:
- index.md - The home page for my site. My version is quite sparse, using HTML tables + links extensively.
- navigation.md - What would a navigation menu have in it? Put it in here. I made menu links for my pages about Health, Music, Work, People, Living, and Career.
- config.json - defines a title, enables side menus, and sets an anchor character.