-
Notifications
You must be signed in to change notification settings - Fork 1
/
pelicanconf.py
310 lines (233 loc) · 8.23 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
from hashlib import md5
SITENAME = u'acetakwas.log();'
DESCRIPTION = r"while True: print <strong>\</strong>"
SITE_TAGLINE = DESCRIPTION
SITE_SOURCE = u'https://github.com/takwas/blog-src'
AUTHOR = u'Tosin Damilare James Animashaun'
# # helper function to format URLs for BIO
# def get_link(name):
# return ('<a href="{url}">{url_title}</a>'
# ''.format(url=URLS.get(name, '')[0],
# url_title=URLS.get(name, '')[1]))
BIO = (
u'''
<p>I'm Tosin Animashaun, a Nigerian, and in here is where I document
stuff as I go. </p>
<p>I currently contribute to the technical efforts at
<a href="{ta}">TechAdvance</a>, a software development outfit out of
Nigeria, that has got her feet in the <a href={pay}>payments</a> and
<a href="{trp}">transportation</a> spaces, as well as in the
digitisation of government services.</p>
<p>I have previously delved into entrepreneurship with a group of
friends at <a href="{krohx}">Krohx</a>, but I am currently on hiatus
from this. I have also somewhat unofficially interned with
<a href="{niit}">NIIT</a>.</p>
<p>Aside from my <a href="{dayjob}">day job as a backend developer</a>,
I spend a lot of my non-work time <a href="{learning}">garnering more
general knowledge</a> as fueling for my autodidact persona. I like to
read well written content, and I occasionally try my hands at crafting
good stuff like I am doing with this space.
Some other interests of mine include music, art, and psychology.
</p>
<p>I am also an avid podcast listener. My listening areas of interest
include: technology, psychology and history among others.
</p>
<p>Being an autodidact, I do not possess a college degree -- I do not
completely believe in its efficacy -- as I have so far failed at two
attempts to obtain at least one.</p>
<p>
<br/><b>You can email me at </b> acetakwas [at] gmail [dot] com
</p>
'''
).format(ta='http://www.techadvance.ng/',
pay='http://www.gpayafrica.com/',
trp='http://www.bus.com.ng/',
krohx='http://krohx.github.io/',
niit='http://niitlagos.com/',
dayjob='http://ng.linkedin.com/in/acetakwas',
learning='http://tosinmash.com/article/wholesome-learning.html')
AUTHOR_SHORTBIO = u'Christian | Programmer | Learner'
AUTHOR_EMAIL = u'[email protected]'
AUTHOR_EMAIL_HASH = md5(AUTHOR_EMAIL.encode('utf-8')).hexdigest()
TWITTER_USERNAME = u'acetakwas'
GITHUB_USERNAME = u'takwas'
GITHUB_URL = u'https://github.com/takwas'
GITHUB_BADGE = True
# LANDING_PAGE_ABOUT = {
# 'title': SITENAME,
# 'details': BIO
# }
# PROJECTS = [
# {
# 'name': 'Slack Electioneer (Votebot)',
# 'url': 'https://github.com/takwas/slack-electioneer',
# 'description': 'An election conducting Slack bot.'
# },
#
# {
# 'name': 'Contact Form',
# 'url': 'https://github.com/Krohx/contactform',
# 'description': 'Contact-Us-Form backend for static websites.'
# },
#
# {
# 'name': 'Flask App Template',
# 'url': 'https://github.com/takwas/flask_app_template',
# 'description': 'A boilerplate codebase for Flask that I wrote when I '
# 'first started out with Flask.'
# }
# ]
# COMMENTS_INTRO = 'Comments Intro'
STATIC_PATHS = ['theme/images', 'images']
# custom config variable for IRC
IRC_NICK = u'acetakwas'
# During development, we want urls to be relative
RELATIVE_URLS = True
DEFAULT_LANG = u'en'
# Whether folders in "content" should represent categories
USE_FOLDER_AS_CATEGORY = True
DEFAULT_CATEGORY = 'Uncategorized'
DISPLAY_CATEGORIES_ON_MENU = True
DISPLAY_PAGES_ON_MENU = True
DEFAULT_DATE_FORMAT = '%a %d %B %Y'
TIMEZONE = 'Africa/Lagos'
# DEFAULT_METADATA = ()
# FILENAME_METADATA = '(?P<slug>.*)' # Extract slug from filename
PATH = 'content/' # Top-level diretory in which to find content
IGNORE_FILES = ['drafts'] # File or directory patterns to ignore processing
#ARTICLE_DIR = PATH
# IGNORE_FILES = ['.#*', '*.bak']
# SITEURL = 'https://tosinmash.com'
# FEED_DOMAIN = SITEURL
# FEED_ATOM = 'feeds/main.atom.xml'
# FEED_RSS = 'feeds/main.rss.xml'
# FEED_ALL_ATOM = 'feeds/all.atom.xml'
# FEED_ALL_RSS = 'feeds/all.rss.xml'
# CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
# CATEGORY_FEED_RSS = 'feeds/%s.rss.xml'
# TAG_FEED_ATOM = 'feeds/%s.atom.xml'
# TAG_FEED_RSS = 'feeds/%s.rss.xml'
# Feed generation is usually not desired when developing
# FEED_ATOM = None #'feeds/main.atom.xml'
# FEED_RSS = None #'feeds/main.rss.xml'
# FEED_ALL_ATOM = None
# FEED_ALL_RSS = None
# AUTHOR_FEED_ATOM = None
# AUTHOR_FEED_RSS = None
# CATEGORY_FEED_ATOM = None
# CATEGORY_FEED_RSS = None
# TAG_FEED_ATOM = None
# TAG_FEED_RSS = None
# TRANSLATION_FEED_ATOM = None
# TRANSLATION_FEED_RSS = None
# metadata information: date and slug data from filename
FILENAME_METADATA='(?P<date>\d{4}-\d{2}-\d{2})_(?P<slug>.*)'
# SOCIAL_WIDGET_NAME = "Find me on"
# LINKS_WIDGET_NAME = "Bookmarks"
GRAB_ICONS = True
# Blogroll
#LINKS = (('Blog', '#0'),)
# Social widget
SOCIAL = (
('github', 'http://github.com/takwas'),
('linkedin', 'http://ng.linkedin.com/in/acetakwas'),
('quora', 'http://quora.com/Tosin-Damilare-James-Animashaun'),
('goodreads', 'http://goodreads.com/user/show/41177369-tosin-damilare-james-animashaun'),
('bitbucket', 'http://bitbucket.org/takwas'),
('twitter', 'http://twitter.com/acetakwas'),
# ('facebook', 'http://facebook.com/takwas'),
)
LINKS = SOCIAL
#('Facebook', 'http://facebook.com/takwas')
#('Twitter', 'http://twitter.com/acetakwas'),
#('Google+', 'http://plus.google.com/+TosinAnimashaun/about?hl=en_GB')
#('Youtube', 'youtube.com/acetakwas'),)
DEFAULT_PAGINATION = 200
# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True
# Settings for current theme
# THEME = 'plumage_takwas'
# THEME = 'themes/plumage_takwas'
# THEME = 'pure'
THEME = 'sundown'
THEME = 'sundown_custom'
THEME = 'my_themes/sundown_custom'
# THEME = 'mediumfox'
# THEME = 'Flex' # red-themed; profile info left side-bar
# THEME = 'elegant'
# THEME = 'alchemy'
# THEME = 'apricot'
# THEME = 'built-texts'
# THEME = 'dev-random3'
# THEME = 'hyde'
# THEME = 'iris'
# THEME = 'Just-Read'
# THEME = 'MinimalXY'
# THEME = 'mnmlist'
# THEME = 'monospace'
# THEME = 'Nuja'
# THEME = 'pelican-simplegrey'
# THEME = 'pelican-sober'
# THEME = 'taman'
# THEME = 'graymill'
# THEME = 'medio'
#MD_EXTENSIONS = ['codehilite(css_class=codehilite code)']
# Load thumbnail locally for development
# SITE_THUMBNAIL = '/theme/img/avatar_acetakwas.jpg'
# SITE_THUMBNAIL_TEXT = 'A pen in hand speaks volumes.'
# MENUITEMS = (
# ('Home', '/'),
# #(''),
# #('Being Christian', '/'),
# ('Tosinmash', '#about'),
# )
# Extra Jinja2 Pages to be rendered alongside blog content
# TEMPLATE_PAGES = {'src/books.html': 'dest/books.html',
# 'src/resume.html': 'dest/resume.html',
# 'src/contact.html': 'dest/contact.html'}
TEMPLATE_PAGES = {
# 'pages/about-template.html': 'about.html'
}
EXTRA_PATH_METADATA = {
'theme/images/favicon.ico': {'path': 'favicon.ico'}
}
SITESUBTITLE = SITE_TAGLINE
# DISCLAIMER = False
# # Support for Disqus comments
# DISQUS_SITENAME = 'acetakwas-log'
# ELEGANT THEME CONFIGS
# PLUGINS = ['sitemap', 'extract_toc', 'tipue_search']
# MARKDOWN = ['codehilite(css_class=highlight)', 'extra', 'headerid', 'toc']
# DIRECT_TEMPLATES = (('index', 'tags', 'categories','archives', 'search', '404'))
# STATIC_PATHS = ['theme/images', 'images']
# TAG_SAVE_AS = ''
# CATEGORY_SAVE_AS = ''
# AUTHOR_SAVE_AS = ''
# RECENT_ARTICLES_COUNT (integer)
# COMMENTS_INTRO ('string')
# SITE_LICENSE ('string')
# SITE_DESCRIPTION ('string')
# EMAIL_SUBSCRIPTION_LABEL ('string')
# EMAIL_FIELD_PLACEHOLDER ('string')
# SUBSCRIBE_BUTTON_TITLE ('string')
# MAILCHIMP_FORM_ACTION ('string')
# SITESUBTITLE ('string')
# LANDING_PAGE_ABOUT ({})
# PROJECTS ([{},...])
# SUNDOWN THEME CONFIGS
import urllib.parse
EMAIL = AUTHOR_EMAIL
GRVTR_SIZE = 160
# DEFAULT_GRV_URL = ''
# construct gravatar URL
grvtr_base_url = 'http://www.gravatar.com/avatar/'
email_md5 = md5(EMAIL.lower().encode('utf-8')).hexdigest()
grvtr_query_str = urllib.parse.urlencode({'s': str(GRVTR_SIZE)})
GRV_URL = f'{grvtr_base_url}{email_md5}?{grvtr_query_str}'
WITH_FUTURE_DATES = False
PAGE_PATHS = ['pages']
# PAGE_URL = 'pages/{slug}'
# PAGE_SAVE_AS = 'pages/{slug}.html'