this post was submitted on 09 Nov 2024
29 points (96.8% liked)

Fedigrow

694 readers
216 users here now

To discuss how to grow and manage communities / magazines on Lemmy, Mbin, Piefed and Sublinks

founded 8 months ago
MODERATORS
 

SOLUTION: literally write out [exclamation mark]community@instance. Do not use the autocomplete function. This works in both the sidebar and comments.

Using the URL markdown method (to have the display text be different from the dynamic link) impacts other UIs.

If you enter this:

You get this:

The links in the screenshot above will work in a graceful manner irrespective of what instance (or even what UI/platform?) you use.


Original Text

What are the best practises for adding links to other communities in your sidebar?

I mod the LW hardware community and all the links are tied to LW.

So https://programming.dev/c/linuxhardware

is linked via https://lemmy.world/c/[email protected]

But that would mean anyone not on LW would get a logged out view of LW accessing the programming.dev/linuxhardware community. I don't have a programming.dev account so I added an LW-specific URL.

Is there some sort of markdown code that would "auto redirect" the user to a view based on their instance without any use of explicit URLs. For a second I thought that's what the exclamation mark does, but turns out it's just a shortcut for adding community URLs.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 month ago (3 children)

You can create a link to any community by linking in this format: /c/[email protected] i.e. [fedigrow](/c/[email protected]) becomes fedigrow and is instance-agnostic.

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

This was a stopgap solution before just writing the community name in the [[email protected]](/c/[email protected]) was possible. It was better than absolute links, but not functional everywhere (such as apps).

The best way to link communities is now to just write their name as-is, using no markdown link at all.

For example, this should work for everyone, no matter their instance or client: [email protected]

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

That might not work on all UIs or platforms. Does it work on Mbin? Just use the exclamation mark format, then everything can support it because it's explicit

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

Yeah, it doesn't seem to work correctly on all platform.

I would prefer a clean method where the display text is different from the generic (non-instance) specific link.

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

Fair point, probably won't work for mbin because they /m/ instead.

Works fine for photon/tesseract/all lemmy UIs though.

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

Cheers! The c and dashes don't actually seem to be necessary though though.

Wait a second, it is actually critical. I thought it worked c and dashes, but turns out it doesn't?

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

Yeah it's creating a link - you can use the ! method too but meh I prefer my links to look clean.