• fubo@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Yes, you can do this using a relative URL!

    Here’s an example.

    Here’s how I wrote it:

    [Here's an example.](/c/asklemmy@lemmy.ml)

    Because this URL doesn’t have a protocol or a domain, your browser fills those in from the URL of the page you’re on when you see it. Since that’s on your local Lemmy instance, you’ll see a link to !asklemmy@lemmy.ml on that instance.

    Also: When you’re looking at a Lemmy comment, if you don’t know how the author wrote the markup for it, you can use the “view source” button underneath the “…” menu.


    Note: These links will NOT work between Lemmy and Kbin, because Kbin uses /m/ instead of /c/.

      • fubo@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Trickery using URL features, like this, will work from clients that act like a web browser. Other clients may have problems with it. There should probably be a standard syntax for “a link to community X hosted on instance Y” that all clients can learn to support.

    • SanguinePar@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Just FYI, this link…

      …causes the Jerboa app to crash. I think it’s a known issue and hopefully one that gets sorted, but just wanted to warn others.

      • fubo@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Wow, good thing to point out.

        Relative URLs should work straightforwardly for a UI that runs in a browser, but yeah, I can imagine a custom app doesn’t know what domain or even protocol to associate with them.