Cleanup settings file
This commit is contained in:
parent
a5b0816a95
commit
12970690a6
1 changed files with 29 additions and 44 deletions
|
@ -5,22 +5,25 @@ from __future__ import unicode_literals
|
||||||
import sys, os
|
import sys, os
|
||||||
sys.path.insert(0, os.path.realpath('./plugins'))
|
sys.path.insert(0, os.path.realpath('./plugins'))
|
||||||
|
|
||||||
|
# Global core settings
|
||||||
AUTHOR = 'Jake Howard'
|
AUTHOR = 'Jake Howard'
|
||||||
SITENAME = 'TheOrangeOne'
|
SITENAME = 'TheOrangeOne'
|
||||||
SITEURL = 'http://theorangeone.net'
|
SITEURL = 'http://theorangeone.net'
|
||||||
|
|
||||||
PATH = 'content'
|
PATH = 'content'
|
||||||
|
|
||||||
TIMEZONE = 'Europe/London'
|
TIMEZONE = 'Europe/London'
|
||||||
|
|
||||||
DEFAULT_LANG = 'en'
|
DEFAULT_LANG = 'en'
|
||||||
|
PAGE_PATHS = ["pages"]
|
||||||
# Feed generation is usually not desired when developing
|
THEME = "theme"
|
||||||
FEED_ALL_ATOM = None
|
THEME_STATIC_DIR = "static"
|
||||||
CATEGORY_FEED_ATOM = None
|
THEME_STATIC_PATHS = ['static/build']
|
||||||
TRANSLATION_FEED_ATOM = None
|
STATIC_PATHS = ["assets", "assets/favicon.ico"]
|
||||||
AUTHOR_FEED_ATOM = None
|
EXTRA_PATH_METADATA = {
|
||||||
AUTHOR_FEED_RSS = None
|
"assets/favicon.ico": {"path": "favicon.ico"}
|
||||||
|
}
|
||||||
|
USE_FOLDER_AS_CATEGORY = True
|
||||||
|
DEFAULT_PAGINATION = False
|
||||||
|
DELETE_OUTPUT_DIRECTORY = True
|
||||||
|
SLUGIFY_SOURCE = 'basename'
|
||||||
|
|
||||||
# Blogroll
|
# Blogroll
|
||||||
LINKS = (('Pelican', 'http://getpelican.com/'),
|
LINKS = (('Pelican', 'http://getpelican.com/'),
|
||||||
|
@ -32,50 +35,31 @@ LINKS = (('Pelican', 'http://getpelican.com/'),
|
||||||
import social
|
import social
|
||||||
SOCIAL = social.generate()
|
SOCIAL = social.generate()
|
||||||
|
|
||||||
|
# Disable some pages
|
||||||
DEFAULT_PAGINATION = False
|
TAG_URL = False
|
||||||
DELETE_OUTPUT_DIRECTORY = True
|
TAG_SAVE_AS = False
|
||||||
SLUGIFY_SOURCE = 'basename'
|
TAGS_SAVE_AS = False
|
||||||
|
|
||||||
PAGE_PATHS = ["pages"]
|
|
||||||
PAGE_SAVE_AS = "{slug}/index.html"
|
|
||||||
PAGE_URL = "{slug}"
|
|
||||||
|
|
||||||
THEME = "theme"
|
|
||||||
THEME_STATIC_DIR = "static"
|
|
||||||
THEME_STATIC_PATHS = ['static/build']
|
|
||||||
STATIC_PATHS = ["assets", "assets/favicon.ico"]
|
|
||||||
EXTRA_PATH_METADATA = {
|
|
||||||
"assets/favicon.ico": {"path": "favicon.ico"}
|
|
||||||
}
|
|
||||||
|
|
||||||
ARTICLE_SAVE_AS = "{category}/{slug}/index.html"
|
|
||||||
ARTICLE_URL = "{category}/{slug}/"
|
|
||||||
|
|
||||||
TAG_URL = "blog/tag/{slug}/"
|
|
||||||
TAG_SAVE_AS = "blog/tag/{slug}/index.html"
|
|
||||||
|
|
||||||
TAGS_URL = "tags/"
|
|
||||||
TAGS_SAVE_AS = "tags/index.html"
|
|
||||||
|
|
||||||
AUTHOR_URL = "author/{slug}/"
|
|
||||||
AUTHOR_SAVE_AS = "author/{slug}/index.html"
|
|
||||||
|
|
||||||
AUTHORS_URL = False
|
AUTHORS_URL = False
|
||||||
AUTHORS_SAVE_AS = False
|
AUTHORS_SAVE_AS = False
|
||||||
|
CATEGORIES_SAVE_AS = False
|
||||||
ARCHIVES_URL = False
|
ARCHIVES_URL = False
|
||||||
ARCHIVES_SAVE_AS = False
|
ARCHIVES_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_SAVE_AS = "{slug}/index.html"
|
||||||
CATEGORY_URL = "{slug}/"
|
CATEGORY_URL = "{slug}/"
|
||||||
|
|
||||||
CATEGORIES_SAVE_AS = False
|
# Add ATOM feed
|
||||||
USE_FOLDER_AS_CATEGORY = True
|
|
||||||
|
|
||||||
FEED_ATOM = 'feed.atom'
|
FEED_ATOM = 'feed.atom'
|
||||||
FEED_DOMAIN = SITEURL
|
FEED_DOMAIN = SITEURL
|
||||||
|
|
||||||
|
# Setup plugins
|
||||||
PLUGIN_PATHS = ["pelican_plugins"]
|
PLUGIN_PATHS = ["pelican_plugins"]
|
||||||
PLUGINS = ["sitemap", "filetime_from_git", "pelican-jinja2content"]
|
PLUGINS = ["sitemap", "filetime_from_git", "pelican-jinja2content"]
|
||||||
|
|
||||||
|
@ -83,13 +67,14 @@ SITEMAP = {
|
||||||
"format": "xml"
|
"format": "xml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Setup markdown extensions
|
||||||
from fontawesome_markdown import FontAwesomeExtension
|
from fontawesome_markdown import FontAwesomeExtension
|
||||||
MD_EXTENSIONS = [FontAwesomeExtension(), 'codehilite(css_class=highlight)', 'extra']
|
MD_EXTENSIONS = [FontAwesomeExtension(), 'codehilite(css_class=highlight)', 'extra']
|
||||||
|
|
||||||
|
# Setup jinja2 filters
|
||||||
import filters
|
import filters
|
||||||
JINJA_FILTERS = {
|
JINJA_FILTERS = {
|
||||||
"datetime": filters.format_datetime,
|
"datetime": filters.format_datetime,
|
||||||
"raw": filters.html_to_raw,
|
"raw": filters.html_to_raw,
|
||||||
"category_find": filters.category_find
|
"category_find": filters.category_find
|
||||||
}
|
}
|
||||||
# Extra context
|
|
||||||
|
|
Reference in a new issue