getpelican/pelican-plugins — pull request #199 by krischer (2014-04-30 23:24:27+00:00)
Title: Liquid Tags: line numbers for include_code

This PR adds line numbers to the include_code directive in the liquid tags plugin.

The syntax is now

```
{% include_code /path/to/code.py [lang:python] [lines:X-Y] [:hidefilename:] [title] %}
```

All arguments are optional but their order must be kept. It could be done in a slightly nicer fashion but this way it stays fully backwards compatible. If the lines argument is omitted, it will still show the whole file.

Example that only shows the first ten lines and hides the actual filename but shows `Some Title` as the title.
```
{% include_code /path/to/code.py lines:1-10 :hidefilename: Some Title %}
```