-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.py
170 lines (141 loc) · 3.86 KB
/
conf.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
import sys
sys.path.append("scripts")
sys.path.append(".")
from pathlib import Path
from social_media import add_social_media_js, SocialPost
project = "Carlos Neto"
copyright = "2023, Carlos Neto"
author = "Carlos Neto"
extensions = [
"myst_nb",
"ablog",
"sphinx_design",
"sphinx_copybutton",
"sphinx_examples",
"sphinxext.opengraph",
"sphinxext.rediraffe",
]
templates_path = ["_templates"]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
"*import_posts*",
"**/pandoc_ipynb/inputs/*",
".nox/*",
"README.md",
"**/.ipynb_checkpoints/*",
]
# -- HTML output -------------------------------------------------
html_theme = "pydata_sphinx_theme"
html_theme_options = {
"search_bar_text": "Search this site...",
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/c-neto",
"icon": "fa-brands fa-github",
},
{
"name": "LinkedIn",
"url": "https://www.linkedin.com/in/c-neto/",
"icon": "fa-brands fa-linkedin",
},
{
"name": "Blog RSS feed",
"url": "https://carlosneto.dev/blog/atom.xml",
"icon": "fa-solid fa-rss",
},
],
"secondary_sidebar_items": [],
"article_header_start": [],
}
html_favicon = "_static/profile-color-circle-small.png"
html_title = "Carlos Neto's Tech Blog"
html_static_path = ["_static"]
html_extra_path = ["feed.xml"]
html_sidebars = {
"index": [
"hello.html"
],
"whoami": [
"hello.html"
],
"blog": [
"ablog/categories.html",
"ablog/tagcloud.html",
"ablog/recentposts.html",
"ablog/archives.html"
],
"blog/202*": [
"ablog/archives.html"
],
"blog/category": [
"ablog/categories.html",
],
"blog/category/**": [
"ablog/categories.html",
],
"blog/tag": [
"ablog/tagcloud.html",
],
"blog/tag/**": [
"ablog/tagcloud.html",
],
# "blog/**": [
# "page-toc",
# "ablog/recentposts.html"
# ],
}
# OpenGraph config
ogp_site_url = "https://carlosneto.dev"
ogp_social_cards = {
"line_color": "#4078c0",
"image": "_static/profile-color-circle.png",
}
# rediraffe_redirects = {
# "rust-governance.md": "blog/2018/rust_governance.md",
# }
# # Update the posts/* section of the rediraffe redirects to find all files
# redirect_folders = {
# "posts": "blog",
# }
# for old, new in redirect_folders.items():
# for newpath in Path(new).rglob("**/*"):
# if newpath.suffix in [".ipynb", ".md"] and "ipynb_checkpoints" not in str(
# newpath
# ):
# oldpath = str(newpath).replace("blog/", "posts/", 1)
# # Skip pandoc because for some reason it's broken
# if "pandoc" not in str(newpath):
# rediraffe_redirects[oldpath] = str(newpath)
# -- ABlog ---------------------------------------------------
blog_baseurl = "https://carlosneto.dev"
blog_title = "Carlos Neto"
blog_path = "blog"
blog_post_pattern = "blog/*/*"
blog_feed_fulltext = True
blog_feed_subtitle = "DevOps, Python, OpenSearch, and Log Pipelines."
fontawesome_included = True
post_redirect_refresh = 1
post_auto_image = 0
post_auto_excerpt = 2
# -- MyST and MyST-NB ---------------------------------------------------
# MyST
myst_enable_extensions = [
"colon_fence",
"deflist",
"html_image",
]
html_context = {
"default_mode": "light"
}
# MyST-NB
# Don't execute anything by default because many old posts don't execute anymore
# and this slows down build times.
# Instead if I want something to execute, manually set it in the post's metadata.
nb_execution_mode = "off"
def setup(app):
app.add_directive("socialpost", SocialPost)
app.connect("html-page-context", add_social_media_js)
app.add_css_file("custom.css")