How shall I install PmWiki into our web application’s directory structure? I have source code, third-party library, and (user generated) data sub-directories. A wiki spans all three: it should be installed in the library area, the generated wiki pages should go into data, and pages that are to be kept long-term must be backed up. I don’t want a separate backup procedure, thus I wish to place the wiki content under Subversion source code control.
Wiki packages seem to prefer their default directory scheme, so I decided against trying to force PmWiki into my structure and instead will create a new top-level directory just for it. The plan is that only this pmwiki directory and the wiki.d and local sub-directories will be under subversion control. All other files and directories will be unversioned.
Initial installation of the PmWiki software:
- mkdir -p pmwiki/{wiki.d,local}
- svn add pmwiki
- ln -s pmwiki{,-2.1.27} # symbolic link so that the versioned tar file is extracted into the controlled directory.
- tar -xzf pmwiki.tgz
- rm pmwiki-2.1.27
- Edit local/config.php
- Add the “rename” action to cookbook area, config.php (and optionally to Site/ EditForm).
- Modify the logo and skins/themes.
Both developers and eventually end-users will be editing Help and Manual pages using the Wiki interface. This editing may occur on the development web server or the public system. I want to capture “approved” changes into subversion, which I believe can be done by committing the wiki.d directory periodically.
Once end-users start editing the public site, developers must either: a) make our edits on the public site also, or b) update our development server to match the public site, make our edits, commit the update, and re-publish to the public site. Option b must be done quickly or by disabling editing on the public site during the update.
Suppose we arrive at a point where there are numerous desired updates made by the user community, a few vandalized pages, plus other edits which we don’t want to adopt into the official documentation. Here’s a procedure:
- Clone the public site’s wiki.d onto the development server.
- On the development machine, restore or svn revert the vandalized pages.
- Restore, modify, or svn revert the updates we wish to discard.
- svn commit the wiki.d directory.
- Check-out and publish the updated configuration to the public site.