mearie.org

As an website, mearie.org has several unusual characteristics.

Domains

There are two personal domains operated by Kang Seonghoon, which can be considered as integral parts of broader mearie.org. This includes the following websites:

mearie.org
The primary website, and contains official materials written and created by Kang Seonghoon.
j.mearie.org
It is a sort of blog and basically available in Korean, but I sometimes find time to write English posts.
pub.mearie.org
A personal encyclopedia project. Only available in Korean.
cosmic.mearie.org
A companion to main mearie.org website, and contains lots of unofficial materials (i.e. subject to change wildly and considered experimental).
hg.mearie.org and svn.mearie.org
Source code repositories powered by Mercurial and Subversion, respectively. The latter is only used for legacy projects. Several major projects are also mirrored in bitbucket.
tokigun.net
Used to host TokigunStudio, a precursor to mearie.org. Its sole role is to maintain permalinks to it.

Technical detail

A software for mearie.org had quite strange requirements:

I have tested several methods to meet these requirements for years, and my current solution (as used in mearie.org) reflects them. Unfortunately I didn't find any other solutions; most BBSes, blogs and CMSes are rejected early. werc was close but not perfect1.

Current mearie.org solution consists of two Python scripts, Mako templating engine, Pandoc, ImageMagick, Mercurial and Makefile. In detail:

  1. I write the plain (actually Markdown) text and add it to Mercurial repository.
  2. make builds the website automatically and incrementally.
    • Makefile rebuilds itself via Python script if the repository has been changed. So newly added file should be handled automatically.
    • Makefile also converts the plain text file into HTML file via Python script, which invokes Pandoc and Mako.
    • Pandoc converts Markdown syntax. Since this is a bit slow, the results are cached for later use. (This is so efficient that I could use it in a navigation construction.)
    • Mako does templating jobs and also allows some compile-time scripting in Python.
    • Image and other resources are handled by custom Mako procedure on-demand.
  3. Web server serves compiled pages.
    • Bilingual pages are handled by Apache's mod_negotiation. So I can easily make blah.en.txt and blah.ko.txt and link to just blah (note no .html!).2
    • Other than that, all pages are static and can be efficiently served.

This solution is somewhat strange but works well. You can find the website source in Mercurial repository. (Also linked far below of this page.)


  1. werc uses a CGI script for serving all pages -- it would mean every request is translated to one process invocation, thus inefficient. Also I don't like its use of plan9port as it is not so universal (e.g. not present in several Linux distributions).

  2. There are similar ways for other servers. For example, lighttpd users can use appropriate mod_magnet script for this.


(rev 1d46270eb038)