Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Community name in post URL #875

Open
joppuyo opened this issue Jul 1, 2020 · 21 comments
Open

Community name in post URL #875

joppuyo opened this issue Jul 1, 2020 · 21 comments
Labels
area: http enhancement New feature or request

Comments

@joppuyo
Copy link

joppuyo commented Jul 1, 2020

Right now if you have a post in the Announcements community, the URL will be https://dev.lemmy.ml/post/29441 and in the Linux community, it will be https://dev.lemmy.ml/post/36351 .

Would it make sense to include the community name in the URL, for example, https://dev.lemmy.ml/announcements/post/29441 and https://dev.lemmy.ml/linux/post/29441 so when you see a Lemmy URL you see right away which community it belongs to?

Maybe you could even have the /c/ at the beginning of the post path to further emphasize that the URLs are hierarchical?

@dessalines
Copy link
Member

dessalines commented Jul 1, 2020

It might makes sense for the semantic web, but IMO it really doesn't add that much value... look at how silly this type of thinking has gotten w/ reddit: https://www.reddit.com/r/aww/comments/glenz4/cute_baby_bunnies_think_the_golden_retriever_is/

Its gotten to reddit/community/comments/post_id/weird_lengthened_post_name, when it should be just reddit/post/postid

@joppuyo
Copy link
Author

joppuyo commented Jul 1, 2020

On the contrary, I find the Reddit link to be highly readable, even without clicking it, I can see that it's a link to a subreddit called Awww and it's probably a picture of a cute dog. Something like https://reddit.com/post/3ocelxb1w84zvseyz1elglzzq wouldn't tell me anything about the content of the post or where it has been posted.

In my opinion, having the community name in the URL comes down to whether you think of Lemmy as a "one thing" where all the content of one instance is located under it or whether you think each community is "its own thing" so posts should be scoped under it.

But yeah, I think this is just my own musings. I think the current URLs are fine but they could be even more descriptive.

@MasterOfTheTiger
Copy link

I believe the communities are considered to be "one thing", since they are groups that can span multiple instances.

@Nutomic
Copy link
Member

Nutomic commented Jul 1, 2020

If we make this change, we should do it before releasing federation. After that it will get much harder to change the URLs.

@joppuyo joppuyo changed the title Community name in the URL Community name in post URL Jul 2, 2020
@ceeim
Copy link
Contributor

ceeim commented Jul 5, 2020

I think it's necessary to keep the URLs simple and not change the links to the pages even after the content is changed, which is good for SEO. And if it's an international community, people don't care if the URL contains an introduction, because maybe they use a translation.

@joppuyo
Copy link
Author

joppuyo commented Jul 13, 2020

@ceecx I don't think a post URL slug is a necessity, I think community name would be more important. Is it possible that a community is renamed thus invalidating all the URLs pointing to posts in that community?

On second thought I think the IDs are sequential per instance and not community so in theory, if communities are rename-able, the post URL could be routed http://${instance}/c/${community}/${post_id} where the community could be any string.

Like in Stack Overflow where https://stackoverflow.com/questions/62882265/date-parsing-without-considering-timezone-javascript and https://stackoverflow.com/questions/62882265/you-can-have-anything-here-but-it-still-works lead to the same post.

@dessalines
Copy link
Member

dessalines commented Jul 14, 2020

In this case we might be able to do some url redirects, which just completely ignore the community name anyway.
IE instance/c/anything/post/1 and instance/post/1 go to the same place.

But that way all the federated urls can still be the same.

@Nutomic Nutomic added the enhancement New feature or request label Nov 20, 2020
@loid345
Copy link

loid345 commented Aug 25, 2021

SEO Links very useful for promotion

@mpeter50
Copy link

mpeter50 commented Jun 9, 2023

This suggestion would be very useful. I usually consider myself a power user, but coming from reddit, links to posts and comments are very confusing without the community name and the post title. Where will I end up? What is that link about?

Technically they could be optional (both the community name and the post title, but verified when given that they are correct) similarly to how reddit does it too, but the clients should be encouraged to primarily give this extended URL to the user when copying and such.

And as said above, this could just be a redirect, or even better an alternative URL ("in-backend redirect") so that the readable URL is kept visible on the address bar of the browser.

@ZeusOfTheCrows
Copy link

just want to add that kbin does this, e.g.:

https://kbin.social/m/[email protected]/t/247807/Emperors-Palace-by-Richard-Wright

now i'm not saying lemmy should emulate kbin in most ways, but i think this leads to much more readable urls

@makeasnek
Copy link

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Please do not use bountysource. Many devs have had trouble getting paid there. You can check out this lemmy community as an alternative https://lemmy.ml/c/bugbounties

For statements from devs who have been unable to cash out from bountysource see:
https://github.com/bountysource/core/issues

@mpeter50
Copy link

now i'm not saying lemmy should emulate kbin in most ways, but i think this leads to much more readable urls

Yes, I also think that adopting this wouldn't count as just copying, the real point here is not that others are doing it this way.

The real point is that Reddit and Kbin are doing it because it is significantly more user friendly.
You know upfront what (kind of content) to expect at the other side of the link, and that helps with understanding context when you read comments where people link around other posts.
Also, to me it seems this way its also easier to load the exact same post and comment chain at the provider where you have registered, because you just need to rewrite the domain at the front.

For statements from devs who have been unable to cash out from bountysource see:
https://github.com/bountysource/core/issues

Wow, thats.. interesting. At the same time I'm surprised they are not deleting those issues.

I'm mentioning @dessalines so that they see that their attention is needed.
If you are reading this, only the previous comment by makeasnek is relevant regarding the bountysource issue. The first part of my comment is on the topic of this issue.

@dessalines
Copy link
Member

I don't have time to work on something like this, but feel free to add it.

@mpeter50
Copy link

mpeter50 commented Sep 1, 2023

@dessalines I understand and thats ok, but the reason I mentioned you is a different one. It is about bountysource.

Apparently people are not getting their bounties with it for a long time. I'm not sure if its some or all of them.. but from the issues it seems its a long time problem and bountysource does not react on it. Last commit there was 2 years ago, bountysource looks like as if it was abandoned.
This may affect the whole project, by new contributors getting disappointed that they cant claim the bounties for their work.

The comment of makeasnek contains some references to more info

@dessalines
Copy link
Member

@mpeter50 Okay I've now denied bountysource priveledges on the LemmyNet org. No one used it anyway.

@jcklpe
Copy link

jcklpe commented Nov 3, 2023

Want to express support for this. Also there's some good discussion on the topic here: https://lemmy.ca/comment/4525235

@pixiekat
Copy link

pixiekat commented Nov 3, 2023

Readability issues aside, it's also good for security so people have a general idea of the type of content you can expect if you were to click on a link instead of just slash post slash numbers.

@Die4Ever
Copy link

Die4Ever commented Nov 3, 2023

Readability issues aside, it's also good for security so people have a general idea of the type of content you can expect if you were to click on a link instead of just slash post slash numbers.

Steam recently added the name of the game into the URL instead of just the ID number, probably for the same reason.

@llagerlof
Copy link

Community name and the slug of post's title should be part of the link.

@pmarks-net
Copy link

Note that search results are also missing the community name:
https://sh.itjust.works/search?q=banana&type=All&listingType=All&page=1&sort=New

@paulo-roger
Copy link

I think keeping both formats is the best.

The current url format work like a shortlink. The complete url though is great for all the reasons exposed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: http enhancement New feature or request
Projects
None yet
Development

No branches or pull requests