Simply call this template from your master Jekyll template, and your site will be (more or less) minified
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Input | |
{% endcomment %}{% capture _content %}{{ content }}{% endcapture %}{% comment %} | |
Remove redundant closing tags | |
{% endcomment %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% for _element in _endings %} | |
{% capture _end %}</{{ _element }}>{% endcapture %} |