We were going to be adding a Wiki module to Veracity eventually, anyway; and since we wanted to show you how modules are built, a simple Wiki seemed like a nice place to start. This isn’t production code (yet), but it’s an instructive start.
For today, let’s just get the Wiki installed in your Veracity server and make sure everything’s up and running.
Whether you’re building from source or running from a pre-built installer, you’ll need to download the latest nightly build (22.214.171.12427 or later) to retrieve the Wiki module. If you’ve cloned from our public repository, you’ll want to pull the latest.
Within your source folder or the unpacked archive, look for
.../src/modules/wiki. Within that directory, you’ll see a README file, some license material, a test directory, and the part you actually care about: a
You’ll want to copy the contents of that folder into Veracity’s server files folder. If you’re unsure where that is, run
vv config. Towards the end, you’ll see something like:
in this case, from within
modules/wiki, you’d say (on Unix-y systems):
[~/veracity/src/modules/wiki] $ cp -R server_files/* /home/alanswann/veracity/src/server_files
and your Wiki code should now included with the rest of Veracity.
[~/veracity/src/modules/wiki] $ ls ~/veracity/src/server_files/modules scrum wiki
Note the above-mentioned scrum module alongside the wiki.
Start (or restart)
vv serve, and you should see a
wiki item in the top menu.
Click that. You’ll see a default home page, explaining that, hey, it’s a default home page. You can edit this page (using Markdown), or click the
new page link to add another page.
As pages are created, they’ll show up in the right sidebar, to be clicked and viewed, or inserted into another page’s edit box as links.
Next post, we’ll start looking at the code. The good news? All of the heavy lifting is done for us, from the flexibly-licensed editor and preview tools, to the Veracity libraries that handle saves, updates and merges (gotta have merges, it’s a distributed Wiki, after all). I just glued them together.