-
Notifications
You must be signed in to change notification settings - Fork 14
/
pelicanconf.py
180 lines (158 loc) · 4.9 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
"""
Settings for the Pelican static site generator.
https://docs.getpelican.com/en/stable/settings.html
"""
AUTHOR = "Read the Docs, Inc."
SITENAME = "EthicalAds"
SITEURL = ""
PATH = "content"
# Directories are relative to PATH
PAGE_PATHS = ["pages"]
ARTICLE_PATHS = ["posts"]
STATIC_PATHS = ["images", "downloads", "prospectus", "audio"]
TIMEZONE = "US/Pacific"
DEFAULT_LANG = "en"
DEFAULT_DATE_FORMAT = "%b %-d, %Y"
THEME = "ethicalads-theme"
SUMMARY_MAX_LENGTH = 20 # Words
# Add non-default markdown extensions
MARKDOWN = {
"extension_configs": {
"markdown.extensions.codehilite": {"css_class": "codehilite"},
"markdown.extensions.extra": {},
"markdown.extensions.meta": {},
# This adds id's to each header. Currently only shows items with `##` & `###` header.
"markdown.extensions.toc": {"toc_depth": "3"},
},
"output_format": "html5",
"tab_length": 2, # Support indenting 2 spaces for lists as per mdformat
}
PLUGINS = ["related_posts"]
# Feed (RSS/Atom) settings
# 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
# Menu settings
# --------------------------------------------------------------------------
DISPLAY_PAGES_ON_MENU = False
DISPLAY_CATEGORIES_ON_MENU = False
MENUITEMS = [
("Blog", "/blog/"),
("Pricing", "/advertisers/pricing/"),
("Advertisers", "/advertisers/"),
("Publishers", "/publishers/"),
]
MENUITEMS_CTA = [("Advertise with Us", "/advertisers/")]
# URL settings
# https://docs.getpelican.com/en/stable/settings.html#url-settings
# --------------------------------------------------------------------------
PAGE_URL = "{slug}/"
PAGE_SAVE_AS = "{slug}/index.html"
ARTICLE_URL = "blog/{date:%Y}/{date:%m}/{slug}/"
ARTICLE_SAVE_AS = "blog/{date:%Y}/{date:%m}/{slug}/index.html"
INDEX_SAVE_AS = "blog/index.html"
TAG_URL = TAG_SAVE_AS = "blog/tags/{slug}/index.html"
TAGS_SAVE_AS = "blog/tags/index.html"
# Templates for these pages are not yet styled for the ethicalads-theme
AUTHOR_URL = AUTHOR_SAVE_AS = ""
CATEGORY_URL = CATEGORY_SAVE_AS = ""
ARCHIVES_SAVE_AS = ""
AUTHORS_SAVE_AS = ""
CATEGORIES_SAVE_AS = ""
DEFAULT_METADATA = {
# Used to fill out the pricing matrix
# And the advertiser calculator
"pricing": {
"niche": {
"network": 5.00,
"eng": 5.00,
"blend": 5.00,
"weu": 5.00,
"eeu-apac": 5.00,
"global": 5.00,
},
"security": {
"network": 3.80,
"eng": 6.00,
"blend": 4.87,
"weu": 3.75,
"eeu-apac": 1.65,
"global": 0.7,
},
"datascience": {
"network": 4.05,
"eng": 6.25,
"blend": 5.12,
"weu": 4.0,
"eeu-apac": 1.9,
"global": 0.8,
},
"devops": {
"network": 3.71,
"eng": 5.75,
"blend": 4.75,
"weu": 3.75,
"eeu-apac": 1.65,
"global": 0.7,
},
"frontend": {
"network": 3.80,
"eng": 6.0,
"blend": 4.87,
"weu": 3.75,
"eeu-apac": 1.65,
"global": 0.7,
},
"backend": {
"network": 3.3,
"eng": 5.25,
"blend": 4.25,
"weu": 3.25,
"eeu-apac": 1.4,
"global": 0.6,
},
"all-developers": {
"network": 2.86,
"eng": 4.75,
"blend": 3.75,
"weu": 2.75,
"eeu-apac": 1.1,
"global": 0.5,
},
},
"regions": [
{
"slug": "network",
"name": "Run of Network",
"tooltip": "33% English speaking, 33% Western Europe, 33% APAC/E-EU",
},
{"slug": "eng", "name": "US, Canada, UK, Australia, New Zealand, Ireland"},
{
"slug": "blend",
"name": "Blend: W. Europe, US, Canada, UK, Australia, New Zealand",
},
{"slug": "weu", "name": "Western Europe"},
{"slug": "eeu-apac", "name": "Eastern EU, Asia Pacific"},
{"slug": "global", "name": "Global"},
],
"topics": [
{"slug": "niche", "name": "Custom niche targeting (Run of Network only)"},
{"slug": "security", "name": "Security & privacy"},
{"slug": "datascience", "name": "AI & machine learning"},
{"slug": "devops", "name": "DevOps"},
{"slug": "frontend", "name": "Frontend web development"},
{"slug": "backend", "name": "Backend web development"},
{"slug": "all-developers", "name": "All developers"},
],
}
# Blogroll
LINKS = ()
# Social widget
SOCIAL = ()
DEFAULT_PAGINATION = 10
# Used by the pelican-related-posts plugin
RELATED_POSTS_MAX = 3