-
Notifications
You must be signed in to change notification settings - Fork 50
/
pelicanconf.py
142 lines (108 loc) · 3.93 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
import sys
sys.path.append(os.curdir)
from datetime import date
from dt_authors import *
AUTHOR = u'darktable'
SITENAME = u'darktable'
SITEURL = 'https://www.darktable.org'
SITEURL = ''
PATH = 'content'
THEME = 'theme/dt.org'
TIMEZONE = 'Etc/UTC'
LOCALE = u'C'
DEFAULT_LANG = u'en'
CURRENTYEAR = date.today().year
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
FEED_ALL_RSS = "feed/all.rss.xml"
CATEGORY_FEED_ATOM = None
CATEGORY_FEED_RSS = "feed/%s.rss.xml"
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
# 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
SOCIAL = (('You can add links in your config file', '#'),
('Another social link', '#'),)
# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True
RELATIVE_URLS = False
PLUGIN_PATHS = ['plugins']
PLUGINS = ['summary', 'attach_ledeimg', 'rm_nbsp_title', 'render_math', 'image_links', 'tipue_search', 'social_media', 'article_metadata', 'static_comments', 'image_compare']
THUMBNAIL_SIZE = 960
# DO NOT CHANGE THEM HERE BUT SET THEM IN ANOTHER PLACE!
TWITTER_CONSUMER_KEY = ''
TWITTER_CONSUMER_SECRET = ''
TWITTER_ACCESS_TOKEN_KEY = ''
TWITTER_ACCESS_TOKEN_SECRET = ''
# web site statistics
PIWIK_URL = 'darktable.org/piwik/'
PIWIK_SITE_ID = 1
# Use pretty type options in output
TYPOGRIFY = True
STATIC_PATHS = ['extra', 'blog', 'news', 'pages', 'images']
EXTRA_PATH_METADATA = {
'extra/favicon.ico': {'path': 'favicon.ico'},
'extra/robots.txt': {'path': 'robots.txt'},
'extra/update_website_github.php': {'path': 'update_website_github.php'}
}
# These two options allow us to specify the category
# of the files with a regex. We basically set 'news'
# and 'blog' even if they're nested in sub-dirs
USE_FOLDER_AS_CATEGORY = False
PATH_METADATA = '(?P<category>blog|news)/.*'
# Path for site content and various URL/SAVE_AS options
# Reminder: "page" is static content like "about", "features"
# "article" is timely content, "blog" or "news" posts
PATH = 'content'
PAGE_URL = '{slug}/'
PAGE_SAVE_AS = '{slug}/index.html'
ARTICLE_URL = '{date:%Y}/{date:%m}/{slug}/'
ARTICLE_SAVE_AS = '{date:%Y}/{date:%m}/{slug}/index.html'
CATEGORY_URL = '{slug}/'
CATEGORY_SAVE_AS = '{slug}/index.html'
DRAFT_URL = 'drafts/{slug}/'
DRAFT_SAVE_AS = 'drafts/{slug}/index.html'
TAG_URL = 'tag/{slug}/'
TAG_SAVE_AS = 'tag/{slug}/index.html'
AUTHOR_URL = 'author/{slug}/'
AUTHOR_SAVE_AS = 'author/{slug}/index.html'
MENUITEMS = (
('News', '/news/'),
('Blog', '/blog/')
)
DIRECT_TEMPLATES = ['categories', 'tags', 'search', 'small_ledes', 'sitemap']
PAGINATED_DIRECT_TEMPLATES = ['index', 'category', 'tag']
SITEMAP_SAVE_AS = 'sitemap.xml'
# choose a default page lede that sticks out enough to force people to care about it and add a custom lede :-)
DEFAULT_LEDE = '/theme/images/darktable_skull+logo.png'
# Pagination options for list pages
DEFAULT_ORPHANS = 0
DEFAULT_PAGINATION = 10
PAGINATION_PATTERNS = (
(1, '{base_name}/', '{base_name}/index.html'),
(2, '{base_name}/{number}/', '{base_name}/{number}/index.html')
)
# toc(permalink=True) sets all headers to have an id
# set, and an <a> after the heading.
# see: http://pythonhosted.org/Markdown/extensions/toc.html
MARKDOWN = {
'extension_configs' : {
#'markdown.extensions.fenced_code' : {},
#'markdown.extensions.codehilite' : {'css_class': 'codehilite'},
'markdown.extensions.extra' : {},
'markdown.extensions.headerid' : {},
'markdown.extensions.toc(permalink=)' : {}
}
}
# these are deprecated, use MARKDOWN instead!
#MD_EXTENSIONS = ['extra', 'headerid']
# dummy line i removed before, sorry for the spam.