wintermeyer
wintermeyer

Reputation: 8318

Delete empty lines in the final HTML

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.

Upvotes: 1

Views: 246

Answers (1)

wintermeyer
wintermeyer

Reputation: 8318

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 %}

Upvotes: 2

Related Questions