Skip to content

Commit cd102d2

Browse files
committed
Switch to sphinxext.opengraph
1 parent fa489a3 commit cd102d2

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

docs/conf.py

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"sphinx.ext.intersphinx",
2323
"sphinx.ext.viewcode",
2424
"sphinxcontrib.mermaid",
25+
"sphinxext.opengraph",
2526
]
2627

2728
myst_enable_extensions = [
@@ -31,6 +32,9 @@
3132
]
3233
mermaid_init_js = "mermaid.initialize({startOnLoad:true,theme:'neutral'});"
3334

35+
ogp_image = "_static/structlog_logo.png"
36+
37+
3438
# Add any paths that contain templates here, relative to this directory.
3539
templates_path = ["_templates"]
3640

@@ -99,24 +103,6 @@
99103

100104
htmlhelp_basename = "structlogdoc"
101105

102-
_logo = "https://www.structlog.org/en/latest/_static/structlog_logo.svg"
103-
_descr = (
104-
"structlog makes logging in Python faster, less painful, and more "
105-
"powerful by adding structure to your log entries."
106-
)
107-
_title = "structlog: Structured Logging for Python"
108-
rst_epilog = f"""\
109-
.. meta::
110-
:property=og:type: website
111-
:property=og:site_name: { _title }
112-
:property=og:description: { _descr }
113-
:property=og:author: Hynek Schlawack
114-
:property=og:image: { _logo }
115-
:twitter:title: { _title }
116-
:twitter:image: { _logo }
117-
:twitter:creator: @hynek
118-
"""
119-
120106
latex_documents = [
121107
("index", "structlog.tex", "structlog Documentation", "Author", "manual")
122108
]

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ docs = [
5353
"sphinx",
5454
"sphinx-notfound-page",
5555
"sphinxcontrib-mermaid",
56+
"sphinxext-opengraph",
5657
"twisted",
5758
]
5859
dev = ["structlog[tests,typing]"]

0 commit comments

Comments
 (0)