Hello and welcome to my site. Here you can find usefull information about my skills, my work, howtos about technical problems and interesting articles in my blog . I really love technology, working with computers, developing usefull software and trying new things. Currently I'm seeking some freelance work. Send me a email if you are interested.

Syntax highlighting for lektor

If you write technical articles about programming or linux systems its very usefull to have a syntax highlighter. For lektor where is a plugin you can use: the [lektor-markdown-highlighter](https://github.com/lektor/lektor-markdown-highlighter) (thanks Armin).

So how to install and configure it? If you have installed lektor you can use this command to enable the highlighter:

$ lektor plugins add markdown-highlighter

Now we create a configuration in configs/ directory. Attention: a fresh lektor installation didn't has this directory so you have to create it by your own. After this create and edit the file markdown-highlighter.ini:

[pygments]
style = colorful

Ok. Mow you ca use syntax highlighting. Put [lexer name] at he start of your code. Here is an example:

```python
import logging
log = logging.get_logger()

for item in items
        print 'value of item is %s' % (item)
        print "hu"
        log.debug(item)

log.debug()
```

And the result:

import logging
log = logging.get_logger()

for item in items
    print 'value of item is %s' % (item)
    print "hu"
    log.debug(item)

log.debug()

Adding disqus to your lektor project

To get in contact with your visitors it is a good idea to provide them the possibility of commenting your posts. Dynamic blog systems like Wordpress can use their own backend for this. A static blog needs help from a special service like disqus. To use discus you have to embed a small JavaScript snippet in your site. Here is a example from my site:

<script>
  var disqus_config = function() { this.page.identifier = "/blog/adding-disqus-to-you-lektor-project"; };
  (function() {
    var d = document, s = d.createElement('script');
    s.src = '//truncated.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
  })();
</script>

So you are worried you have to put this peace of code in your templates? No need to do this. Lektor will give you a helping hand with the plugin [lektor-disqus-comments](https://github.com/lektor/lektor-disqus-comments).

Bring it up to work is easy:

install

lektor plugins add lektor-disqus-comments

Then create a config file disqus-comments.ini in configs/:

shortname = truncated

Replace "truncated " with the name of your channel. No we are nearly finished. Just add this line of code to the template you will have a disqus comment:

<div class="comments">{{ render_disqus_comments() }}</div>