From beaa167eac58585887b5219fdd0aa678be37461a Mon Sep 17 00:00:00 2001 From: TheOrangeOne Date: Thu, 8 Sep 2016 22:14:42 +0100 Subject: [PATCH] add values to settings --- config/config.yml | 21 ++++++++++++++++++++- config/pelicanconf.py | 28 +++++++++------------------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/config/config.yml b/config/config.yml index 20e9ff3..45185d2 100644 --- a/config/config.yml +++ b/config/config.yml @@ -1 +1,20 @@ -foo: bar +author: Jake Howard +site_name: TheOrangeOne +url: https://theorangeone.net +timezone: Europe/London +language: en + +pelican_plugins: + - sitemap + - filetime_from_git + - pelican-jinja2content + - metatags + - autopages + - screenfetch + +sitemap_format: xml + +minify_config: + - remove_comments: true + - remove_optional_attribute_quotes: false + - reduce_boolean_attributes: true diff --git a/config/pelicanconf.py b/config/pelicanconf.py index 471a128..d44cb5d 100644 --- a/config/pelicanconf.py +++ b/config/pelicanconf.py @@ -5,14 +5,15 @@ import sys, os sys.path.insert(0, os.path.realpath('./')) from config import settings +print("Settings: ", settings) # Global core settings -AUTHOR = 'Jake Howard' -SITENAME = 'TheOrangeOne' -SITEURL = 'http://theorangeone.net' +AUTHOR = settings.author +SITENAME = settings.site_name +SITEURL = settings.url PATH = '../content' -TIMEZONE = 'Europe/London' -DEFAULT_LANG = 'en' +TIMEZONE = settings.timezone +DEFAULT_LANG = settings.language PAGE_PATHS = ["pages"] THEME = "../theme" THEME_STATIC_DIR = "static" @@ -61,27 +62,16 @@ FEED_DOMAIN = SITEURL # Setup plugins PLUGIN_PATHS = ["../pelican_plugins", "../plugins"] -PLUGINS = [ - "sitemap", - "filetime_from_git", - "pelican-jinja2content", - "metatags", - "autopages", - "screenfetch" -] +PLUGINS = settings.pelican_plugins if BUILD_PRODUCTION: PLUGINS.append("minify") # only minify on production build SITEMAP = { - "format": "xml" + "format": settings.sitemap_format } CATEGORY_PAGE_PATH = "theme/templates/categories" -MINIFY = { - "remove_comments": True, - "remove_optional_attribute_quotes": False, - "reduce_boolean_attributes": True -} +MINIFY = settings.minify_config # Setup markdown extensions from fontawesome_markdown import FontAwesomeExtension