File:  [NetBSD Developer Wiki] / wikisrc / wiki / previewing_with_template.mdwn
Revision 1.7: download - view: text, annotated - select for diffs
Sat May 4 10:44:10 2019 UTC (3 years, 1 month ago) by leot
Branches: MAIN
CVS tags: HEAD
Add a note that `wikisrc.setup' is used to refresh/rebuild the wiki in later

[[!meta title="Previewing 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
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

Please note that `wikisrc.setup` configuration file will be reused
to refresh and rebuild the wiki in the next sections with a shorter

# 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

Additionally, if you have disabled inetd, please enable it.

    $ vi /etc/rc.conf

and put


to it.

# 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