You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment all links to source code do not open in new tabs by default. There is no issue in this behaviour as it is expected, however if you are hosting your docs in an iframe in a page that has the CSP policy frame ancestors: none then the page will fail to load in the iframe. Sites such as GitHub Pages have this policy enabled, making it hard to host the docs on GitHub pages.
Suggested Solution
It would be great if there was a flag to enable adding target="_blank" which opens the link in a new tab. Perhaps something like sourceLinkNewTab which defaults to true but is configurable to false.
This would result in the generated HTML going from something like this:
<li>Defined in <ahref="https://github.com/JamesLMilner/terra-draw/blob/f640815/src/terra-draw.ts#L69">terra-draw.ts:69</a></li>
to this:
<li>Defined in <a href="https://github.com/JamesLMilner/terra-draw/blob/f640815/src/terra-draw.ts#L69" target="_blank" rel="noopener noreferrer">terra-draw.ts:69</a></li>
I feel like people hosting there docs on GitHub Pages is probably a common use case so this feels like it would be beneficial to others hopefully.
The text was updated successfully, but these errors were encountered:
Search Terms
CSP, new tab, tab links, GitHub pages
Problem
At the moment all links to source code do not open in new tabs by default. There is no issue in this behaviour as it is expected, however if you are hosting your docs in an iframe in a page that has the CSP policy
frame ancestors: none
then the page will fail to load in the iframe. Sites such as GitHub Pages have this policy enabled, making it hard to host the docs on GitHub pages.Suggested Solution
It would be great if there was a flag to enable adding target="_blank" which opens the link in a new tab. Perhaps something like
sourceLinkNewTab
which defaults to true but is configurable to false.This would result in the generated HTML going from something like this:
to this:
I feel like people hosting there docs on GitHub Pages is probably a common use case so this feels like it would be beneficial to others hopefully.
The text was updated successfully, but these errors were encountered: