Skip Navigation

How to link communities in the sidebar in a generic (non-instance specific) manner?

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/linuxhardware@programming.dev

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.

24 comments
  • Yeah, use !linuxhardware@programming.dev

    Don't use the tab-completion/auto-complete on it cause that screws it up

    Unless the sidebar handles it differently than posts/comments do?

    • OK, yeah it does seem to work, at least in comments.

      It even works with the markdown URL syntax (to have the display text be different from the exclamation mark style link/text).

      Let me see if this works in the sidebar.

      EDIT: it does work in the sidebar. The autocomplete really fucks things up though.

      • Ideally, just use the !community@instance syntax.

        In Lemmy-UI, it'll automatically create a relative link to /c/community@instance. Other UIs also do (and some more than that).

        If you make relative links manually, it messes with other UI's like Photon and Tesseract that do additional rewriting to render them locally.

      • The autocomplete is from before the webUI was updated to turn plaintext mentions of communities clickable.

        For some reason, it wasn't removed when that was added.

        But just writing the name is standard, and what basically all clients support now.

  • If help help to post something like this to !newtolemmy@lemmy.ca also?

    Most of the methods that the Lemmy UI provides seem to be incorrect, and some even outright cause problems if used. Worse, apps have their own methods that work vs. do not work, and a method that works in one (like web UI) may not work in another (like some, yet perhaps not all, of the apps).

    Also, the documentation seems slim to nonexistent for most matters. See e.g. lemmy.ml's (which calls itself, hehe, "A community of privacy and FOSS enthusiasts, run by Lemmy’s developers" - which must be how they see themselves, though most of us in the Western world have an ENTIRELY different perspective when we look at content hosted on that instance, and when those users come outside and troll others based on their hostile attitude towards Western thought) has a link titled "What is Lemmy.ml", but points to precisely that location - a nonexistent post (presumably deleted at some past time-point?). Lemmy.World at least has the "Getting Started Guide", but I don't see concepts like how to do cross-posting there, and the description about how to do links ignores all the other ways to do links that are embedded directly into the Lemmy web UI (whereas the exclamation mark method - well, ONE of the TWO exclamation mark methods - does NOT show up, at least right away, until after you choose Preview or submit the content), plus ignores other things that make it almost misinformation - e.g. while the "link" itself may figure out what to point to (does it though?), if you click said link from an instance where nobody has actually joined that community yet, you will never see any posts or comments from it no matter how long you wait (so the language to be patient "and search a second time after a few seconds" seems incorrect to me - unless I am missing something major? again, you have to join the community first for that to happen, I thought).

    i.e., Lemmy is still in an early beta stage of its development. Though kudos for helping people with what you know, that's awesome!:-)

    • Oh, I very much agree with you. Haha, this is not a purely western perspective.

      Initially joined via lemmy.ml. I was a little bit surprised that you had to copy/paste something from a text by Marx to join (I actually think Marx was a good guy and in many ways was way ahead of his time, even to this day, but this doesn't seem like a good thing for users that are ... how should I say it ... less well read). And then I found out that lemmy.ml is rife with western marxist-leninist larpers and they support russia and the CCP. That's one of the reasons I decided to start hardware@lemmy.world. I avoid lemmy.ml communities when possible. I would block lemmy.ml if not for that fact that many legitimate communities are on there.

      I guess I could post a summary of my findings on !newtolemmy@lemmy.ca. Is that what you were implying?

      • Oh for sure - I mainly said "Western" b/c of how that highlights their hypocritial nature: they constantly like to make fun of people in Western nations, yet somehow they are absolutely surprised to find out that those same Western nations do not enjoy being on the receiving end of that? They are somewhat like incels in that manner, and also like the MAGA movement in the USA: the latter pretend to be "conservatives", yet actually are far-right extremists that do the polar opposite of "conserve" anything at all, and similarly lemmy.ml claims to be "leftists", yet support the totalitarian, capitalistic, democratic (meh, ostensibly) regime of Russia. And China too. Another example: "genocide is bad when THEY do it, but when MY side does it... oops, I mean my side NEVER does it, wait don't ban me!!! too late".

        I used to argue against banning people from ML, citing how many people on it are innocent, and surely there are trolls on any sufficiently-large instance, e.g. there are more than a nonzero number on Lemmy.World as well. However... I have since changed my position: now I see it for the echo chamber that it is, extremely similar (though not identical ofc) to hexbear.net, where they get away with the oddness of their cognitive dissonence inside that instance, and then when they comment in other communities bring that same level of energy. I have never seen such batshit insane replies as those from lemmygrad.ml, hexbear.net, and to a greatly reduced degree but still horrible enough for me to ban the entire instance, lemmy.ml. I would rather do without entirely than receive that content.

        Though your needs may differ from mine ofc so I offer no judgement - e.g. !firefox@lemmy.ml legit looks naively to me as if it is not fully replacable by any community outside of that instance.

        And yes that's exactly it: that community aims to help people new to lemmy, particularly to navigate the web UI. And especially there is a post Guide | How should I link to a community? that I really enjoyed seeing, but apparently its information is now quite outdated. I am not sure if that information is WRONG mind you, though it might be, and in any case it seems to have fallen behind the set of "best practices", as you said? OMG I just noticed that it even explicitly says:

        NOTE: There is a bug on the Lemmy website right now. If you start typing a community or username, it will try to autocomplete it. DO NOT click that autocomplete, or it will mess up the link.

        So while your OP was focused on the links in the sidebar, and appropriately posted into !Fedigrow@lemm.ee for that aim, that post from Otter is more general for any link from any user as they share them anywhere. Unless some apps might have exceptions - that is why that community in particular is helpful, as it chiefly focuses on the web UI, though a community such as Fediverse@lemmy.world may also work as well or better, or best of all cross-post to both!?:-P

        I mean, it's a thought that I hope you will consider!:-)

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

    • This was a stopgap solution before just writing the community name in the !community@instan.ce 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: !gameart@sopuli.xyz

    • 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

      • 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.

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

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

    • 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?

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

24 comments