Skip to content

Commit 3f7553a

Browse files
robtaylorclaude
andcommitted
Fix platform-api.rst toctree to correctly link autoapi docs
- Use relative path for toctree entry to chipflow-lib/autoapi/chipflow/index - Exclude chipflow-lib/platform-api.rst since we use root level platform-api.rst - Updated comments for clarity 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5bc8165 commit 3f7553a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/source/conf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
sys.path.append(str(r))
2626

2727
# Create platform-api.rst in docs/source/ (outside chipflow-lib to avoid copy_docs overwriting)
28-
# Uses autoapi instead of autodoc directives (autodoc requires chipflow to be installed)
29-
# Note: Warning about "nonexisting document" is expected - autoapi generates files after toctree parsing
28+
# This file points to the autoapi-generated index
3029
Path('platform-api.rst').write_text("""Platform API Reference
3130
======================
3231
@@ -35,7 +34,7 @@
3534
.. toctree::
3635
:maxdepth: 3
3736
38-
/chipflow-lib/autoapi/chipflow/index
37+
chipflow-lib/autoapi/chipflow/index
3938
""")
4039

4140
# Update chipflow-lib/index.rst to point to the platform-api.rst outside chipflow-lib/
@@ -120,7 +119,7 @@
120119
'imported-members',
121120
]
122121
autoapi_root = "chipflow-lib/autoapi"
123-
autoapi_add_toctree_entry = False # Don't auto-add to toctree (we link manually)
122+
autoapi_add_toctree_entry = False # We'll manually add to toctree in platform-api.rst
124123
autoapi_ignore = [
125124
"*/chipflow_lib/*", # Backward compatibility shim
126125
]
@@ -130,6 +129,7 @@
130129
autoapi_template_dir,
131130
"chipflow-lib/unfinished",
132131
"chipflow-lib/UNFINISHED_IDEAS.md",
132+
"chipflow-lib/platform-api.rst", # We use /platform-api.rst at root instead
133133
"amaranth/cover.rst",
134134
"amaranth-soc/cover.rst",
135135
]

0 commit comments

Comments
 (0)