this post was submitted on 20 Jun 2023
26 points (100.0% liked)

Technology

37551 readers
538 users here now

A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.

Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

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/[email protected], but someone from a.org ends up on a.com/c/[email protected]?

top 17 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 1 year ago (1 children)

This seems to be a good topic to plug my GitHub issue that would make [email protected] correct clickable links with no extra effort on the users part. I even broke down how to implement that change in the codebase!

https://github.com/LemmyNet/lemmy-ui/issues/1297

[–] [email protected] 1 points 1 year ago

A "link community" button in the formatting bar below the comment box would be ideal.

[–] [email protected] 7 points 1 year ago* (last edited 1 year ago) (3 children)

The best way is to use relative links, such as [email protected]

What I did there was simply [[email protected]](/c/[email protected]). 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.

[–] [email protected] 3 points 1 year ago (1 children)

In my phone, for some reason, Jerboa crashes when I tap your link.

[–] [email protected] 2 points 1 year ago

That's a known bug in Jerboa. It's already been reported and the dev acknowledged it.

[–] [email protected] 2 points 1 year ago

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.

https://addons.mozilla.org/en-US/firefox/addon/kbin-link/

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

So if I copy the pink text it should work if I understand correctly?

[email protected]

It does, thank you!

[–] [email protected] 6 points 1 year ago (2 children)

With Lemmy it's [email protected]
From kbin it's the same but with an @ instead of !.
IDK how others have search set up. There may not be a way

[–] [email protected] 3 points 1 year ago

I'm not sure that's correct. When I click your first link, it's going to https://kbin.social/m/[[email protected]](/c/[email protected]). What OP wants is a way to post the link and (in my case) go to https://melly.0x-ia.moe/c/[email protected]

[–] [email protected] 0 points 1 year ago (1 children)

Did you mean to link that specifically to kbin?

[–] [email protected] 1 points 1 year ago (1 children)

No. Just an example, but I used this sub after editing my comment

[–] [email protected] 2 points 1 year ago (1 children)

Well from what it looks like, on my instance, is that your [[email protected]](/c/[email protected]) is linking to https://kbin.social/m/[[email protected]](/c/[email protected]).

I think what OP is after, is a way to make it link to the reader's own instanced version of [email protected]

I was under the impression that the exclamation mark was designed to do exactly that: take everything after the ! and interpret the [email protected] into whatever the user's instance uses for links (m for kbin, c for lemmy).

[–] [email protected] 1 points 1 year ago (1 children)

Some day there will be a standard link style... for now it seems like a huge mess :'D The ! doesn't work on kbin (for me, at least), nor do links with c/ where we use m/, but the @-link does, which is neat considering I'd not found any short link style that did until seeing that one :'D Seems like others think the !-link is the thing to do, some give absolute links, some try other things besides. Growing pains, teething issues... might as well say "wheee" while the ride's still bumpy ^.^

[–] [email protected] 1 points 1 year ago

I did some investigation into this in https://codeberg.org/Kbin/kbin-core/issues/199, but stopped short of actually fixing it or spinning up an instance to investigate further, as just didn't really have the time and energy (and haven't yet).

Fixing the ! links probably isn't too hard, but I'm not one to try anything without being able to run it. And really there should be an alias for /c/. I haven't used Symfony so can't tell if it's as easy as I hoped. I've had countless times where I thought something would be easy but it turned out hard and vice versa...

[–] [email protected] 2 points 1 year ago

Took this from the sidebar at newcommunities

[link text](/c/[email protected])

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

[–] [email protected] 1 points 1 year ago (1 children)

Relative links seem to be the best way to accomplish what you’re looking to do. So, in your example, it’s /c/[email protected].

Doing it live

Reference: https://lemmy.dbzer0.com/post/6063

[–] [email protected] 1 points 1 year ago

That seems to be the only option that works.