This repository was archived by the owner on Jan 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpelicanconf.py
88 lines (73 loc) · 1.78 KB
/
pelicanconf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import sys, os
sys.path.insert(0, os.path.realpath('./'))
AUTHOR = 'Hoily'
SITENAME = 'Hoily'
SITEURL = 'https://hoily.io'
PATH = 'content'
THEME = "theme"
THEME_STATIC_DIR = "static"
THEME_STATIC_PATHS = ["static/build"]
STATIC_PATHS = ["assets"]
SLUGIFY_SOURCE = 'basename'
TIMEZONE = 'Europe/London'
DEFAULT_LANG = 'en'
# 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
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}/"
CATEGORY_SAVE_AS = "{slug}/index.html"
CATEGORY_URL = "{slug}/"
USE_FOLDER_AS_CATEGORY = True
# Add ATOM feed
FEED_ATOM = 'feed.atom'
FEED_DOMAIN = SITEURL
PLUGIN_PATHS = ["./pelican_plugins", "./plugins"]
PLUGINS = [
'sitemap',
'pelican-jinja2content',
'absolute_urls'
]
SITEMAP = {
"format": "xml"
}
# Setup markdown extensions
from fontawesome_markdown import FontAwesomeExtension
from pyembed.markdown import PyEmbedMarkdown
from mkdcomments import CommentsExtension
MD_EXTENSIONS = [
FontAwesomeExtension(),
PyEmbedMarkdown(),
CommentsExtension(),
'codehilite(css_class=highlight)',
'extra'
]
from plugins import filters
JINJA_FILTERS = {
"datetime": filters.format_datetime,
"category_find": filters.category_find,
"limit": filters.limit
}
NAV_LINKS = [
('Home', '/'),
('About', '/about/')
]
FOOTER_ICON_LINKS = [
('https://github.com/hoily/', 'github'),
('/feed.atom', 'rss'),
('mailto:[email protected]', 'envelope-o')
]