Say I want to link to community x on instance y.org. How do I post this so that someone from instance z.org will end up at z.com/c/x@y.org, but someone from a.org ends up on a.com/c/x@y.org?
This seems to be a good topic to plug my GitHub issue that would make !technology@beehaw.org correct clickable links with no extra effort on the users part. I even broke down how to implement that change in the codebase!
The best way is to use relative links, such as !technology@beehaw.org
What I did there was simply [!technology@beehaw.org](/c/technology@beehaw.org)
. This link doesn’t start with the protocol and site, but instead assumes the current site, and starts with /c/my_comunity@my_site.tld
, meaning it will be routed to the same instance.
This will probably not work for those on Kbin, since their communities (magazines) don’t start with /c/
, but rather with /m/
. If anyone knows a good way for this to work for both, I’d be glad to adopt that myself going forward.
So if I copy the pink text it should work if I understand correctly?
It does, thank you!
For kbin at least, there’s currently a Firefox add-on that adds an icon next to any full or relative links that sends them to the corresponding kbin magazine version of the lemme community.
With Lemmy it’s !Magazine@instance.org
From kbin it’s the same but with an @ instead of !.
IDK how others have search set up. There may not be a way
Well from what it looks like, on my instance, is that your !technology@beehaw.org
is linking to https://kbin.social/m/!technology@beehaw
.
I think what OP is after, is a way to make it link to the reader’s own instanced version of technology@beehaw.org
I was under the impression that the exclamation mark was designed to do exactly that: take everything after the !
and interpret the community@instance.example
into whatever the user’s instance uses for links (m for kbin, c for lemmy).
Relative links seem to be the best way to accomplish what you’re looking to do. So, in your example, it’s /c/x@y.org
.
Reference: https://lemmy.dbzer0.com/post/6063
Took this from the sidebar at newcommunities
[link text](/c/community@instance.com)
This provides a link that should work across instances, but in some cases it won’t
To my knowledge this doesn’t work if a user in your instance hasn’t previously searched for the community