getpelican/pelican — pull request #628 by mblayman (2012-12-09 01:41:41+00:00)
Title: A leaner, more efficient default theme

This branch modifies the default theme to provide about 5% smaller output for pages.

The default theme uses blocks that don't remove any whitespace. When looking at the result, there are plenty of extra lines and characters which are not needed. The primary reason is that Jinja was not set to trim whitespace. Rather than modify the Jinja setting (because that may affect other themes that are written based on the assumption that block will not trim whitespace), I have modified most of the default theme to use the {%- block form instead of {%.

The affect of this modification is about a 5% reduction in characters on a page. Here is some sample output that shows a before and after.

```sh
$ find output/ -print | grep html | xargs wc -m
3843 output/archives.html
6083 output/author/matt-layman/index.html
3688 output/categories.html
6091 output/category/extra/index.html
5985 output/index.html
3922 output/pages/christian/index.html
4005 output/pages/engineer/index.html
6201 output/posts/2012/11/23/hello-world-again/index.html
6080 output/tag/blogging/index.html
6080 output/tag/markdown/index.html
6079 output/tag/pelican/index.html
0 output/tags.html
58057 total

$ find output/ -print | grep html | xargs wc -m
3664 output/archives.html
5843 output/author/matt-layman/index.html
3509 output/categories.html
5851 output/category/extra/index.html
5773 output/index.html
3729 output/pages/christian/index.html
3812 output/pages/engineer/index.html
5989 output/posts/2012/11/23/hello-world-again/index.html
5840 output/tag/blogging/index.html
5840 output/tag/markdown/index.html
5839 output/tag/pelican/index.html
0 output/tags.html
55689 total
```
I'm new to this pull request stuff so I don't know what I did wrong. I tried to merge getpelican/master into this branch and GitHub is showing that this pull request has 11 unique commits from me. However, only "Modified the theme to use way less whitespace" was the relevant commit (plus the merge for some conflict resolution).

What should I have done differently? I'd be happy to change the pull request to just make it the content in question.