Originally published 2010-12-02 11:40:49

The Not Insane Guide to Setting Up werc

I used to maintain my website using plain old HTML files. That works fine, considering how small my site is, but I decided a CMS would be nice, and I decided werc was probably the way to go. Werc is to CMSes what Loathsxome is to blogs. It uses plain files and directories instead of some silly database. It's also written in rc, the plan9 shell, which is kind of neat.

The downside of werc is that it doesn't have a simple HOWTO or tutorial for setting it up. So, here's a quick-and-dirty version:

  1. Download werc from the website, and un-tar it somewhere.
  2. Follow their web server setup instructions for your web server. I use lighttpd, and the instructions worked fine.
  3. Create a directory sites/example.com for your website to live in, but only if the domain of your website is actually example.com. This is where I got caught up: I was hitting the site as beta.xvx.ca, but my directory was called xvx.ca, so nothing showed up. When I symlinked beta.xvx.ca to xvx.ca, it worked!
  4. Edit index.md, which will become your homepage. If you edit foo.md, it will be visible at example.com/foo. If you edit bar/index.md, it will be visible at example.com/bar.
  5. If it's not working, make sure the permissions are right on everything. This caught me a couple times.
  6. To change how it looks, edit the templates in lib/ and the stylesheets in pub/styles.

That step 3 cost me a lot of time. Watch out for it.