werc
Werc is a minimalist content management system (CMS) with a web interface implemented using the rc shell and the Plan 9 from Bell Labs tools provided as part of Plan 9 from User Space.
Originally developed for cat-v.org it has become more generalized. One of its major features is the easy management of multiple domains and virtual hosts from a single installation.
It is designed to be simple yet flexible while keeping setup easy (untar, configure httpd, create a directory for your site and start adding content right away).
It can also handle, plain text, markdown (or other user configurable markup) and integrate existing html files into the same site.
The goal is to provide a consistent interface for all documents while staying out of your way and avoiding any repetitive work.
Download
See the downloads page for tarballs of all releases. See the hg web interface below to get a copy of the latest development source.
(More or less idiosyncratic) Features
- Purely file system based, all documents are stored in a file tree as plain text files (.html files and .txt files are also handled and integrated transparently), no need for any database.
- Also allows for dynamically generated pages/scripts/applications that can take advantage of the framework (for an example see the dynamically generated gsoc project status table).
- Easy embedding of pre-existing html documents into the framework.
- Easy management of multiple domains/sub-domains/virtual-hosts from a single installation (just add another directory under sites/), and easy sharing of templates and files among sites.
- Markdown templating plus template cache (thanks Mechiel!) to make up for dog-slow markdown implementations.
- Automatic sitemap generation.
- Bloging system including rss feeds.
- More that I probably have forgotten about.
Development
To get a copy of the latest development code using mercurial, do:
hg clone http://gsoc.cat-v.org/hg/werc/
You can also browse the online repository.
Dependencies
To run werc you will need a recent version of Plan 9 from User Space and a sane version of awk (ideally the original one maintained by Brian Kernighan). Compiling statically p9p and awk is probably a good idea and will improve performance on platforms with dog slow fork(2) (linux fork(2) is a few magnitude orders faster for statically linked binaries).
If you use the included markdown.pl you will need perl too, sorry.
Contact
For questions, suggestions, bugrepports and contributing patches you can join the werc9 mailinglist.
On irc, join #plan9 on irc.freenode.org
Links
- werc project at freshmeat - You can get new release notifications there.
License
Public domain (by default includes markdown.pl which has a different license, but this can be replaced).
Credits
Thanks to Kris Maglione (aka JG) for implementing rss feeds, for writing the awk rc-templating system, and other help and inspiration (some parts of the code were based on JG's diri wiki).
Thanks to Mechiel (aka oksel) for the md_cache script.
Thanks Garbeam (aka arg) for writing the original diri code and showing that writing complex web apps in rc was feasible.
And thanks to everyone else whom I have forgotten and that has provided fixes and feedback.
TODO
Too much to list here.
- Blog:
- Atom feeds
- Comment threading
- Some form of pagination/history browsing
- Sitemaps:
- In the sitemap index pages should be used for description of directories
- Cache web sitemap generation
- Layout improvements:
- Fixed width of left sidebar (so design scales down to cellphone-sized-screens)
- More testing and optimizations for movile browsers ( eg., http://www.operamini.com/demo/ )
- Need to find a way to rig the order of items in the sidebar
- Better page titles (include whole path hierarchy?)
- Allow utf-8 characters in path elements (need to make sure this is safe)
- General code:
- Write a regression test suite
- Replace all references to non p9p/p9 programs
- Better defined 'API' for sub-apps, both a set of environment vars apps can rely on (and in some cases set) and functions they can call (WIP).
- Misc
- Better generation of descriptive HTML META tags, eg.,: {META name="description" content="This is the Google Summer of Code blog for Plan9 and Inferno projects."} {META name="keywords" content="google, summer of code, inferno, plan9, programming"}
- Should add werc to certain wikipedia lists:
- http://en.wikipedia.org/wiki/Listofcontentmanagementsystems
- http://en.wikipedia.org/wiki/Comparisonofwiki_software
Future plans:
- Tagging (eg., append to _werc/tags)
- Wiki app (replacement for diri) (work in progress)
- Bug/issue tracking app
- Further modularization and extensibility (meta-templates)
- A way to wrap external applications (eg., hg/git browser)
- A way to generate static sites (ie., use werc as a pure templating system)
- 9P interface
- New (simplified) markdown implementation, ideally in C or awk (maybe smu/libsmu by gottox?):
- Simplified
- Tables
- Images
- Autogenerated anchors
- No inline html
Known bugs:
- http://gsoc.cat-v.org/blog/asdfasdf/blog/ should give a 'not found' error
- Listing of files/dirs with (single) dots is broken (1.0 blocker)
- Finding directories that are inaccessible (-rx) can generate an infinite loop (probably in menu hierarchy generation code)
- Some cat-v.org bits still left over here and there, should make them configurable (1.0 blocker) (almost fixed?)
Resolved issues and implemented features:
- Web interface to submit new posts
- Provide default footer.inc in /lib/
- Move _default.tpl to _werc/lib so it can easily be shared across milti-dom setups
- Links to search page in top-right toolbar
- Dirfilter var has different semantics in sitemap filtering than in sidebar filtering (likely fixed)
- Dynamic generation of sitemap.txt
- Better modularization/integration of blog/rss related code.
- Permanent redirections by setting a variable in _config, avoiding need to mess around with httpd configuration for page moves. (done, set redirectPermanent var)
- Broken links in blog titles in post listing, eg: http://repo.cat-v.org/libixp/news/
- Too wide margins for .html (troffied) in low screen resolutions
- Better display of single blog entries (done but maybe could use more work)
- Make a proper 0.1 release
- Autogenerated sitemaps (both .txt and .html versions) (done, but probably needs more work/caching and only html version are dynamic so far)
- Modularize footer the same way the top header is
- Should set
<BASE href=...>header so links and images in 'implicit dirs' work even when there is no trailing/. (Resolved in a better way by redirecting always to the canonical dir path ending with /) - Reorganize execution flow to allow for header changes imediately before page generation, useful to set redirections, caches, cookies, and errors.
- Give proper 404 errors for non existent pages, ie., no soft-404 (1.0 BLOCKER)
- Direct links to .txt files in dir listings should be replaced with proper links without trailing '.txt'
- Display .txt files in menu listings and sitemaps
- Some not-found errors for certain rss feeds? (1.0 blocker)