From aba481bd577a0fcc26538dd3886ac5e1a1f2fb38 Mon Sep 17 00:00:00 2001 From: Sebastian Gode Date: Mon, 6 Nov 2023 14:03:25 +0000 Subject: [PATCH] Update tox.ini && conf.py file Performed-by: gitea/infra/otc-metadata/tools/generate_doc_confpy.py --- doc/requirements.txt | 3 +++ doc/source/conf.py | 11 +++++++++++ tox.ini | 11 +++++++---- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index ea0c4de..c022286 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,7 +1,10 @@ sphinx>=2.0.0,!=2.1.0 # BSD + otcdocstheme # Apache-2.0 + # releasenotes reno>=3.1.0 # Apache-2.0 otc-sphinx-directives>=0.1.0 +sphinx-minify>=0.0.1 # Apache-2.0 git+https://gitea.eco.tsi-dev.otc-service.com/infra/otc-metadata.git#egg=otc_metadata \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index e9a4a1e..850bdd8 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -31,6 +31,17 @@ otcdocs_repo_name = 'docs/gaussdb-mysql' otcdocs_git_fqdn = 'gitea.eco.tsi-dev.otc-service.com' otcdocs_git_type = 'gitea' +# Those variables are needed for indexing into OpenSearch +otcdocs_doc_environment = '' +otcdocs_doc_link = '' +otcdocs_doc_title = '' +otcdocs_doc_type = '' +otcdocs_service_category = 'database' +otcdocs_service_title = 'GaussDB (for MySQL)' +otcdocs_service_type = 'gaussdb_mysql' +otcdocs_search_environment = 'hc_de' +otcdocs_search_url = "https://opensearch.eco.tsi-dev.otc-service.com/" + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. diff --git a/tox.ini b/tox.ini index 003eb2e..78cc015 100644 --- a/tox.ini +++ b/tox.ini @@ -34,8 +34,9 @@ allowlist_externals = rm sphinx-build commands = - rm -rf doc/build/html doc/build/doctrees - sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html + rm -rf doc/build/html doc/build/html_temp doc/build/doctrees + sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html_temp + sphinx-minify --input-directory doc/build/html_temp/ --output-directory doc/build/html {[testenv:api-ref]commands} {[testenv:json-api-ref]commands} {[testenv:umn]commands} @@ -62,7 +63,8 @@ allowlist_externals = cp mkdir commands = - sphinx-build -W --keep-going -b html api-ref/source doc/build/html/api-ref + sphinx-build -W --keep-going -b html api-ref/source doc/build/html_temp/api-ref + sphinx-minify --input-directory doc/build/html_temp/api-ref --output-directory doc/build/html/api-ref mkdir -p api-ref/build/html cp -av doc/build/html/api-ref api-ref/build/html @@ -107,7 +109,8 @@ allowlist_externals = cp mkdir commands = - sphinx-build -W --keep-going -b html umn/source doc/build/html/umn + sphinx-build -W --keep-going -b html umn/source doc/build/html_temp/umn + sphinx-minify --input-directory doc/build/html_temp/umn --output-directory doc/build/html/umn mkdir -p umn/build/html cp -av doc/build/html/umn umn/build/html