Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users

Dashboard
Notifications
Mark all as read
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Improving the "copy link" button

+0
−2

I'd like to have the "copy link" button below questions improved so that it gives something more useful. Currently when clicking on it, you just get a raw URL like:

https://unicorns.codidact.com/posts/123456

That's not really meaningful, I could as well just copy the URL from my browser. So I'm not really sure what the button was meant for, easier copy/paste when browsing from a phone or something?

Instead of the above I'd like to get a formatted link with the question title in the following form:

[What kind of kibble should I get for my unicorn?](https://unicorns.codidact.com/posts/123456)

Which I can then paste and get this: What kind of kibble should I get for my unicorn?
Rather than this: https://unicorns.codidact.com/posts/123456

Because currently if I want to share a Codidact link either here or Someplace Else, I have to do the following cumbersome ritual, which is annoying:

  • Copy the URL.
  • Paste it inside parenthesis: (https://unicorns.codidact.com/posts/123456)
  • Manually add brackets: [](https://unicorns.codidact.com/posts/123456).
  • Manually copy paste the question title: [What kind of kibble should I get for my unicorn? ](https://unicorns.codidact.com/posts/123456)
  • Find out that the link I just wrote is a mess because all Codidact titles end with a space.
  • Manually remove the space: [What kind of kibble should I get for my unicorn?](https://unicorns.codidact.com/posts/123456)
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comments

1 answer

+3
−0

"Copy Link" is on top-level posts for consistency with answers. On an answer the URL takes you straight to that answer, which isn't what would be in your URL bar. (I think the work on the threaded-comments branch will add comment links, too -- same idea.)

Your proposal works smoothly if where you want to share the link expects Markdown, but would mean that somebody who wants to share it on a platform that expects a raw link (Twitter, Discord, etc) would have to strip it out again, and somebody who wants to use the link in HTML would have to rewrite the markdown as an HTML href (which expects the text and link in the other order). This is why we went with just a raw link -- it's clear what you're getting and it works everywhere.

In principle we[1] could modify "Copy Link" to give you a modal where you can choose the formatting (raw, markdown, HTML), but I don't think we should bake in any specific formatting.

I don't know why titles end with a space. That sounds like a bug. Thanks for the report.


  1. Or somebody who wants to write a userscript or contribute a PR. ↩︎

Why does this post require moderator attention?
You might want to add some details to your flag.

2 comments

I'd assume that the most common place to share Codidact links would be on Codidact. So it would be nice if the site allowed for a way that's compatible with itself... That ought to be way more important than supporting some format for social media platforms. Now on Someplace Else when you paste a link https://unicorns.someplaceelse.com/posts/123456 it automatically gets replaced with a link based on question title. That's a somewhat new feature they added recently. Lundin‭ 19 days ago

I don't know what's most common; people use Twitter and mailing lists and Facebook and wherever else to attract people who aren't already here, too. Improving how Codidact treats Codidact links is a good idea; if the renderer automatically generated the Markdown you're looking for that would address your use case. Monica Cellio‭ 19 days ago

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!