-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpelicanconf.py
86 lines (68 loc) · 2.12 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
AUTHOR = "Justin Cooksey"
SITENAME = "Justin Cooksey Codes"
SITESUBTITLE = "Thoughts and Code by Justin Cooksey"
SITEURL = "https://justincooksey.com"
CANONICALURL = SITEURL
DELETE_OUTPUT_DIRECTORY = True
GOOGLE_GA4_ID = "G-M6K7S460VR"
THEME = "themes/jsctheme"
PATH = "content"
ARTICLE_PATHS = ["blog"]
ARTICLE_SAVE_AS = "blog/{date:%Y}/{slug}.html"
ARTICLE_URL = "blog/{date:%Y}/{slug}.html"
PAGE_URL = "{slug}/"
PAGE_SAVE_AS = "{slug}/index.html"
TIMEZONE = "Australia/Sydney"
DEFAULT_LANG = "en"
RELATIVE_URLS = True
STATIC_PATHS = [
"extra",
]
EXTRA_PATH_METADATA = {
"extra/robots.txt": {"path": "robots.txt"},
"extra/favicon.ico": {"path": "favicon.ico"},
}
# Feed generation is usually not desired when developing
FEED_MAX_ITEMS = 20
FEED_ALL_ATOM = "feeds/all.atom.xml"
CATEGORY_FEED_ATOM = "feeds/{slug}.atom.xml"
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
MARKDOWN = {
"extension_configs": {
# Needed for code syntax highlighting
"markdown.extensions.codehilite": {"css_class": "highlight"},
"markdown.extensions.extra": {},
"markdown.extensions.meta": {},
# This is for enabling the TOC generation
"markdown.extensions.toc": {"title": "Table of Contents"},
},
"output_format": "html5",
}
# Blogroll
LINKS = (
("Pelican", "https://getpelican.com/"),
("Python.org", "https://www.python.org/"),
("Jinja2", "https://palletsprojects.com/p/jinja/"),
)
# Social widget
SOCIAL = (
("Twitter", "https://twitter.com/jscooksey"),
("GitHub", "https://github.com/jscooksey"),
)
CONTACTS = (
("Twitter", "fa-twitter", "https://twitter.com/jscooksey"),
("DEV", "fa-dev", "https://dev.to/jscooksey"),
("Mastodon", "fa-mastodon", "https://fosstodon.org/@jscooksey"),
("GitHub", "fa-github", "https://github.com/jscooksey"),
)
DEFAULT_PAGINATION = 3
SITEMAP = {
"format": "xml",
"priorities": {"articles": 0.5, "indexes": 0.5, "pages": 0.5},
"changefreqs": {"articles": "monthly", "indexes": "daily", "pages": "monthly"},
"exclude": [],
}
TAG_URL = "tags/{slug}.html"
TAG_SAVE_AS = "tags/{slug}.html"