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
So I've been thinking about this since @paul121 opened up #21 and #22, particularly as I've shifted my thinking that links to the source repositories (not for editing docs, just for viewing source) probably fit best in the left navigation drawer. We could then add the "open-in-new" icon to those menu items, plus any other external links in the menu, like for the forum, chat and the Jitsi link. And while we're at it, it would be pretty easy to also set target="_blank" to open it in a new window as well. The easiest way to do this is probably to check if the href starts with 'http' or not. If we're doing that, we could also run other tests, like if it starts with 'https://github.com/' or 'http://twitter.com' and add a little GitHub or Twitter icon inline as well.
All this makes me think this logic should be written into the NestedNav component itself, or as a special ExternalLink component that could be used in NestedNav and elsewhere, since this seems more and more like a concern for the rendering layer.
Similarly, we could add some logic to gatsby-remark-prefix-relative-links to add a special class to external links, so we could append an ::after pseudo-element to those links with the same "open-in-new" icon, similar to how Wikipedia does with inline external links.
The text was updated successfully, but these errors were encountered:
A closely related issue to this (perhaps its own issue?) is cross-linking between different source repos, such as the link to "farmOS Data Model" on the farmOS.js Entities page. If you click that link currently, it forces a full page load, since it's not a relative link.
The simplest fix would be to check all those absolute URL's for any that start with 'https://farmos.org' and just strip the origin off if it does, but perhaps there's a more elegant solution.
So I've been thinking about this since @paul121 opened up #21 and #22, particularly as I've shifted my thinking that links to the source repositories (not for editing docs, just for viewing source) probably fit best in the left navigation drawer. We could then add the "open-in-new" icon to those menu items, plus any other external links in the menu, like for the forum, chat and the Jitsi link. And while we're at it, it would be pretty easy to also set
target="_blank"
to open it in a new window as well. The easiest way to do this is probably to check if the href starts with'http'
or not. If we're doing that, we could also run other tests, like if it starts with'https://github.com/'
or'http://twitter.com'
and add a little GitHub or Twitter icon inline as well.All this makes me think this logic should be written into the
NestedNav
component itself, or as a specialExternalLink
component that could be used inNestedNav
and elsewhere, since this seems more and more like a concern for the rendering layer.Similarly, we could add some logic to
gatsby-remark-prefix-relative-links
to add a special class to external links, so we could append an::after
pseudo-element to those links with the same "open-in-new" icon, similar to how Wikipedia does with inline external links.The text was updated successfully, but these errors were encountered: