-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpelicanconf.py
80 lines (67 loc) · 1.95 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
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# Site information
AUTHOR = "Scott Berrevoets"
SITENAME = "Scott Berrevoets"
SITEURL = "https://scottberrevoets.com"
# Show line numbers in code snippets
MARKDOWN = {
"extension_configs": {
"markdown.extensions.codehilite": {
"css_class": "highlight",
"linenums": True,
},
"markdown.extensions.extra": {},
"markdown.extensions.meta": {},
"markdown.extensions.toc": {},
"markdown.extensions.admonition": {},
},
"output_format": "html5",
}
# Path specifications
RELATIVE_URLS = True
PATH = "content"
THEME = "./theme"
ARTICLE_URL = "{date:%Y}/{date:%m}/{date:%d}/{slug}/"
ARTICLE_SAVE_AS = "{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html"
PAGE_URL = "{slug}.html"
PAGE_SAVE_AS = "{slug}.html"
# Pagination
DEFAULT_PAGINATION = 5
PAGINATION_PATTERNS = (
(1, "{base_name}/", "{base_name}/index.html"),
(2, "{base_name}/page/{number}/", "{base_name}/page/{number}/index.html"),
)
# Create and link to index and archive
DIRECT_TEMPLATES = [("index")]
MENUITEMS = [("Blog", "")]
# Disable parsing HTML files
READERS = {"html": None}
# Disable authors, categories, and tags
AUTHOR_SAVE_AS = False
CATEGORY_SAVE_AS = False
TAG_SAVE_AS = False
# Locale settings
DEFAULT_LANG = "en"
TIMEZONE = "America/Los_Angeles"
DATE_FORMATS = {"en": "%B %d, %Y"}
# Social media
DISPLAY_SOCIAL_MEDIA = True
SOCIALMEDIAITEMS = [
("github.svg", "https://github.com/sberrevoets"),
("linkedin.svg", "https://linkedin.com/in/sberrevoets"),
("mastodon.svg", "https://hachyderm.io/@ScottBerrevoets"),
("mail.svg", "mailto:[email protected]"),
("rss.svg", "/feeds/all.atom.xml"),
]
# No feeds in development mode
FEED_DOMAIN = SITEURL
FEED_ATOM = None
FEED_RSS = None
FEED_ALL_ATOM = None
FEED_ALL_RSS = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None