-
Notifications
You must be signed in to change notification settings - Fork 31
/
pelicanconf.py
59 lines (45 loc) · 1.26 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
import os
import os.path
AUTHOR = 'Hyphanet Contributors'
SITENAME = 'Hyphanet'
SITEURL = ''
THEME = 'theme'
PATH = 'content'
TIMEZONE = 'Europe/Rome'
DEFAULT_LANG = 'en'
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
# Blogroll
LINKS = set()
# Social widget
SOCIAL = set()
DEFAULT_PAGINATION = 10
PLUGIN_PATHS = ['pelican-plugins']
PLUGINS = ['i18n_subsites', 'webassets']
JINJA_ENVIRONMENT = {
'extensions' : ["jinja2.ext.i18n"],
}
WEBASSETS_SOURCE_PATHS = ['static']
MARKDOWN = {
'extensions': ["markdown.extensions.def_list", "markdown.extensions.toc", "markdown.extensions.extra", ],
}
I18N_SUBSITES = {}
I18N_GETTEXT_LOCALEDIR = 'locales'
I18N_GETTEXT_DOMAIN = 'messages'
I18N_TEMPLATES_LANG = 'en'
for language in os.listdir(I18N_GETTEXT_LOCALEDIR):
if os.path.exists(os.path.join(I18N_GETTEXT_LOCALEDIR, language, "LC_MESSAGES", I18N_GETTEXT_DOMAIN + ".mo")):
I18N_SUBSITES[language] = {'MARKDOWN': MARKDOWN}
STATIC_PATHS = [
'assets',
'extra/robots.txt',
'extra/favicon.ico'
]
EXTRA_PATH_METADATA = {
'extra/robots.txt': {'path': 'robots.txt'},
'extra/favicon.ico': {'path': 'favicon.ico'}
}