From d5585c1a735f98c8f061de33cde8ece13dafe3f8 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 29 Jul 2016 21:55:19 +0100 Subject: [PATCH] only minify production builds --- circle.yml | 2 ++ pelicanconf.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 0762842..8290392 100644 --- a/circle.yml +++ b/circle.yml @@ -3,6 +3,8 @@ machine: version: 3.5.1 node: version: 5.11.1 + environment: + DEBUG: false dependencies: pre: diff --git a/pelicanconf.py b/pelicanconf.py index 8bcf691..8618c0b 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -62,12 +62,17 @@ PLUGINS = [ "minify" ] +if "DEBUG" in os.environ: + PLUGINS.append("minify") # only minify on production build + SITEMAP = { "format": "xml" } CATEGORY_PAGE_PATH = "theme/templates/categories" MINIFY = { - "remove_comments": True + "remove_comments": True, + "remove_optional_attribute_quotes": False, + "reduce_boolean_attributes": True } # Setup markdown extensions