1 So you want to set up your own wiki using ikiwiki? This tutorial will walk
2 you through setting up a wiki that is stored in [[Subversion]], [[Git]],
3 [[TLA]] or [[Mercurial]], and that has optional support for commits from the web.
5 1. [[Install]] ikiwiki. See [[download]] for where to get it.
7 2. Decide where your wiki's files will go.
9 Pick three directories for respectively the repository (contains
10 the "master copy" and history); working copy (checked-out
11 files from the repository); and web pages (served by the web server).
13 For the purposes of this tutorial, we'll set shell variables
14 for these locations, and use those variables in the commands that follow.
18 DESTDIR=~/public_html/wiki/
20 3. Create the master rcs repository for your wiki.
23 svnadmin create $REPOSITORY
24 svn mkdir file://$REPOSITORY/trunk -m create
30 # Git requires something be in the repo to start with.
31 cp /usr/share/ikiwiki/basewiki/index.mdwn .
33 git commit -m create -a
34 # No need to keep files in the master repository; so at this
35 # stage, you may want to remove all files (except .git) to
40 tla make-archive me@localhost--wiki $REPOSITORY
41 tla my-id "<me@localhost>"
46 4. Check out the repository to make the working copy that ikiwiki will use
47 as its source directory.
50 svn co file://$REPOSITORY/trunk ~/wikiwc
53 # Create a local clone to save disk space and also to
54 # optimize performance. See git-clone(1).
55 git clone -l -s $REPOSITORY $SRCDIR
60 tla archive-setup me@localhost--wiki/wiki--0
61 tla init-tree me@localhost--wiki/wiki--0
62 # Edit {arch}/=tagging-method and change the precious
63 # line to add the .ikiwiki directory to the regexp.
67 # Mercurial uses a single repo approach, so no need to
68 # clone anything. Because the following examples
69 # refer to $SRCDIR, we symlink it:
70 ln -s $REPOSITORY $SRCDIR
72 5. Build your wiki for the first time.
74 ikiwiki --verbose $SRCDIR $DESTDIR \
75 --url=http://host/~you/wiki/
77 Replace the url with the real url to your wiki. You should now
78 be able to visit the url and see your wiki.
80 6. Customise your wiki. The files in `/usr/share/ikiwiki/basewiki/` are
81 used if you don't have a custom version, so let's start by making a
82 custom version of the wiki's index page:
85 cp /usr/share/ikiwiki/basewiki/index.mdwn .
90 svn commit -m customised index.mdwn
94 git commit -m customised index.mdwn
103 hg commit -m customised index.mdwn
105 You can also add any files you like from scratch of course. Use the same
106 command as in step 5 to rebuild the wiki.
108 7. Repeat steps 5 and 6 as desired, editing or adding pages and rebuilding
109 the wiki. You can play around with other ikiwiki parameters such as
110 `--wikiname` and `--rebuild` too. Get comfortable with its command line
113 8. By now you should be getting tired of typing in all the command line
114 options each time you change something in your wiki's setup. And it's
115 also getting old to have to manualy rebuild the wiki each time you
116 change a file. Time to introduce setup files.
118 A sample setup file is [[ikiwiki.setup]]. Download it (or copy it from
119 `doc/ikiwiki.setup` in the ikiwiki sources), and edit it.
121 Most of the options, like `wikiname` in the setup file are the same as
122 ikiwiki's command line options (documented in [[usage]]. `srcdir` and
123 `destdir` are the two directories you specify when running ikiwiki by
124 hand. `svnrepo` is the path to your subversion repository. Make sure
125 that all of these are pointing to the right directories, and read
126 through and configure the rest of the file to your liking.
128 If you want to use something other than subversion, comment out the
129 subversion configuration, and uncomment and edit the configuration for
130 your chosen RCS. Note that the default file has a block to configure a
131 [[post-commit]] wrapper to update the wiki. You need to uncomment the
132 related block for whatever RCS you use and comment out the other rcs
135 When you're satisfied, run `ikiwiki --setup ikiwiki.setup`, and it
136 will set everything up and update your wiki.
138 9. Turn on additional features.
140 Now you have a basic wiki with a configuration file. Time to experiment
141 with ikiwiki's many features.
143 Let's first enable a key wiki feature and set up [[CGI]] to allow
144 editing the wiki from the web. Just edit ikiwiki.setup, uncomment the
145 block for the cgi wrapper, make sure the filename for the cgi wrapper
146 is ok, run `ikiwiki --setup ikiwiki.setup`, and you're done!
148 There are lots of other configuration options in ikiwiki.setup that you
149 can uncomment, configure, and enable by re-running
150 `ikiwiki --setup ikiwiki.setup`. Be sure to browse through all the
153 10. Enjoy your new wiki! Add yourself to [[IkiWikiUsers]].