File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,25 @@ def exit(self, el: layout.Doc):
39
39
p_el = page_node .value
40
40
41
41
uri = f"{ self .base_dir } /{ p_el .path } .html#{ el .anchor } "
42
+
43
+ name_path = el .obj .path
44
+ canonical_path = el .obj .canonical_path
45
+
46
+ # item corresponding to the specified path ----
47
+ # e.g. this might be a top-level import
42
48
self .items .append (
43
- layout .Item (name = el . obj . path , obj = el .obj , uri = uri , dispname = None )
49
+ layout .Item (name = name_path , obj = el .obj , uri = uri , dispname = None )
44
50
)
45
51
52
+ if name_path != canonical_path :
53
+ # item corresponding to the canonical path ----
54
+ # this is where the object is defined (which may be deep in a submodule)
55
+ self .items .append (
56
+ layout .Item (
57
+ name = canonical_path , obj = el .obj , uri = uri , dispname = name_path
58
+ )
59
+ )
60
+
46
61
return el
47
62
48
63
@dispatch
You can’t perform that action at this time.
0 commit comments