From 5b446e9824c53e84c08f461961e14e9cf6dff463 Mon Sep 17 00:00:00 2001 From: Stephen Curran Date: Thu, 1 Feb 2024 06:25:33 +0000 Subject: [PATCH] RTD Fixes to enable publishing Signed-off-by: Stephen Curran --- .readthedocs.yaml | 14 ++++++++++++++ docs/source/conf.py | 14 +++++++++++--- docs/source/requirements.txt | 8 +++++--- 3 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..01a34f08b --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,14 @@ +version: 2 + +build: + os: "ubuntu-20.04" + tools: + python: "3.6" + +sphinx: + builder: dirhtml + configuration: docs/source/conf.py + +python: + install: + - requirements: docs/source/requirements.txt diff --git a/docs/source/conf.py b/docs/source/conf.py index e1e43b05b..5f665ce6e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -17,12 +17,14 @@ import os import sys import sphinx_rtd_theme +import recommonmark from recommonmark.transform import AutoStructify + sys.path.insert(0, os.path.abspath('.')) # -- Project information ----------------------------------------------------- project = u'Hyperledger Indy Node' -copyright = u'2018, Hyperledger' +copyright = u'2024, Hyperledger' author = u'Hyperledger' # The short X.Y version @@ -43,8 +45,14 @@ # ones. extensions = [ 'sphinx.ext.intersphinx', + 'recommonmark', + 'sphinx.ext.autosectionlabel', ] +# Prefix document path to section labels, otherwise autogenerated labels would look like 'heading' +# rather than 'path/to/file:heading' +autosectionlabel_prefix_document = True + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -63,7 +71,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -229,7 +237,7 @@ def setup(app): except: e = sys.exc_info()[0] - print e + print(e) finally: os.system("rm -rf remote_conf/ __pycache__/ remote_conf.py") diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt index c8e32deee..0cbb6079a 100644 --- a/docs/source/requirements.txt +++ b/docs/source/requirements.txt @@ -1,3 +1,5 @@ -recommonmark==0.4.0 -Sphinx==1.8.2 -sphinx-rtd-theme==0.4.2 \ No newline at end of file +# Defining the exact versions for ReadTheDocs that will make sure things don't break +sphinx==5.3.0 +sphinx_rtd_theme==1.1.1 +readthedocs-sphinx-search==0.3.2 +recommonmark \ No newline at end of file