Ask HN: Lightweight Programmer's CMS?
Does anyone have any recommendations for a lightweight CMS?
I'm happy writing pages in HTML & CSS but I need something to take care of the menus, header and footer etc ("theme" if you like).
So far I've survived with a shell script that literally cats some common header and footer HTML onto my pages, but I feel there has to be a better solution.
Update: It seems what I'm looking for is often known as a "Static-site generator".
30 comments
[ 2.8 ms ] story [ 72.0 ms ] threadMy only concern is that it seems oriented more towards blogs; do you think I'll have any problems using it for a small open-source project website?
You can use the 'topic' feature to select "non-blog" articles with a given topic. Say if you want a menu entry generated with links to all your 'documentation' topic pages.
I forget what the tool/library is called, but there is even support for syntax highlighting code. Lots of languages supported, even Erlang which is properly obscure I think.
I find the Yaml premable in articles very useful, if I add a description entry there, i can refer to page.description in my template to add a meta-description header, and in the RSS feed i can use it to summarize the article.
I also feel pretty secure in that if I would ever want to give up on Jekyll most of my site would be in textile format which is quite practical and supported by other things than ruby.
The markup language and the templating engine are the things that really make this effort worth it. Especially since you can now use your favourite editor to edit posts. You can't really do that with wordpress.
I do use Wordpress at the minute, and pasting text from Vim tends to be painful, which is one of the reasons I don't want to use it for my project website.
Going on what I've seen so far, I think Jeykll might be the best choice.
There's also werc (http://werc.cat-v.org/).
It features various markup languages, some syntax highlighting options, autobuild, and more.
http://webby.rubyforge.org/
http://nanoc.stoneship.org/
- I'd rather keep things completely static if I can
- It ties my site to Apache a bit
- I may as well take advantage of some of the other features Jekyll etc provide
It's a single Python file, with support to mardown, textile etc. The template is one single file too which is based on YUI.
It is not very flexible, but doesn't take very much effort either.
I slice and dice CSS and html until I like the page layout, then abstract the common parts and put them in DEFPAGE. I even have session-based stuff that shows a login/logout stuff on the top of each page in tiny font, so logged in users can view the public pages and know they're still logged in.
[Edit: Tonight I wrote self-validating CLOS objects that map to a database record. They generate their own Lisp and Javascript validators and the validators are auto-invoked both on the client and the server whenever their respective object is instantiated. On the javascript side, instanciation is attached to the :action of a form; it's clean and pretty, but forces me to use a seperate form for each class/table. I only came up with the idea this afternoon, so give it some time.]
http://mv.asterisco.pt/cat.cgi?cat.cgi http://mv.asterisco.pt/cat.cgi?index.cgi
(View source)
-- MV
Basically, you design and code up your pages as if they were static, then insert "template tags" where you want to put your title, content, footer, menu - all of which is then pulled from the CMS database. I might be barking up completely the wrong tree here but it works for me when I want to throw up a site quickly.
The data can be anything, products, customers, or lists of blog posts. The Qrimp blog is managed with the Qrimp publisher, for example: http://www.qrimp.com/blog/categories.Features.html
With the templating system, you can create complex query structures to pull in data from any table in your Qrimp app. It is a programming construct of sorts that allows you to create static pages that are the result of dynamic queries, so your website loads really fast, but it is based on a dynamic database.
http://staticmatic.rubyforge.org/
http://github.com/staticmatic/staticmatic/tree/master
I maintained my site with hand edited html, then I wrote a template engine for it, but for one year I have just ported everything on Foswiki (Foswiki is the active fork of TWiki), and have no regret. And if I want to add features, I can code plugins to it, use other people plugins.
Seems very hard to beat a lisp style solution such as the one posted by mahmud. lisp html generation always seems so much more concise than other languages.
I've started writing one in python similar to mahmuds. Might be the perfect time for me to learn clojure.
http://cixar.com/swl/