diff --git a/404.rst b/404.rst new file mode 100644 index 0000000..2196075 --- /dev/null +++ b/404.rst @@ -0,0 +1,24 @@ +:github_url: hide +:allow_comments: False + +Page not found +============== + +.. https://github.com/readthedocs/sphinx-notfound-page + +.. raw:: html + +
+ Sorry, we couldn't find that page. It may have been renamed or removed + in the version of the documentation you're currently browsing. +
++ If you're currently browsing the + latest version of the documentation, try browsing the + stable version of the documentation. +
++ Alternatively, use the + Search docs + box on the left or go to the homepage. +
diff --git a/conf.py b/conf.py index 881d91c..af13fbd 100644 --- a/conf.py +++ b/conf.py @@ -12,11 +12,11 @@ version = '0.1.0' # -- General configuration extensions = [ - 'sphinx.ext.duration', - 'sphinx.ext.doctest', - 'sphinx.ext.autodoc', - 'sphinx.ext.autosummary', - 'sphinx.ext.intersphinx', + "sphinx_tabs.tabs", + "notfound.extension", + "sphinxext.opengraph", + "sphinx_copybutton", + "sphinxcontrib.video", ] intersphinx_mapping = { @@ -70,3 +70,21 @@ html_js_files = [ # -- Options for EPUB output epub_show_urls = 'footnote' + + +# -- Custom Sphinx roles for UI ------------------------------------------- + +rst_prolog = """ +.. role:: button + :class: role-button role-ui + +.. role:: menu + :class: role-menu role-ui + +.. role:: inspector + :class: role-ui + +.. role:: ui + :class: role-ui + +""" diff --git a/requirements.txt b/requirements.txt index 7ae4320..0834d01 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,20 @@ +# Base dependencies +pygments==2.19.2 + +# Sphinx base and RTD theme. sphinx==8.1.3 sphinx_rtd_theme==3.0.2 + +# Sphinx extensions. + +# Code tabs extension to display codeblocks in different languages as tabs. +sphinx-tabs==3.4.7 +# Adds a 'copy' button to the right of codeblocks. +sphinx-copybutton==0.5.2 +# Custom 404 error page (more useful than the default). +sphinx-notfound-page==1.1.0 +# Adds Open Graph tags in the HTML `` tag. +sphinxext-opengraph==0.10.0 + +# `.. video::` directive support to embed videos in documentation pages. +sphinxcontrib-video==0.4.1