Skip to content

Commit c94a7fb

Browse files
Include link in title for functions
1 parent d82949f commit c94a7fb

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

scripts/generate-docs.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,15 @@ def _add_divider_if_more(section_name):
112112
for func in functions:
113113
name = func.get('name', 'Unknown')
114114
version = func.get('version', '')
115-
lines.append(f"### {name} `v{version}`")
115+
github_url = func.get('github_url')
116+
if github_url:
117+
lines.append(f"### [{name}]({github_url}) `v{version}`")
118+
else:
119+
lines.append(f"### {name} `v{version}`")
116120
if func.get('description'):
117121
lines.extend([func['description'], ""])
118122
if func.get('author'):
119123
lines.append(f"- **Author:** {func['author']}")
120-
if func.get('file'):
121-
lines.append(f"- **Source:** [View code]({func['github_url']})")
122124
lines.append("")
123125

124126
_add_divider_if_more('functions')

0 commit comments

Comments
 (0)