forked from mixxxdj/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpelicanconf.py
More file actions
325 lines (293 loc) · 8.38 KB
/
Copy pathpelicanconf.py
File metadata and controls
325 lines (293 loc) · 8.38 KB
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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
import jinja2
import markupsafe
import markdown
AUTHOR = "Mixxx DJ Team"
SITENAME = "Mixxx"
SITEURL = ""
TIMEZONE = "Europe/Berlin"
DEFAULT_LANG = "en"
PATH = "content"
FEED_ATOM = "feed.xml"
ARTICLE_PATHS = [
"news",
]
STATIC_PATHS = ["images", "_redirects", ".well-known"]
MARKDOWN = {
"extension_configs": {
"markdown.extensions.codehilite": {"css_class": "highlight"},
"full_yaml_metadata": {
"allow_missing_delimiters": True,
},
"markdown.extensions.extra": {},
"markdown.extensions.meta": {},
"markdown_video": {},
},
"output_format": "html5",
}
THEME = "theme"
PAGE_URL = "{slug}/"
PAGE_SAVE_AS = "{slug}/index.html"
ARTICLE_URL = "news/{date:%Y-%m-%d}-{slug}"
ARTICLE_SAVE_AS = "news/{date:%Y-%m-%d}-{slug}/index.html"
PAGINATION_PATTERNS = (
(1, "{url}", "{save_as}"),
(2, "{base_name}/page/{number}/", "{base_name}/page/{number}/index.html"),
)
FILENAME_METADATA = r"^((?P<date>\d{4}-\d{2}-\d{2})|XXXX-XX-XX)-(?P<slug>.+)$"
DEFAULT_METADATA = {
"comments": "yes",
}
INDEX_URL = "news"
INDEX_SAVE_AS = "news/index.html"
ARCHIVES_URL = "news/archives"
ARCHIVES_SAVE_AS = "news/archives/index.html"
AUTHORS_URL = "news/authors"
AUTHORS_SAVE_AS = "news/authors/index.html"
CATEGORIES_URL = "news/category"
CATEGORIES_SAVE_AS = "news/category/index.html"
TAGS_URL = "news/tag"
TAGS_SAVE_AS = "news/tag/index.html"
YEAR_ARCHIVE_URL = "news/archives/{date:%Y}"
YEAR_ARCHIVE_SAVE_AS = "news/archives/{date:%Y}/index.html"
MONTH_ARCHIVE_URL = "news/archives/{date:%Y}/{date:%m}"
MONTH_ARCHIVE_SAVE_AS = "news/archives/{date:%Y}/{date:%m}/index.html"
AUTHOR_URL = "news/author/{slug}"
AUTHOR_SAVE_AS = "news/author/{slug}/index.html"
CATEGORY_URL = "news/category/{slug}"
CATEGORY_SAVE_AS = "news/category/{slug}/index.html"
TAG_URL = "news/tag/{slug}"
TAG_SAVE_AS = "news/tag/{slug}/index.html"
TEMPLATE_PAGES = {
"pages/error.html": "error.html",
}
PLUGIN_PATHS = [
"plugins",
]
PLUGINS = [
"author_metadata",
"download_metadata",
"draft_override",
"md_yaml",
]
class MenuItem:
def __init__(self, url, title, context, css="", children=()):
self.url = url
self.title = title
self.context = context
self.css = css
self.children = children
NAV_MENU = (
MenuItem("/news", "News", "Navigation bar link to Mixxx News page."),
MenuItem(
"/discover",
"Discover",
"Navigation bar link to Mixxx discover page.",
children=(
MenuItem(
"/features",
"Features",
"Navigation bar link to Mixxx features page.",
),
MenuItem(
"/screenshots",
"Screenshots",
"Navigation bar link to Mixxx Screenshots page.",
),
MenuItem(
"/press",
"Press",
"Navigation bar link to Mixxx Press page",
),
MenuItem(
"/contact",
"Contact & Team",
"Navigation bar link to Mixxx contact page.",
),
),
),
MenuItem(
"/support",
"Support & Community",
"Navigation bar link to Mixxx support page.",
children=(
MenuItem(
"/manual/latest",
"Manual",
"Navigation bar link to Mixxx Manual.",
),
MenuItem(
"https://mixxx.discourse.group/",
"Forums",
"Navigation bar link to Mixxx Forums.",
),
MenuItem(
"https://github.com/mixxxdj/mixxx/issues/",
"Bug Tracker",
"Navigation bar link to Mixxx Bug Tracker.",
),
MenuItem(
"https://github.com/mixxxdj/mixxx/wiki",
"Wiki",
"Navigation bar link to Mixxx Wiki.",
),
MenuItem(
"/get-involved",
"Get Involved",
"Navigation bar link to Mixxx Get Involved page.",
),
),
),
)
AUTHOR_METADATA = {
"Mixxx Team": {
"github": "mixxxdj",
"mastodon": "@mixxx@floss.social",
"facebook": "mixxxdj",
"email": "core-team@mixxx.org",
"tagline": "Mixxx DJ Software Development Team",
},
"Be.": {
"github": "Be-ing",
"discourse": "Be0",
"email": "be@mixxx.org",
"tagline": "Former Mixxx Core Developer",
},
"Albert Santoni": {
"github": "asantoni",
"discourse": "albert",
"tagline": "Mixxx Core Developer",
},
"Jan Holthuis": {
"github": "Holzhaus",
"discourse": "hlzhs",
"email": "jholthuis@mixxx.org",
"tagline": "Mixxx Core Developer",
},
"RJ Ryan": {
"github": "rryan",
"discourse": "rryan",
"email": "rryan@mixxx.org",
"tagline": "Mixxx Core Developer",
},
"Pegasus": {
"github": "Pegasus-RPG",
"discourse": "Pegasus",
"tagline": "Mixxx Core Developer",
},
"Owen Williams": {
"github": "ywwg",
"discourse": "owilliams",
"tagline": "Mixxx Core Developer",
},
"Uwe Klotz": {
"github": "uklotzde",
"discourse": "tapir",
"tagline": "Former Mixxx Core Developer",
},
"April M. Crehan": {
"github": "ThisGrrrlFriday",
"email": "amcrehan@gmail.com",
"tagline": "Mixxx Supporter",
},
"Evan": {
"github": "ehendrikd",
"discourse": "ehendrikd",
"tagline": "Mixxx Contributor",
},
"Cristiano Lacerda": {
"github": "crisclacerda",
"discourse": "crisclacerda",
"tagline": "GSoC 2020 Student",
},
"Aanyu Deborah Oduman": {
"github": "deborahtrez",
"discourse": "deborahao",
"email": "deborahtrez12@gmail.com",
"tagline": "Outreachy contributor (Dec 2020 - Mar 2021)",
},
"Daniel Schürmann": {
"github": "daschuer",
"discourse": "daschuer",
"email": "daschuer@mixxx.org",
"tagline": "Mixxx Core Developer",
},
"Nikolaus Einhauser": {
"github": "Swiftb0y",
"discourse": "swiftb0y",
"email": "nikolaus.einhauser@mixxx.org",
"tagline": "Mixxx Core Developer",
},
"David Chocholatý": {
"github": "davidchocholaty",
"discourse": "davidchocholaty",
"email": "david.chocholaty12@gmail.com",
"tagline": "GSoC 2022 Student",
},
"Fatih Emre YILDIZ": {
"github": "fatihemreyildiz",
"discourse": "fatihemreyildiz",
"email": "fatihemreyildiz@gmail.com",
"tagline": "GSoC 2022 Student",
},
"Maarten de Boer": {
"github": "m0dB",
"discourse": "m0dB",
"email": "m0dB@mixxx.org",
"tagline": "Mixxx Core Developer",
},
"Evelynne Veys": {
"github": "Eve00000",
"discourse": "Eve",
"email": "Evelynne@protonmail.com",
"tagline": "Enthusiastic Mixxx-er",
},
"Daniel Fernandes": {
"github": "danferns",
"discourse": "danferns",
"email": "dannywritescode@gmail.com",
"tagline": "GSoC 2024 Student",
},
"Jörg Wartenberg": {
"github": "JoergAtGithub",
"discourse": "DJ_D-Town",
"email": "joerg.wartenberg@mixxx.org",
"tagline": "Mixxx Core Developer",
},
"Antoine Colombier": {
"github": "acolombier",
"discourse": "acolombier",
"email": "mixxx@acolombier.dev",
"tagline": "Mixxx Core Developer",
},
}
# Needed for Jinja2 markdown filter
md = markdown.Markdown()
JINJA_GLOBALS = {
"gettext": lambda x: x,
"NAV_MENU": NAV_MENU,
}
JINJA_ENVIRONMENT = {
"trim_blocks": True,
"lstrip_blocks": True,
"extensions": [
"jinja2.ext.do",
"jinja2.ext.i18n",
],
}
JINJA_FILTERS = {"markdown": lambda text: markupsafe.Markup(md.convert(text))}
# 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 = ()
# Social widget
SOCIAL = ()
DEFAULT_PAGINATION = 10
DELETE_OUTPUT_DIRECTORY = True
# Uncomment following line if you want document-relative URLs when developing
# RELATIVE_URLS = True