From 76cf8b5fe1f4d95f810bbbda316b56b7d77eeac8 Mon Sep 17 00:00:00 2001 From: RealOrangeOne Date: Fri, 29 Jul 2016 12:00:06 +0100 Subject: [PATCH] minify HTML --- pelicanconf.py | 18 +++++++++++++----- requirements.txt | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pelicanconf.py b/pelicanconf.py index ab16a3e..8bcf691 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals @@ -37,14 +36,14 @@ AUTHORS_SAVE_AS = False CATEGORIES_SAVE_AS = False ARCHIVES_URL = False ARCHIVES_SAVE_AS = False +AUTHOR_URL = False +AUTHOR_SAVE_AS = False # Override page URLs PAGE_SAVE_AS = "{slug}/index.html" PAGE_URL = "{slug}" ARTICLE_SAVE_AS = "{category}/{slug}/index.html" ARTICLE_URL = "{category}/{slug}/" -AUTHOR_URL = "author/{slug}/" -AUTHOR_SAVE_AS = "author/{slug}/index.html" CATEGORY_SAVE_AS = "{slug}/index.html" CATEGORY_URL = "{slug}/" @@ -54,13 +53,22 @@ FEED_DOMAIN = SITEURL # Setup plugins PLUGIN_PATHS = ["pelican_plugins", "plugins"] -PLUGINS = ["sitemap", "filetime_from_git", "pelican-jinja2content", "metatags", "autopages"] +PLUGINS = [ + "sitemap", + "filetime_from_git", + "pelican-jinja2content", + "metatags", + "autopages", + "minify" +] SITEMAP = { "format": "xml" } - CATEGORY_PAGE_PATH = "theme/templates/categories" +MINIFY = { + "remove_comments": True +} # Setup markdown extensions from fontawesome_markdown import FontAwesomeExtension diff --git a/requirements.txt b/requirements.txt index 6ad2f84..4a44c26 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ iso8601==0.1.11 markdown==2.6.6 git+https://github.com/ryneeverett/python-markdown-comments.git pelican==3.6.3 +pelican-minify==0.9 pyembed-markdown==1.1.0