Skip to content

Instantly share code, notes, and snippets.

@pathawks
pathawks / Liquid Minify for Jekyll.md
Last active November 20, 2023 13:52
Liquid Minify

Simply call this template from your master Jekyll template, and your site will be (more or less) minified

@JimmyRittenborg
JimmyRittenborg / compress.liquid
Last active June 17, 2023 12:11
HTML Compressor in Shopify Liquid
{% 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 %}