okfn / opendatahandbook

Open Data Handbook v2
http://opendatahandbook.org/
202 stars 263 forks source link

Whitespace in generated pages #52

Closed Deiz closed 9 years ago

Deiz commented 9 years ago

It seems that Liquid leaves behind whitespace, even in statements that generate no output. This is most evident in the menu template, which has nested for loops that generate >50 kB of needless whitespace-only lines in every page.

It's not particularly important given modern broadband connections, but it would be nice to eliminate the whitespace during the generation process, preferably without fully minifying the output.

pwalsh commented 9 years ago

Hi @Deiz nice point. Liquid (the templating engine employed by Jekyll) does not have any native functionality to remove whitespace. It is more important for us to have an automated push + build flow on github pages, and so we couldn't write a plugin to remove whitespace either.

Therefore, I'm marking this as wontfix and closing.

Deiz commented 9 years ago

There are some non-plugin solutions as well, e.g. jekyll-compress-html.