From 9e22b6ad53e4f3083246766ce721bf094842ccee Mon Sep 17 00:00:00 2001 From: Matt Gajownik Date: Mon, 3 Jan 2022 13:00:02 +1100 Subject: [PATCH] CI: Use ReadTheDocs theme for Sphinx docs --- docs/sphinx/conf.py | 32 ++++++++++++++++++++++++++++++-- docs/sphinx/favicon.ico | Bin 0 -> 1150 bytes docs/sphinx/requirements.txt | 2 ++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 docs/sphinx/favicon.ico create mode 100644 docs/sphinx/requirements.txt diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py index 4df8305ad..a1e6334ff 100644 --- a/docs/sphinx/conf.py +++ b/docs/sphinx/conf.py @@ -31,7 +31,14 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.coverage", + "sphinx.ext.viewcode", + "sphinx_rtd_theme", + "sphinxcontrib.napoleon", + "sphinx.ext.autosectionlabel", +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -85,7 +92,28 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'bizstyle' +html_theme = 'sphinx_rtd_theme' +html_theme_options = { + "logo_only": False, + "navigation_depth": 5, + 'prev_next_buttons_location': 'both', + 'vcs_pageview_mode': 'edit', + 'style_external_links': True, + 'style_nav_header_background': '#202C73', + 'collapse_navigation': False +} + +html_logo = '../../icons/macos.png' + +html_favicon = 'favicon.ico' + +html_context = { + "display_github": True, # Integrate GitHub + "github_user": "OBSProject", # Username + "github_repo": "obs-studio", # Repo name + "github_version": "master", # Version + "conf_py_path": "/docs/sphinx/", # Path in the checkout to the docs root +} # 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 diff --git a/docs/sphinx/favicon.ico b/docs/sphinx/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..76b7bca8b6aeafe52ee78fbc549f458cdabc4dfb GIT binary patch literal 1150 zcmah|YfO`86n;DQ!^ybVVjcHOX^V(}P^xtTPAKF^PF=S z6VWd?n9)0i)qTvElrfe-Mq9Mw+owOq=uG18GhzMSYjt&%4Vi{^&)Mg`n4O)yX0cd| zmg(tUo6Xkda5xIa$HxN!FwIfTJ4n4=FRbl$yXyJW^9S9(cKzMl)at!ROBcE8U)(4y`KaY=%M^soOWQ4hU=Pv4M>JTao zMRY{8aK`VHmXu=hkI5m@Nc`&ctL)yM-oH|kQYeN3F_AF{-xmf+kOVo$b5K@VM&DwD zz40L@9*N3C{B-ZfEvM6YYH4ZdYD@DauP?R?k)aWgN~8$#52RcUA?x!@1nv%iRJ<1v zpM}54MS+XwE`Z|SpS9V#eB2en8IK(jEWxL{{BgeeJg5!`AiOy6e-6n9lA$|OfvKq} z6V-->nAHKE7z&M zf_8CHvH0fHX|xeeqt;L!dl9lH1nH@1XuZ;kj-NYl>*g)w=j4+Q9p`V@aBt*w8aiDE z6O#lV{7waN6O(3K!?&h7q(Vti2~v|&sisQKYkPfty@E6hn0_%mzHuSxfyjF+TCT=O53$ot+)Fxw)A&_-JrBleDh6P=n){+2FZw;}}_t zuYY*l!zwk5-Ntp7%k>rSTk2_cx%G;O)@S>F>vvY3)uHHQq0o0c)>}(d?uRy43uBkj zwYIkQ?aa)KAI+CA126x4$wtRUMQ*qIgn82ZSbtx?ReP~k$hWw#SePNwZF_8NY=m+y zp&9aX%sbwh!Qm&v!W_{&>>(~?^Yil^R*Us9#W2xa8aO{XlXA`z&z}8<-3VgrsUMk$ Qv1?=>diWh~9K*5y0t{gUE&u=k literal 0 HcmV?d00001 diff --git a/docs/sphinx/requirements.txt b/docs/sphinx/requirements.txt new file mode 100644 index 000000000..acbeb221c --- /dev/null +++ b/docs/sphinx/requirements.txt @@ -0,0 +1,2 @@ +sphinx_rtd_theme>=0.5.2 +sphinxcontrib-napoleon>=0.7 \ No newline at end of file