Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link to Source Code from TypeDoc Documentation

Tags:

typedoc

I've documented a function and I can see that the generator has captured the line number:

example of SASjs get Compute Contexts function definition

Is it possible to configure TypeDoc so that a user can click through to see the actual source code? The full repository is here.

like image 529
Allan Bowe Avatar asked Feb 27 '26 11:02

Allan Bowe


1 Answers

You can use sourcelinktemplate config to provide source code url using {path}, {gitRevision} & {line} placeholders.

link to documentation: https://typedoc.org/options/input/#sourcelinktemplate

make sure to set disableGit to true.

like image 133
Swarn Pallav Bhaskar Avatar answered Mar 02 '26 15:03

Swarn Pallav Bhaskar