File:  [NetBSD Developer Wiki] / wikisrc / wiki / previewing_with_template.mdwn
Revision 1.3: download - view: text, annotated - select for diffs
Sat Jan 11 01:46:58 2014 UTC (19 months, 2 weeks ago) by ryoon
Branches: MAIN
CVS tags: HEAD
Add httpd setup

[[!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 wiki.NetBSD.org 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 \
      --plugin goodstuff --plugin websetup

## 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 \
      --plugin goodstuff --plugin websetup \
      --dumpsetup ~/wikisrc.setup


# Setting up bozohttpd webserver
Put the following line to your /etc/inetd.conf.
This line enables per-user directories.

    http	stream	tcp	nowait:600	_httpd	/usr/libexec/httpd	httpd -u /var/www

# 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 <wikimaster@NetBSD.org> software: FreeBSD-CVSweb