summaryrefslogtreecommitdiff
path: root/notes/ikiwiki_creation.mdwn
blob: 15e238ff721505eab16d40ea53a0f7aa67fb9333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Manual Ikiwiki creation

0. Decide on a name
   - `reponame=hello`
1. Make a new git bare repo:
   - `cd /srv/git` (or some other place for storing bare repos, just keep in mind you need to change the git wrapper in the setup file later)
   - `GIT_DIR=$reponame.git git init --shared # shared being useful if you want this to be multi-user, harmless otherwise`
   - `edit $reponame.git/description` to show an appropriate description in GitWeb/cgit
2. Make a clone for yourself to work with:
   - `cd ~/src` (or whatever)
   - `mkdir $reponame`
   - `cd $reponame`
   - `git init`
   - Now add some content into it. `cp /usr/share/ikiwiki/basewiki/index.mdwn .` for instance
   - `git add .`
   - `git commit`
   - `git remote add origin /srv/git/$reponame # the '.git' suffix is optional`
   - `git push origin master`
   - `git config branch.master.remote origin`
   - `git config branch.master.merge refs/heads/master`
3. Make a clone for Ikiwiki:
   - `cd /srv/ikiwiki` (or some other place, just keep in mind you need to change `srcdir` in the setup file later)
   - `git clone /srv/git/$reponame`
   - `curl http://piny.be/jrayhawk/notes/examplewiki.setup | sed 's/\<examplewiki\>/$reponame/g' > $reponame.setup # feel free to put the setup file anywhere`
   - Tweak other settings in `$reponame.setup` (like wikiname, adminemail, urls, and add_plugins) as desired.
4. Make a destination directory for rendered files:
   - `mkdir /var/www/$reponame` (or some other place, just keep in mind you need to change destdir and cgi wrapper in the setup file now)
5. Render
   - `ikiwiki --setup $reponame.setup`

If you need to make further changes, `edit /srv/ikiwiki/$reponame.setup` and run `ikiwiki --setup /srv/ikiwiki/$reponame.setup --rebuild`