Remove beautify plugin

This commit is contained in:
Santiago Lo Coco 2022-02-10 19:17:35 -03:00
parent 245bdaa89e
commit a49a41b4a9
3 changed files with 1 additions and 29 deletions

View File

@ -123,7 +123,6 @@ github: [metadata]
# -----------------------------------------------------------------------------
remove_HTML_comments: false
beautify: false
minify: true
sass:

View File

@ -27,4 +27,4 @@
{%- assign content = content | remove_first: _comment -%}
{%- endfor -%}
{%- endif -%}
{{ content | beautify | minify }}
{{ content | minify }}

View File

@ -1,27 +0,0 @@
require 'htmlbeautifier'
module Jekyll
module StripHTML
def beautify(content)
if beautify_enabled?
content = HtmlBeautifier.beautify(content)
else
content
end
end
private
def beautify_enabled?
config = @context.registers[:site].config
true?(config['beautify'])
end
def true?(obj)
obj.to_s.downcase == 'true'
end
end
end
Liquid::Template.register_filter(Jekyll::StripHTML)