-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
pelicanconf.py
executable file
·246 lines (223 loc) · 6.82 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*- #
"""Build this thing!"""
from __future__ import unicode_literals
# Site configuration
AUTHOR = 'Chris Krycho and Stephen Carradini'
SITENAME = 'Winning Slowly'
SITE_DESCRIPTION = 'Taking the long view on technology, religion, ethics, and art.'
SITEURL = ''
LOGO = 'images/logotype.png'
TIMEZONE = 'America/Denver'
DEFAULT_LANG = 'en'
THEME = "design"
# Show configuration
SEASONS = {
'Indefinite Hiatus': {
'prefix': None,
'title': 'Indefinite Hiatus',
'slug': 'season-indefinite-hiatus',
'number': None,
'epPrefix': '',
'epSep': '',
'sort': 'chronological',
'includeInNav': False,
'linkToSeason': False,
},
'8': {
'prefix': 'Season 8',
'title': 'The Winning Slowly Epistemology Book (and Film) Club',
'slug': 'season-8',
'number': '8',
'epPrefix': 'Episode',
'epSep': '.',
'sort': 'chronological',
'includeInNav': True,
'linkToSeason': True,
},
'7': {
'prefix': 'Season 7',
'title': 'Tech Criticism… and Hope',
'slug': 'season-7',
'number': '7',
'epPrefix': 'Episode',
'epSep': '.',
'sort': 'chronological',
'includeInNav': True,
'linkToSeason': True,
},
'6': {
'prefix': 'Season 6',
'title': 'Rejecting the Inevitable Future',
'slug': 'season-6',
'number': '6',
'epPrefix': 'Episode',
'epSep': '.',
'sort': 'chronological',
'includeInNav': True,
'linkToSeason': True,
},
'5': {
'prefix': 'Season 5',
'title': 'Structure and Agency',
'slug': 'season-5',
'number': '5',
'epPrefix': 'Episode',
'epSep': '.',
'sort': 'chronological',
'includeInNav': True,
'linkToSeason': True,
},
'4': {
'prefix': 'Season 4',
'title': 'Globalization',
'slug': 'season-4',
'number': '4',
'epPrefix': 'Episode',
'epSep': '.',
'sort': 'chronological',
'includeInNav': True,
'linkToSeason': True,
},
'3': {
'prefix': None,
'title': 'Season 3',
'slug': 'season-3',
'number': '3',
'epPrefix': 'Episode',
'epSep': '.',
'sort': 'chronological',
'includeInNav': True,
'linkToSeason': True,
},
'2': {
'prefix': None,
'title': 'Season 2',
'slug': 'season-2',
'number': '2',
'epPrefix': 'Episode',
'epSep': '.',
'sort': 'chronological',
'includeInNav': True,
'linkToSeason': True,
},
'1': {
'prefix': None,
'title': 'Season 1',
'slug': 'season-1',
'number': '1',
'epPrefix': 'Episode',
'epSep': '.',
'sort': 'chronological',
'includeInNav': True,
'linkToSeason': True,
},
'0': {
'prefix': 'Season 0',
'title': 'This Is In Beta!',
'slug': 'season-0',
'number': '0',
'epPrefix': 'Episode',
'epSep': '.',
'sort': 'chronological',
'includeInNav': True,
'linkToSeason': True,
},
'Standalone Episodes': {
'prefix': None,
'title': 'Standalone Episodes',
'slug': 'season-standalone-episodes',
'number': None,
'epPrefix': 'Standalone Episode',
'epSep': '',
'sort': 'reverse-chronological',
'includeInNav': True,
'linkToSeason': True,
},
'Bonus': {
'prefix': None,
'title': 'Bonus',
'slug': 'bonus-episodes',
'number': None,
'epPrefix': 'Bonus Episode',
'epSep': '',
'sort': 'reverse-chronological',
'includeInNav': True,
'linkToSeason': True,
}
}
CURRENT_SEASON = SEASONS['Indefinite Hiatus']
# Feed generation is usually not desired when developing
FEED_DOMAIN = SITEURL
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
FEED_ALL_RSS = None
CATEGORY_FEED_RSS = None
TRANSLATION_FEED_RSS = None
AUTHOR_FEED_RSS = None
AUTHOR_FEED_ATOM = None
CUSTOM_FEED_URL = 'feed.xml'
# Social widget
IDENTITY = {'Site': {'RSS': FEED_DOMAIN + '/' + CUSTOM_FEED_URL,
'iTunes': 'https://itunes.apple.com/us/podcast/winning-slowly/id807603957?mt=2',
'Overcast': 'https://overcast.fm/itunes807603957/winning-slowly',
'Pocket Casts': 'http://pca.st/Pl01',
'Email': 'mailto:[email protected]',
'Patreon': 'https://www.patreon.com/winningslowly',
'Square': 'https://cash.me/$winningslowly',
'Twitter': 'https://twitter.com/winningslowly'},
'Chris': {'GitHub': 'https://github.com/chriskrycho',
'Twitter': 'https://twitter.com/chriskrycho',
'Homepage': 'https://chriskrycho.com'},
'Stephen': {'Twitter': 'https://twitter.com/scarradini',
'Homepage': 'http://stephencarradini.com'}}
CDN = 'cdn.winningslowly.org/file/winningslowly'
MP3 = '.mp3'
PODTRAC_REDIRECT = 'https://www.podtrac.com/pts/redirect'
PODTRAC_MP3 = PODTRAC_REDIRECT + MP3
DEFAULT_PAGINATION = False
# URLs
SLUGIFY_SOURCE = 'basename'
ARTICLE_URL = '{category}.{number}/'
ARTICLE_SAVE_AS = '{category}.{number}/index.html'
PAGE_URL = '{slug}.html'
PAGE_SAVE_AS = '{slug}.html'
CATEGORY_URL = 'season-{slug}.html'
CATEGORY_SAVE_AS = 'season-{slug}.html'
# Category settings
USE_FOLDER_AS_CATEGORY = False # note: this is the default
DEFAULT_CATEGORY = 'standalone-episodes'
DIRECT_TEMPLATES = ['index']
# Disable unused elements
AUTHOR_SAVE_AS = ''
AUTHORS_SAVE_AS = ''
TAGS_SAVE_AS = ''
# Output
OUTPUT_SOURCES = False
DEFAULT_DATE_FORMAT = "%B %d, %Y"
# Uncomment following line if you want document-relative URLs when developing
RELATIVE_URLS = True
# Path configuration
STATIC_PATHS = ['images', '2014', '2015', 'extra']
EXTRA_PATH_METADATA = {'extra/CNAME': {'path': 'CNAME'},
'extra/feed.xml': {'path': CUSTOM_FEED_URL},
'extra/test_feed.xml': {'path': 'test_feed.xml'},
'extra/Winning-Slowly_podcast.png': {'path':
'podcast.png'},
'extra/humans.txt': {'path': 'humans.txt'}}
ARTICLE_EXCLUDES = ['2014', '2015']
PAGE_EXCLUDES = ['2014', '2015']
# Static configuration
THEME_STATIC_DIR = ''
CSS_FILE = 'style.min.css'
THEME_STATIC_PATHS = ['static', 'static/images']
READERS = {'html': None}
PLUGIN_PATHS = ['../../pelican-plugins']
PLUGINS = ['pandoc_reader']
PANDOC_EXTENSIONS = ['-citations']
# Caching
CACHE_CONTENT = True
LOAD_CONTENT_CACHE = True
CHECK_MODIFIED_METHOD = 'md5'
CONTENT_CACHING_LAYER = 'reader'