summaryrefslogtreecommitdiffstats
path: root/wiki-preview.mdwn
blob: 05757c7ea5cb9fe0ff405f77da25089cad77c69e (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Taking the [[Create a Wiki|create-a-wiki]] article as a starting point, this article describes how to set up preview of Friposts wiki.

The basic idea is something like the following:

    .         Bare Git Repository
    .   git.fripost.org:fripost-wiki.git
    .                  |
    .                  |
    .      Repository for Local Edits
    .         ~/git/fripost/wiki
    .                  |
	.                  |
	.     The Preview Ikiwiki Web Part
	.  ~/public_html/fripost-wiki-preview

Where *~/git/fripost/wiki* is a local git repository with remote tracking of the main bare wiki repository *git.fripost.org:fripost-wiki.git*. A command will cause a local compiled version to be created, that is accessed by pointing the browser to *http\://localhost/~<name>/fripost-wiki-preview/*.

First the basics. According to [[Create a Wiki|create-a-wiki]] do the following:

* Install and configure Git
* Install and configure Apache 2
* Install Ikiwiki

For the Ikiwiki configuration question, answer them as follows

    wikiname:    fripost-wiki-preview
    url:         http://localhost/~<name>/lab-wiki
    srcdir:      ~/git/fripost/wiki
    destdir:     ~/public_html/fripost-wiki-preview
    settings:    ~/public_html/fripost-wiki-preview/wiki.setup

Where *<name>* is the local user name and *~/git/fripost/wiki* is where the local wiki Git repository. This will generate a configuration file: *~/public_html/fripost-wiki-preview/wiki.setup*. Generate the first issue:

    $ ikiwiki --setup ~/public_html/fripost-wiki-preview/wiki.setup

For to preview local edits, run:

    $ ikiwiki --setup ~/public_html/fripost-wiki-preview/wiki.setup --refresh

and point your browser to *http\://localhost/~<name>/fripost-wiki-preview/*.

You can also create an alias for to refresh the preview command.

    $ alias fripost-wiki-preview-refresh='ikiwiki -setup /home/gustav/lab-wiki/fripost-wiki.setup -refresh'