Skip to content

Commit dab75ec

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 0121d94 commit dab75ec

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
@@ -26,8 +26,7 @@
2626
sys.path.append(str(r))
2727

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

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

0 commit comments

Comments
 (0)