From 492afe5c0a11e5301fc296364ed6631c978b5141 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 17 Jan 2025 15:59:53 +0400 Subject: [PATCH 1/2] Fix formatting of Markdown code blocks --- docs/sphinx/_static/css/custom.css | 16 ++++++++++++++++ docs/sphinx/conf.py | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 docs/sphinx/_static/css/custom.css diff --git a/docs/sphinx/_static/css/custom.css b/docs/sphinx/_static/css/custom.css new file mode 100644 index 000000000..e6ffd086e --- /dev/null +++ b/docs/sphinx/_static/css/custom.css @@ -0,0 +1,16 @@ +/* Display GitHub Flavored Markdown code blocks correctly */ + +.rst-content pre { + background-color: #f5f5f5; + border-radius: 6px; + padding: 16px; + margin: 16px 0; + overflow-x: auto; +} + +.rst-content pre code { + background-color: #f5f5f5; + white-space: pre; + border: none; + padding: 0; +} diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py index d7c3f7751..35d26d5a7 100644 --- a/docs/sphinx/conf.py +++ b/docs/sphinx/conf.py @@ -44,6 +44,8 @@ pygments_style = "sphinx" html_theme = "sphinx_rtd_theme" +html_static_path = ['_static'] +html_css_files = ['css/custom.css'] intersphinx_mapping = { "python": ("https://docs.python.org/3", None), From 4061bc4a887dddab17ea40bef8e586c5f7c89c8c Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 17 Jan 2025 16:22:50 +0400 Subject: [PATCH 2/2] Fix lint --- docs/sphinx/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py index 35d26d5a7..7104660b5 100644 --- a/docs/sphinx/conf.py +++ b/docs/sphinx/conf.py @@ -44,8 +44,8 @@ pygments_style = "sphinx" html_theme = "sphinx_rtd_theme" -html_static_path = ['_static'] -html_css_files = ['css/custom.css'] +html_static_path = ["_static"] +html_css_files = ["css/custom.css"] intersphinx_mapping = { "python": ("https://docs.python.org/3", None),