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

Links to definition in source fail to load #1

Closed
AndrewADev opened this issue Oct 20, 2023 · 2 comments · Fixed by JamesLMilner/terra-draw#318
Closed

Links to definition in source fail to load #1

AndrewADev opened this issue Oct 20, 2023 · 2 comments · Fixed by JamesLMilner/terra-draw#318
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@AndrewADev
Copy link

AndrewADev commented Oct 20, 2023

Currently, clicking on a link on a link to the location of a definition:
image

...leads to a non-working page:
image

...because GitHub's CSP prevents use of iframes
image

...one of which is used in the main API docs component.

Possible fix:

For the markup itself, the change is as simple as not trying to display GitHub content within an <iframe>, instead using something else, likely a <div> (screenshot from the TypeDoc example site):
image

But as this iframe is currently pointing to an html file hosted on GitHub pages, there would certainly be more changes needed as well.

@JamesLMilner JamesLMilner added bug Something isn't working documentation Improvements or additions to documentation labels Oct 20, 2023
@JamesLMilner
Copy link
Owner

Thanks for raising this @AndrewADev, appreciated. This is an issue I hadn't noticed - I think the best option is to disable it for now via the disablesSources flag, although this feels like a shame. Another option would be to post process the output to make all the links of this type open in a new tab, although that would be quite laborious.

I've raised an issue on TypeDoc to ask if it's possible to add a flag to enable opening these links in another tab that you can see here: TypeStrong/typedoc#2415

@JamesLMilner
Copy link
Owner

@AndrewADev this should be resolved now just to the addition of the upstream flag to open links in a new tab 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants