Skip to content

Commit 1376caf

Browse files
linking
1 parent 83314a3 commit 1376caf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/opengradient/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ print(result.model_output)
5555

5656
## Client Namespaces
5757

58-
The [Client](./client) object exposes three namespaces:
58+
The [Client](./client/index) object exposes three namespaces:
5959

6060
- **[llm](./client/llm)** -- LLM chat and completion
6161
- **[onchain_inference](./client/onchain_inference)** -- On-chain ONNX model inference

templates/text.mako

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ def linkify(text, mod):
8383
return match.group(0)
8484
display = match.group(2)
8585
rel_path = '/'.join(remaining)
86+
target_mod = dobj if isinstance(dobj, pdoc.Module) else dobj.module
87+
if isinstance(target_mod, pdoc.Module) and target_mod.is_package:
88+
rel_path += '/index'
8689
return '[{}](./{})'.format(display, rel_path)
8790
return re.sub(r'`(opengradient(?:\.\w+)+\.(\w+))`', replace_ref, text)
8891
%>\

0 commit comments

Comments
 (0)