diff --git a/.readthedocs.yml b/.readthedocs.yml index 7a2c8f32aff..bd9f8c51f93 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -21,6 +21,31 @@ python: - requirements: docs/requirements-docs.txt build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: python: "3" # latest stable cpython version + +search: + ranking: # bump up rank of commonly searched pages: (default: 0, values range from -10 to 10) + telegram.bot.html: 7 + telegram.message.html: 3 + telegram.update.html: 3 + telegram.user.html: 2 + telegram.chat.html: 2 + telegram.ext.application.html: 3 + telegram.ext.filters.html: 3 + telegram.ext.callbackcontext.html: 2 + telegram.ext.inlinekeyboardbutton.html: 1 + + telegram.passport*.html: -7 + + ignore: + - changelog.html + - coc.html + - bot_methods.html# + - bot_methods.html + # Defaults + - search.html + - search/index.html + - 404.html + - 404/index.html' diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index b2c5a5e8213..99dd6fe54d9 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,5 +1,6 @@ sphinx==5.1.1 sphinx-pypi-upload -furo==2022.6.21 +furo==2022.9.15 +git+https://github.com/harshil21/furo-sphinx-search@be5cfa221a01f6e259bb2bb1f76d6ede7ffc1f11#egg=furo-sphinx-search sphinx-paramlinks==0.5.4 sphinxcontrib-mermaid==0.7.1 \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 4d4726cdc14..b17b44f13f1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -34,7 +34,7 @@ release = "20.0a4" # telegram.__version__ # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "4.5.0" +needs_sphinx = "5.1.1" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -46,6 +46,7 @@ "sphinx.ext.linkcode", "sphinx_paramlinks", "sphinxcontrib.mermaid", + "sphinx_search.extension", ] # Use intersphinx to reference the python builtin library docs @@ -212,11 +213,9 @@ # 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 = ["_static"] -html_css_files = [ - "style_external_link.css", - "style_mermaid_diagrams.css", -] -html_permalinks_icon = "¶" # Furo's default permalink icon is `#`` which doesn't look great imo. +html_css_files = ["style_external_link.css", "style_mermaid_diagrams.css"] + +html_permalinks_icon = "¶" # Furo's default permalink icon is `#` which doesn't look great imo. # Output file base name for HTML help builder. htmlhelp_basename = "python-telegram-bot-doc" @@ -257,6 +256,7 @@ # (source start file, name, description, authors, manual section). man_pages = [(master_doc, "python-telegram-bot", "python-telegram-bot Documentation", [author], 1)] +# rtd_sphinx_search_file_type = "un-minified" # Configuration for furo-sphinx-search # -- Options for Texinfo output -------------------------------------------