432e64f4de75about/mearie.en.txt← 131:d737eacea39f |
204:432e64f4de75 |
215:4b14c93d1734 → |
-rw-r--r--added the introduction to pub.mearie.org (/about/pub).
1 ## vim: syn=mako 2 <%inherit file="mearie.tmpl.html"/> 3 <%! title = u'mearie.org' %> 4 5 As an website, mearie.org has several unusual characteristics. 6 7 8 Domains 9 ======= 10 11 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: 12 13 **`mearie.org`** 14 : The primary website, and contains *official* materials written and created by Kang Seonghoon. 15 **[`j.mearie.org`](http://j.mearie.org/)** 16 : It is a sort of blog and basically available in Korean, but I sometimes find time to write [English posts](http://j.mearie.org/tagged/english). 17 **[`pub.mearie.org`](http://pub.mearie.org)** 18 : A personal encyclopedia project. Only available in Koeran. 19 **[`cosmic.mearie.org`](http://cosmic.mearie.org/)** 20 : A companion to main `mearie.org` website, and contains lots of unofficial materials (i.e. subject to change wildly and considered experimental). 21 **[`hg.mearie.org`](http://hg.mearie.org/) and [`svn.mearie.org`](http://svn.mearie.org/)** 22 : Source code repositories powered by [Mercurial](http://mercurial.selenic.com/) and [Subversion](http://subversion.apache.org/), respectively. The latter is only used for legacy projects. Several major projects are also mirrored in [bitbucket](http://bitbucket.org/lifthrasiir/). 23 **[`tokigun.net`](http://tokigun.net/)** 24 : Used to host *TokigunStudio*, a precursor to mearie.org. Its sole role is to maintain permalinks to it. 25 26 27 Technical detail 28 ================ 29 30 A software for mearie.org had quite strange requirements: 31 32 * Should not force plain HTML, but should allow it if needed. I have no difficulty in writing plain HTML but it is hard to maintain. 33 * Should be mainly static. I didn't use most dynamic features in many softwares and still they cause overheads to the server. 34 * Should not use databases, unless it is just a cache. It has to be readable even if the software is gone. 35 * Should be maintainable off-line. My laptop doesn't have stable Internet connection anyway, and I prefer to write long articles in [Vim](http://vim.org/). 36 * Should be maintained in some VCS, and preferably in distributed VCS. 37 * Should support bilingual environment. 38 * Should have search engine friendly URLs, and still consise. 39 * Should be scriptable. 40 * Should be entirely composed of minimal number of free softwares. 41 42 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](http://werc.cat-v.org/) was close but not perfect[^1]. 43 44 [^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). 45 46 Current mearie.org solution consists of two [Python](http://python.org/) scripts, [Mako](http://makotemplates.org/) templating engine, [Pandoc](http://johnmacfarlane.net/pandoc/), [ImageMagick](http://imagemagick.org/), [Mercurial](http://mercurial.selenic.com/) and Makefile. In detail: 47 48 1. I write the plain (actually [Markdown](http://daringfireball.net/projects/markdown/)) text and add it to Mercurial repository. 49 2. `make` builds the website automatically and incrementally. 50 - Makefile rebuilds itself via Python script if the repository has been changed. So newly added file should be handled automatically. 51 - Makefile also converts the plain text file into HTML file via Python script, which invokes Pandoc and Mako. 52 - 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.) 53 - Mako does templating jobs and also allows some compile-time scripting in Python. 54 - Image and other resources are handled by custom Mako procedure on-demand. 55 3. Web server serves compiled pages. 56 - Bilingual pages are handled by Apache's [`mod_negotiation`](http://httpd.apache.org/docs/2.2/mod/mod_negotiation.html). So I can easily make <`blah.en.txt`> and <`blah.ko.txt`> and link to just <`blah`> (note no <`.html`>!).[^2] 57 - Other than that, all pages are static and can be efficiently served. 58 59 [^2]: There are similar ways for other servers. For example, [lighttpd](http://lighttpd.net/) users can use appropriate `mod_magnet` script for this. 60 61 This solution is somewhat strange but works well. You can find the website source in [Mercurial repository](http://hg.mearie.org/mearie.org/3.x/). (Also linked far below of this page.) 62