add values to settings
This commit is contained in:
parent
7ef539754b
commit
beaa167eac
2 changed files with 29 additions and 20 deletions
|
@ -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
|
||||||
|
|
|
@ -5,14 +5,15 @@ import sys, os
|
||||||
sys.path.insert(0, os.path.realpath('./'))
|
sys.path.insert(0, os.path.realpath('./'))
|
||||||
|
|
||||||
from config import settings
|
from config import settings
|
||||||
|
print("Settings: ", settings)
|
||||||
|
|
||||||
# Global core settings
|
# Global core settings
|
||||||
AUTHOR = 'Jake Howard'
|
AUTHOR = settings.author
|
||||||
SITENAME = 'TheOrangeOne'
|
SITENAME = settings.site_name
|
||||||
SITEURL = 'http://theorangeone.net'
|
SITEURL = settings.url
|
||||||
PATH = '../content'
|
PATH = '../content'
|
||||||
TIMEZONE = 'Europe/London'
|
TIMEZONE = settings.timezone
|
||||||
DEFAULT_LANG = 'en'
|
DEFAULT_LANG = settings.language
|
||||||
PAGE_PATHS = ["pages"]
|
PAGE_PATHS = ["pages"]
|
||||||
THEME = "../theme"
|
THEME = "../theme"
|
||||||
THEME_STATIC_DIR = "static"
|
THEME_STATIC_DIR = "static"
|
||||||
|
@ -61,27 +62,16 @@ FEED_DOMAIN = SITEURL
|
||||||
|
|
||||||
# Setup plugins
|
# Setup plugins
|
||||||
PLUGIN_PATHS = ["../pelican_plugins", "../plugins"]
|
PLUGIN_PATHS = ["../pelican_plugins", "../plugins"]
|
||||||
PLUGINS = [
|
PLUGINS = settings.pelican_plugins
|
||||||
"sitemap",
|
|
||||||
"filetime_from_git",
|
|
||||||
"pelican-jinja2content",
|
|
||||||
"metatags",
|
|
||||||
"autopages",
|
|
||||||
"screenfetch"
|
|
||||||
]
|
|
||||||
|
|
||||||
if BUILD_PRODUCTION:
|
if BUILD_PRODUCTION:
|
||||||
PLUGINS.append("minify") # only minify on production build
|
PLUGINS.append("minify") # only minify on production build
|
||||||
|
|
||||||
SITEMAP = {
|
SITEMAP = {
|
||||||
"format": "xml"
|
"format": settings.sitemap_format
|
||||||
}
|
}
|
||||||
CATEGORY_PAGE_PATH = "theme/templates/categories"
|
CATEGORY_PAGE_PATH = "theme/templates/categories"
|
||||||
MINIFY = {
|
MINIFY = settings.minify_config
|
||||||
"remove_comments": True,
|
|
||||||
"remove_optional_attribute_quotes": False,
|
|
||||||
"reduce_boolean_attributes": True
|
|
||||||
}
|
|
||||||
|
|
||||||
# Setup markdown extensions
|
# Setup markdown extensions
|
||||||
from fontawesome_markdown import FontAwesomeExtension
|
from fontawesome_markdown import FontAwesomeExtension
|
||||||
|
|
Reference in a new issue