1
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/pelicanconf.py

82 lines
2.0 KiB
Python
Raw Normal View History

2016-05-13 21:13:23 +01:00
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
2016-05-21 20:35:59 +01:00
import sys, os
sys.path.insert(0, os.path.realpath('./plugins'))
2016-05-28 22:59:58 +01:00
# Global core settings
2016-05-13 21:13:23 +01:00
AUTHOR = 'Jake Howard'
SITENAME = 'TheOrangeOne'
2016-05-13 21:37:54 +01:00
SITEURL = 'http://theorangeone.net'
2016-05-13 21:13:23 +01:00
PATH = 'content'
TIMEZONE = 'Europe/London'
DEFAULT_LANG = 'en'
2016-05-28 22:59:58 +01:00
PAGE_PATHS = ["pages"]
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"}
}
USE_FOLDER_AS_CATEGORY = True
DEFAULT_PAGINATION = False
DELETE_OUTPUT_DIRECTORY = True
SLUGIFY_SOURCE = 'basename'
2016-05-13 21:13:23 +01:00
# Blogroll
LINKS = (('Pelican', 'http://getpelican.com/'),
('Python.org', 'http://python.org/'),
('Jinja2', 'http://jinja.pocoo.org/'),
('You can modify those links in your config file', '#'),)
# Social widget
2016-05-29 23:23:55 +01:00
import links
SOCIAL = links.social()
INDEX_PROJECTS = links.index_projects()
2016-05-21 20:35:59 +01:00
2016-05-28 22:59:58 +01:00
# Disable some pages
TAG_URL = False
TAG_SAVE_AS = False
TAGS_SAVE_AS = False
AUTHORS_URL = False
AUTHORS_SAVE_AS = False
CATEGORIES_SAVE_AS = False
ARCHIVES_URL = False
ARCHIVES_SAVE_AS = False
2016-05-13 21:13:23 +01:00
2016-05-28 22:59:58 +01:00
# Override page URLs
2016-05-13 21:37:54 +01:00
PAGE_SAVE_AS = "{slug}/index.html"
PAGE_URL = "{slug}"
2016-05-27 15:16:13 +01:00
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"
2016-05-27 23:19:03 +01:00
CATEGORY_URL = "{slug}/"
2016-05-28 22:59:58 +01:00
# Add ATOM feed
2016-05-28 22:53:30 +01:00
FEED_ATOM = 'feed.atom'
FEED_DOMAIN = SITEURL
2016-05-28 22:59:58 +01:00
# Setup plugins
2016-05-21 20:35:59 +01:00
PLUGIN_PATHS = ["pelican_plugins"]
2016-05-28 21:23:34 +01:00
PLUGINS = ["sitemap", "filetime_from_git", "pelican-jinja2content"]
2016-05-17 18:32:23 +01:00
SITEMAP = {
2016-05-27 15:16:13 +01:00
"format": "xml"
2016-05-17 18:32:23 +01:00
}
2016-05-21 20:35:59 +01:00
2016-05-28 22:59:58 +01:00
# Setup markdown extensions
2016-05-28 22:26:36 +01:00
from fontawesome_markdown import FontAwesomeExtension
2016-05-28 22:53:30 +01:00
MD_EXTENSIONS = [FontAwesomeExtension(), 'codehilite(css_class=highlight)', 'extra']
2016-05-28 22:26:36 +01:00
2016-05-28 22:59:58 +01:00
# Setup jinja2 filters
2016-05-27 15:42:29 +01:00
import filters
JINJA_FILTERS = {
2016-05-27 23:19:03 +01:00
"datetime": filters.format_datetime,
"raw": filters.html_to_raw,
"category_find": filters.category_find
2016-05-27 15:42:29 +01:00
}