Website ported to Jeyll

25 Jan 2014

I finally managed to port most of the functionality of my old Wordpress website to Jekyll, a static blog generation tool.

I dropped the requirement of providing content in both English and German. All previous content is still available in English. Future content might be available in either English or Germain.

Furthermore comment posting is not available for now. To avoid dropping old comments, I prepared a small system for integrating comments into the website generation process. However, the system misses a comment form to post new comments. This will require a bit of server side code that I might add later.

Another approach to solve the comment problem would be the use of a cloud based comment service. This would bring me back to dynamic website generation, what I tried to avoid. Furthermore I’m not a big fan of the cloud idea.

Why Jekyll?

I like using browser addons to block JavaScript and other dynamic content - unless I permitted scripts for a concrete site. Hence I like the idea of having a script-less website. That’s what Jekyll provides: The only “scripting” work takes place before the content is uploaded to the webserver. The result is purely static content.

Additionally, with Jekyll it’s really easy to integrate code snippets with pretty syntax highlighting powered by Pygments. This, for example, is an MNRT CUDA function to add/substract/multiply/divide two arrays on the GPU:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
template <MNCudaOP op, class T>
__global__ void kernel_ArrayOp(T* d_target, T* d_other, uint count)
{
    uint idx = blockIdx.x * blockDim.x + threadIdx.x;

    if(idx < count)
    {
        switch(op) // COMPILE TIME
        {
        case MNCuda_ADD:
            d_target[idx] = d_target[idx] + d_other[idx];
            break;
        case MNCuda_SUB:
            d_target[idx] = d_target[idx] - d_other[idx];
            break;
        case MNCuda_MUL:
            d_target[idx] = d_target[idx] * d_other[idx];
            break;
        case MNCuda_DIV:
            d_target[idx] = d_target[idx] / d_other[idx];
            break;
        }
    }
}