aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/doc/conf.py.in
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-03-28 14:26:25 +0200
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2022-04-08 15:32:58 +0200
commit6cbdefd9fbbbd1343998d449cc12ae4b5961af9c (patch)
tree9b92dc071ba8c20c4e4ca859bd9cfe90d4953e9b /sources/shiboken6/doc/conf.py.in
parent530cfb8c9fb3a050635577afa5ae23145a3ecc30 (diff)
doc: new theme to follow the new Qt Doc style
- Use 'furo' sphinx theme which offers a look-and-feel similar to the new Qt Documentation theme. - Change a few colors and styles to keep some details of the previous look-and-feel. - Add sphinx-copybutton extension to enable the copy-button feature against the snippet blocks. - Remove the 'pysidedocs' theme. Change-Id: I2be7186c5b043b4c75c65783abc2eab4056c493e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'sources/shiboken6/doc/conf.py.in')
-rw-r--r--sources/shiboken6/doc/conf.py.in33
1 files changed, 27 insertions, 6 deletions
diff --git a/sources/shiboken6/doc/conf.py.in b/sources/shiboken6/doc/conf.py.in
index 7b985f65d..38d551b0f 100644
--- a/sources/shiboken6/doc/conf.py.in
+++ b/sources/shiboken6/doc/conf.py.in
@@ -23,7 +23,7 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig',
- 'sphinx.ext.coverage', 'sphinx_panels']
+ 'sphinx.ext.coverage', 'sphinx_panels', 'sphinx_copybutton']
output_format='@DOC_OUTPUT_FORMAT@'
@@ -92,6 +92,7 @@ add_function_parentheses = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
+pygments_dark_style = "monokai"
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
@@ -101,13 +102,26 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'pysidedocs'
+html_theme = 'furo'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
-#html_theme_options = {
-#}
+html_theme_options = {
+ "dark_css_variables": {
+ "color-brand-primary": "#66689d",
+ "color-brand-content": "#66689d",
+ "color-admonition-title--important": "#41cd52",
+ "color-admonition-title-background--important": "#474b53",
+ "font-stack": "'Titillium Web', sans-serif",
+ },
+ "light_css_variables": {
+ "color-brand-primary": "#66689d",
+ "color-brand-content": "#41cd52",
+ "color-admonition-title--important": "#41cd52",
+ "font-stack": "'Titillium Web', sans-serif",
+ },
+}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_themes']
@@ -121,7 +135,7 @@ html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_themes']
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-#html_logo = None
+html_logo = "@CMAKE_CURRENT_SOURCE_DIR@/_static/qtforpython.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -131,8 +145,12 @@ html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_themes']
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
+html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
+html_css_files = [
+ 'css/qt_font.css',
+ 'css/qt_style.css',
+]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
@@ -166,3 +184,6 @@ html_show_sourcelink = False
# -- Options for qthelp output --------------------------------------------------
qthelp_theme = 'pysidedocs_qthelp'
+
+# copybutton config
+copybutton_copy_empty_lines = False