1

The HTML output of my Jekyll project is filled with whitespace. What is the easiest way to delete empty lines in the HTML output of Jekyll? Is there a hook I can use?

I'm searching for the right place/hook so that jekyll build takes care about everything.

wintermeyer
  • 8,178
  • 8
  • 39
  • 85

1 Answers1

2

There is a useful plugin for this: https://github.com/aucor/jekyll-plugins/blob/master/strip.rb

Once it is installed in the _plugins directory you just have to add the following bracket to _layouts/default.html

{% strip %}

[...]

{% endstrip %}
wintermeyer
  • 8,178
  • 8
  • 39
  • 85