Commit 5c1c291
committed
feat(docs[_ext]): register tool sections as Sphinx labels for site-wide {ref} links
Add doctree-read hook to fastmcp_autodoc that registers all section
nodes with StandardDomain (labels + anonlabels), mirroring the pattern
used by sphinx.ext.autosectionlabel.
note_explicit_target() only registers with docutils — the Sphinx {ref}
role looks up targets in StandardDomain, which was never populated.
Now any section ID created by the fastmcp-tool directive (or any other
heading) is a valid cross-reference target from any page.
docs/index.md "What you can do" tool names are now inline code links
using MyST [`tool_name`](#label) syntax — renders as <a><code> elements
that resolve through Sphinx's label system across the dirhtml builder.1 parent 59856c6 commit 5c1c291
2 files changed
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
705 | 706 | | |
706 | 707 | | |
707 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
708 | 729 | | |
709 | 730 | | |
710 | 731 | | |
| 732 | + | |
711 | 733 | | |
712 | 734 | | |
713 | 735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
0 commit comments