Wikifs

WIKIFS

This guide assumes you have set up httpd(8) according to the guide.

First we copy the sample wiki:

; mkdir /sys/lib/wiki.plan9
; cd /sys/lib/wiki && tar cp .} | {cd /sys/lib/wiki.plan9 && tar xT}
; mkdir -p /usr/web/$sysname/wiki/

Next, download create.html and put it in /usr/web/$sysname/wiki/:

https://9p.io/wiki/plan9/create.html

NOTE: It will not be possible to create/write to this file after wikifs(4) is mounted, so do this before mounting.

NOTE: You may want to edit line 24 of create.html to change the relative path to match your hierarchy.

In /cfg/$sysname/cpurc, make sure to add this line before calling ip/httpd/httpd:

; wikifs -p 666 -s wiki.$sysname -a tcp!*!wiki /sys/lib/wiki

Then in /cfg/$sysname/namespace.httpd, you must add a line similar to the below to mount the service created by wikifs(4):

# wiki
; mount -bc '#s'/wiki.$sysname /usr/web/$sysname/wiki

Create the directories as needed:

; mkdir -p /usr/web/$sysname/wiki/

Next, mount the wikifs(4) and download create.html:

; mount -bc '#s'/wiki.plan9 /usr/web/plan9/wiki

A script can be used to generate an index page:

{
	echo 'Wiki Index'
	echo 'Index of wiki pages:'
	sed 's/([0-9]*) (.*)/ * \[\2] (\1)\<\/a\>/' /sys/lib/wiki.plan9/d/map | sort
} > /usr/web/plan9/wiki/index.html

The script below can be used to generate wiki markup:

{
	echo Wiki Index
	echo
	echo Index of wiki pages:
	echo
	sed 's/([0-9]*) (.*)/ * [\2] (\1)/' /sys/lib/wiki.plan9/d/map | sort
} >/tmp/windex

https://9p.io/wiki/plan9/create.html


Last modified Fri Feb 20 18:32:58 PST 2026 [ Top | Edit | History | Changelog | Create a new page ] About the server | Powered by Plan 9