-
Notifications
You must be signed in to change notification settings - Fork 21
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
new landing page (first page after opening gateway) with new tabs opening when clicking links #76
Comments
Potentially duplicate w/ #89? |
Oh, this refers to when running |
This post seems relevant to this issue: https://stackoverflow.com/questions/11716781/open-a-link-in-a-new-window-in-restructuredtext |
So... we don't have direct control over attributes in Sphinx, like In order to configure links to open in a new tab in .rst docs we need to adjust Sphinx and use a custom JavaScript solution that automatically adds this attribute to external links when the HTML is loaded in the browser Resources
---------
Product page: `M5Stack Stick C <https://shop.m5stack.com/products/stick-c?variant=43982750843137>`_
document.addEventListener('DOMContentLoaded', function() {
var links = document.querySelectorAll('a[href]');
links.forEach(function(link) {
if (link.hostname !== window.location.hostname) {
link.target = '_blank';
}
});
}); But this means that all links will open in a new tab. |
Testing this solution: extensions = [
"sphinx_new_tab_link",
] But it wants this: pip install sphinx-new-tab-link More here: Guide of sphinx-new-tab-link Learned about it from here: Stack Overflow: Add open-in-new-tab links in Sphinx/reStructuredText |
This worked out of the box. Navbar links behave the same. |
It doesn't feel that nice to have new tabs continually open... |
Having severe caching issues, suspect hidden symlinks to be the culprit: In other news... #html_static_path = ['_static'] |
Can't we add a post parser to add the target blank and use a convention ton
achieve the n parser to detect it? Seems like we could wrap the actual
parser. But also not opposed tom potentially switch to nikola or gohugo for
website generation.
Ulrich
…On Thu, May 23, 2024, 12:59 mbz ***@***.***> wrote:
Looking into this too:
image.png (view on web)
<https://github.com/iotempire/iotempower/assets/30321314/dc3e5020-0800-4879-8096-ad6f7c9b3c84>
—
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARV4TDCVHCCCBBLOOJFHDZDW4XVAVCNFSM6AAAAABGQHUFEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRWG4YDQMBVGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
or we can try another site generator - VuePress maybe? (Vue) or Docusaurus? (react; by Meta) kinda like both but maybe docusaurus easier to work with? |
estimate [ulno]: 4h <- if doing more than fixing the links
The text was updated successfully, but these errors were encountered: