File:  [NetBSD Developer Wiki] / wikisrc / wiki / previewing_with_template.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Sat Jan 11 01:26:26 2014 UTC (7 years, 10 months ago) by ryoon
Branches: MAIN
CVS tags: HEAD
Add page for previewing

[[!meta title="Previwing NetBSD Wiki with template"]]

Some template requires ikiwiki cgi mode.
If you setup ikiwiki with cgi mode, you can ignore cgi part of ikiwiki
for previewing your changes.

# Getting wikisrc
To preview your changes, wikisrc is needed.
See [[cvs]] page, or get wikisrc CVS repository with rsync, and checkout
from it (wikisrc is hosted on with rsync).

Assuming that your wikisrc tree is in /usr/cvs/wikisrc.

# Installing ikiwiki engine

    $ cd /usr/pkgsrc/www/ikiwiki
    $ make install clean

# Setting up ikiwiki with cgi mode
Use page.tmpl requires cgi support (it has HAVE_ACTIONS conditionals)

## Prepare destination directory
    $ mkdir ~/public_html

## Build html files
    $ ikiwiki --verbose /usr/cvs/wikisrc ~/public_html/wikisrc \
      --url=http://localhost/~user-user-name/wikisrc \
      --cgiurl http://localhost/~your-user-name/wikisrc/ikiwiki.cgi

## Dump setup file for shorter commandline
    $ ikiwiki --verbose /usr/cvs/wikisrc ~/public_html/wikisrc \
      --url=http://localhost/~your-user-name/wikisrc --cgiurl \
      http://localhost/~your-user-name/wikisrc/ikiwiki.cgi \
      --dumpsetup ~/wikisrc.setup

# Previewing wikisrc
Open http://localhost/~your-user-name/wikisrc in your web browser.

# Rebuild the difference

    $ ikiwiki --refresh -setup ~/wikisrc.setup

# Rebuild all pages from scratch

    $ ikiwiki --rebuild -setup ~/wikisrc.setup

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb