It’s usually nice to be able to see changes locally, before having the whole world see them. Also, it’s often convenient to use ikiWiki to create a static site. Both these tasks are easy to do (but aren’t documented too well). Here are brief instructions:
First install ikiwiki on your local machine.
Clone the wiki repository into the directory
Copy your wiki setup file from the server into
preview.setup and put it into the local
preview.setup and make the following changes:
srcdir: . destdir: ./html_output exclude: (^|/)Makefile$|\.setup$|(^|/)html_output
libdir if you have custom ikiwiki scripts on the server
For speed improvement you might want to comment out the lines with
rcs git_wrapper cgi_wrapper
Disable unnecessary plugins:
Disable the cgiurl, and discussion pages. If you don’t want the default documentation etc. that comes with the default ikiWiki, also disable the default underlay.
# cgiurl: underlaydir: /dev/null discussion: 0
Create a file called
Makefile with the following:
refresh: ikiwiki --setup preview.setup --verbose --refresh rebuild: rm -rf html_output ikiwiki --setup preview.setup --verbose --rebuild
make rebuild. Now running
make will refresh your wiki.
html_output/index.html in your local browser and you have a local preview.
If you wanted to create a static site, then the contents are in the
rsync this directory to your server and you’re good to go.