forked from iranzo/blog-o-matic
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pelicanconf.py
253 lines (194 loc) · 6.57 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
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
# THINGS TO CONFIGURE
# ---------------------------------------------------------------------
AUTHOR = "A blog-o-matic user"
SITENAME = "My personal blog with blog-o-matic"
SITESUBTITLE = "This is where I do test things"
SITEURL = "/"
DEFAULT_LANG = "en"
DEFAULT_CATEGORY = "blog"
CLAIM_GOOGLE = "Bk4Z5ucHLyPXqlZlj5LzANpYBBSvxqBW4E8i-Kwf-bQ"
CLAIM_BING = "8FF1B025212A47B5B27CC47163A042F0"
LANDING_PAGE_ABOUT = {
"title": "My blog",
"details": """<p>This website contains Info that might be interesting for you, enjoy!</p>""",
}
PROJECTS = [
{
"name": "Blog-o-matic",
"url": "https://github.com/iranzo/blog-o-matic",
"description": "Canned blog automation for quickly setting up a blog with Pelican",
},
{
"name": "Citellus",
"url": "https://citellus.org",
"description": "Troubleshooting automation tool with easy to contribute rules",
},
{
"name": "Pablo Iranzo Blog",
"url": "https://iranzo.github.io",
"description": "Other projects at Github website",
},
{
"name": "Redken Telegram BOT",
"url": "https://t.me/redken_bot",
"description": "A Telegram bot with support for Karma, RSS Feeds, Quotes, etc",
},
]
LINKS = (
("Redken on telegram", "https://t.me/redken_bot"),
("RHJobs channel on TG", "https://t.me/rhjobs"),
)
# Keep 'name' like 'twitter' with what 'FontAwesome has for putting the right icon'
SOCIAL = (
("Twitter", "http://twitter.com/iranzop"),
("github", "http://github.com/iranzo"),
("linkedin", "https://www.linkedin.com/in/iranzo/"),
)
# TWITTER_USERNAME = "fillit"
# Update if you use amazon links
AMAZON_ONELINK = "23824450-ef77-4537-9259-8590465886f1"
# GOOGLE_ANALYTICS tracking ID
# GOOGLE_ANALYTICS = "UA-81705-12"
# Configure if you use Disqus for comments
# DISQUS_SITENAME = "iranzo-github-io"
# DISQUS_DISPLAY_COUNTS = True
# Extra files customization
EXTRA_PATH_METADATA = {}
EXTRA_TEMPLATES_PATHS = [
"plugins/revealmd/templates", # eg: "plugins/revealmd/templates"
]
STATIC_PATHS = ["images"]
# Photo Gallery plugin
PHOTO_LIBRARY = "gallery-source/"
PHOTO_GALLERY = (1024, 768, 80)
PHOTO_ARTICLE = (760, 506, 80)
PHOTO_THUMB = (192, 144, 60)
PHOTO_SQUARE_THUMB = False
PHOTO_RESIZE_JOBS = 5
PHOTO_WATERMARK = True
PHOTO_WATERMARK_TEXT = "© Pablo Iranzo Gómez (https://iranzo.github.io)"
PHOTO_WATERMARK_IMG = ""
PHOTO_EXIF_KEEP = False
PHOTO_EXIF_REMOVE_GPS = True
PHOTO_EXIF_COPYRIGHT = "COPYRIGHT"
# PHOTO_EXIF_COPYRIGHT_AUTHOR = 'Your Name Here' (Defaults to Author)
# ONLY TOUCH IF YOU KNOW WHAT YOU'RE DOING!
# ---------------------------------------------------------------------
PATH = "content"
TIMEZONE = "Europe/Madrid"
# Put as draft content in the future
WITH_FUTURE_DATES = True
# Put full text in RSS feed
RSS_FEED_SUMMARY_ONLY = False
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = "feeds/all.atom.xml"
FEED_ALL_RSS = "feeds/all.rss"
CATEGORY_FEED_ATOM = "feeds/{slug}.atom.xml"
CATEGORY_FEED_RSS = "feeds/{slug}.rss"
TRANSLATION_FEED_ATOM = "feeds/{lang}.atom.xml"
TRANSLATION_FEED_RSS = "feeds/{lang}.rss"
AUTHOR_FEED_ATOM = "feeds/{slug}.atom.xml"
AUTHOR_FEED_RSS = "feeds/{slug}.rss"
TAG_FEED_ATOM = "feeds/tag_{slug}.atom.xml"
TAG_FEED_RSS = "feeds/tag_{slug}.rss"
DISPLAY_PAGES_ON_MENU = True
CACHE_CONTENT = False
CACHE_PATH = ".cache"
LOAD_CONTENT_CACHE = False
# Plugins
PLUGIN_PATHS = ["plugins"]
PLUGINS = [
"sitemap",
"extract_toc",
"tipue_search",
"liquid_tags.img",
"neighbors",
"render_math",
"related_posts",
"share_post",
"series",
"assets",
"post_stats",
"revealmd",
"photos",
]
# 'better_codeblock_line_numbering'
# 'better_figures_and_images'
THEME = "themes/elegant"
# elegant
TYPOGRIFY = True
RECENT_ARTICLE_SUMMARY = True
RESPONSIVE_IMAGES = True
MARKDOWN = {
"extension_configs": {
"markdown.extensions.codehilite": {"css_class": "highlight", "linenums": True},
"markdown.extensions.extra": {},
"markdown.extensions.toc": {"permalink": "true"},
"markdown.extensions.meta": {},
"markdown.extensions.admonition": {},
},
"output_format": "html5",
}
DIRECT_TEMPLATES = ("index", "tags", "categories", "archives", "search", "404")
# Elegant Labels
SOCIAL_PROFILE_LABEL = "Stay in Touch"
RELATED_POSTS_LABEL = "Keep Reading"
SHARE_POST_INTRO = "Like this post? Share on:"
COMMENTS_INTRO = ""
FILENAME_METADATA = r"(?P<date>\d{4}-\d{2}-\d{2})_(?P<slug>.*)"
USE_FOLDER_AS_CATEGORY = False
SEARCH_BOX = False
# URL Settings to be compatible with octopress
ARTICLE_URL = "blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/"
ARTICLE_SAVE_AS = "blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html"
ARTICLE_LANG_URL = "blog/{date:%Y}/{date:%m}/{date:%d}/{slug}-{lang}/"
ARTICLE_LANG_SAVE_AS = "blog/{date:%Y}/{date:%m}/{date:%d}/{slug}-{lang}/index.html"
YEAR_ARCHIVE_URL = "blog/archive/{date:%Y}/"
YEAR_ARCHIVE_SAVE_AS = "blog/archive/{date:%Y}/index.html"
MONTH_ARCHIVE_URL = "blog/archive/{date:%Y}/{date:%m}/"
MONTH_ARCHIVE_SAVE_AS = "blog/archive/{date:%Y}/{date:%m}/index.html"
CATEGORY_URL = "blog/category/{slug}/"
CATEGORY_SAVE_AS = "blog/category/{slug}/index.html"
TAG_URL = "blog/tag/{slug}/"
TAG_SAVE_AS = "blog/tag/{slug}/index.html"
PAGE_URL = "{slug}/"
PAGE_SAVE_AS = "{slug}/index.html"
AUTHOR_SAVE_AS = ""
AUTHORS_SAVE_AS = ""
ARCHIVES_URL = "blog/archives/"
ARCHIVES_SAVE_AS = "blog/archives/index.html"
CATEGORIES_URL = "blog/categories/"
CATEGORIES_SAVE_AS = "blog/categories/index.html"
TAGS_URL = "blog/tags/"
TAGS_SAVE_AS = "blog/tags/index.html"
TAGS_URL = "tags"
TAGS_SAVE_AS = "tags/index.html"
AUTHORS_URL = "authors"
AUTHORS_SAVE_AS = "authors/index.html"
CATEGORIES_URL = "categories"
CATEGORIES_SAVE_AS = "categories/index.html"
ARCHIVES_URL = "archives"
ARCHIVES_SAVE_AS = "archives/index.html"
DEFAULT_PAGINATION = 5
DEFAULT_ORPHANS = 0
PAGINATION_PATTERNS = (
(1, "{base_name}/", "{base_name}/index.html"),
(2, "{base_name}/page/{number}/", "{base_name}/page/{number}/index.html"),
)
# Uncomment following line if you want document-relative URLs when developing
RELATIVE_URLS = True
# sitemap
SITEMAP = {
"format": "xml",
"priorities": {"articles": 0.5, "indexes": 0.5, "pages": 0.5},
"changefreqs": {"articles": "monthly", "indexes": "daily", "pages": "monthly"},
}
SITE_UPDATED = datetime.date.today()
# use those if you want pelican standard pages to appear in your menu
MENU_INTERNAL_PAGES = (
("Tags", TAGS_URL, TAGS_SAVE_AS),
("Archives", ARCHIVES_URL, ARCHIVES_SAVE_AS),
)