Skip to content

Commit

Permalink
Docs: Show todos in previews
Browse files Browse the repository at this point in the history
That includes local builds.
Also fix release version numbers.
  • Loading branch information
KrystalDelusion committed Sep 2, 2024
1 parent 25623b1 commit 558f313
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,24 @@
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
Expand All @@ -84,10 +93,6 @@
'''
}

# 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')
Expand Down

0 comments on commit 558f313

Please sign in to comment.