From 558f313a78ecdf3ad6692ac17a4aede4afe23a73 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:43:01 +1200 Subject: [PATCH] Docs: Show todos in previews That includes local builds. Also fix release version numbers. --- docs/source/conf.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 2dc370c4b..723a0ea7f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -61,15 +61,24 @@ if os.getenv("READTHEDOCS"): autosectionlabel_prefix_document = True autosectionlabel_maxdepth = 1 +# include todos for previews +extensions.append('sphinx.ext.todo') + # set version if os.getenv("READTHEDOCS"): rtds_version = os.getenv("READTHEDOCS_VERSION") if rtds_version == "latest": release = yosys_ver + "-dev" + todo_include_todos = False + elif rtds_version.startswith("yosys-"): + release = yosys_ver + todo_include_todos = False else: release = rtds_version + todo_include_todos = True else: release = yosys_ver + todo_include_todos = True # assign figure numbers numfig = True @@ -84,10 +93,6 @@ latex_elements = { ''' } -# include todos during rewrite -extensions.append('sphinx.ext.todo') -todo_include_todos = False - # custom cmd-ref parsing/linking sys.path += [os.path.dirname(__file__) + "/../"] extensions.append('util.cmdref')