PulkoCMS is a small content management system. It was created to manage this website.
The idea is to get a simple and versatile system to easily manage the website. PulkoCMS relies on simple flat files and UNIX features to get the job done. There is no need for an heavy SQL database, just a perl interpreter and some files.
- UNIX integration : use files, folders, and UNIX users.
- Easy installation: just a variable to set up in the main script.
- Direct ftp/ssh access to article and comments content. No need for a complex online interface to edit them.
- Fast page generation, no SQL request execution time.
- Secure script: filters out html tags from comments.
- Comments on articles, with a "recent comments" box.
- Gravatar icon support in comments.
- Short, readable and easily modifiable sourcecode: less than 400 lines of mixed html and perl.
- Generates valid XHTML code (if you don't mess it up with your articles text).
PulkoCMS will build the page from a directory tree. You can adjust the PULKOCMS_ROOT variable to tell it where it is installed. There, you should have a folder called "cat". In this folder, you can put other folders that will be your categories. In each category folder, you must have a file called "cat.desc" that contains a short description of the category. This will be displayed in the sidebar. You can also add articles, they are file called "Article title.article". The content of the file is raw html, without header. UNIX file owner full name and modification date are used to identify the article.
You can have ".article" files in the cat/ folder. These will be displayed when there is no category selected. It's a good place for news.
If a category name starts with a dot, it won't show up in the category list, but you still can link to it. This is used for the "users" and "liks" categories on this site.
If you want an article to show up in different categories, just use symlinks.
Comments are stored in a file whith the same name of the article, but the extension is .comment. The format is name\0date\0content\0email address. This was chosen because people rarely use \0 in their name...
Feel free to use this and report bugs to me ! I made it for my own use but I would be happy to improve it.
Setting it up
Well, there is almost nothing to do...
- Unpack it somewhere. You need index.pl to be an exectutable cgi script, depending on the config of your webserver this means putting it in /usr/lib/cgi-bin/, chmod +x it, or some oher magic. The pulkocms folder can be anywhere, and you can rename it.
- Edit index.pl to make the $PULKOCMS_ROOT variable point to the pulkocms folder. This is where you will put all your articles, so the folder will have to be readable and writable by www-data (we also store comments and shoutbox contents inside it). It seems a good idea to make your user the owner, and www-data the group. Or www-data the user, and some group of users you want to contribute to the site the group. Well, both should have read&write access. Do as you want.
- Also set the $WEB_ROOT variable to tell PulkoCMS where it is located. This is used as a prefix for all the generated URLs
- You need URI::Escape. In Debian this is the apt package liburi-perl.
- The current version requires some mod_rewrite functionality. Enable it on your server if it's not done. Here is the regexp I use to redirect my URIs (I put it in /etc/lighttpd/lighttpd.conf). If you use Apache, you may have to somewhat alter it:
url.rewrite-once = ( "^(.*)/articles/([^/]*)/([^/]*)/([^/]*)" => "$1/index.pl?node=$2&cat=$3&art=$4" )
- Multilanguage support: article are named "name.EN.article", show an icon on article page when other language is available, allow user to select favorite language, still display other languages when favorite is not available.
- Online editor for articles : get content if article exists, else create file. Allow delete, hide article/category
- Helper scripts for setup and creating of base directories with some sample articles.
- 0.1 (24/06/09) : first public release
- 0.3 (25/06/09) : shoutbox, comments, spaces in categories names, link to users category on author name.
- 0.4 (26/06/09) : some bugfixes, "recent comments" box, made the css layout fluid (whole width).
- 0.5 (27/06/09) : Bugfixed comment form hacking protection, added a cheatmode to the shoutbox.
- 0.5 (28/06/09) : Gravatar support in comments, short dates in "recent comments" box.
- 0.6 (??/06/09) : Photo gallery (well actually just a little helper script to generate an article for every .jpg in a given folder), nodes (ie hyper-categories).
- 0.7 (06/07/09) : Use mod_rewrite for somewhat nicer URL that should allow google referencing to work better (not only on the front page).
- 0.8 (08/08/09) : Allow PulkoCMs to be installed somewhere else than the root of the website.
This work is distributed under the BSD licence. I'd like to get feedback and
patcheshacks) if you use it, but I won't force you.
Get it here !