Skip to content

Commit 3d8fdef

Browse files
fix(docs): fix GitHub links in API Reference
1 parent 1cd467f commit 3d8fdef

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

typedoc.config.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
11
const { repository, name } = require('./package.json');
22

3+
const repositoryURL = repository.url.replace(/\/?\.git$/i, '');
4+
35
/** @type {import('typedoc').TypeDocOptions} */
46
var configuration = {
57
/**
68
* The barrel file exports everything consumers should currently know about.
79
* Perhaps in future we may want to also document contrib/ packages.
810
*/
911
entryPoints: ['./src/index.mts'],
10-
gitRemote: repository.url,
12+
gitRemote: repositoryURL,
13+
disableGit: false,
14+
15+
/** (https://typedi.js.org/api-reference) */
16+
basePath: '/api-reference/',
17+
18+
/** Not sure how you would even localize TSDoc... */
19+
htmlLang: 'en',
20+
21+
includeVersion: true,
22+
23+
navigationLinks: {
24+
/** Link to https://typedi.js.org/ */
25+
home: '/'
26+
},
27+
28+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
29+
sourceLinkTemplate: `${repositoryURL}/blob/{gitRevision}/{path}#L{line}`,
1130

1231
/** Use the mxssfd theme. */
1332
plugin: ['@mxssfd/typedoc-theme'],

0 commit comments

Comments
 (0)