Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Defined in" linking to unpkg or github #6

Open
cspotcode opened this issue Jul 14, 2021 · 3 comments · May be fixed by #20
Open

"Defined in" linking to unpkg or github #6

cspotcode opened this issue Jul 14, 2021 · 3 comments · May be fixed by #20
Assignees

Comments

@cspotcode
Copy link
Collaborator

Typedoc can link to the source code in github. But if we're rendering from npm installs, links will be to the bundled .d.ts. Can we link to unpkg.com? Is this useful, or should we not attempt any unpkg linking, preferring instead to wait until we can link to github?

@keithlayne
Copy link
Collaborator

One consideration is that not everything might be on github. I think unpkg would probably be pretty good.

I mean, if we have the npm, we have the source. This could be done:

image

(from the rails api docs) I don't know how useful that is. It's also possible I'm missing a step.

@cspotcode
Copy link
Collaborator Author

I found this in Typedoc's source: https://github.com/TypeStrong/typedoc/blob/8e097efdea3cda1b1f27467199a5ea5d690943f4/src/lib/converter/plugins/GitHubPlugin.ts#L257-L266

I think we can tweak this plugin to render links to unpkg.

@cspotcode cspotcode self-assigned this Jul 16, 2021
@cspotcode
Copy link
Collaborator Author

I've self-assigned this because I'm going to try making a Unpkg linking plugin, based on the github plugin.

@cspotcode cspotcode linked a pull request Jul 18, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants