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

Short Links for Article URLs #3078

Closed
omenking opened this issue Jun 8, 2019 · 3 comments
Closed

Short Links for Article URLs #3078

omenking opened this issue Jun 8, 2019 · 3 comments

Comments

@omenking
Copy link
Contributor

omenking commented Jun 8, 2019

Is your feature request related to a problem? Please describe.
Short Links.

Describe the solution you'd like
Have an alternative link which is shorter than the full article link for sharing on platforms where characters are counted against you.

Describe alternatives you've considered
I can use short link tools but would feel there is more trust with the dev.to url

Additional context

@jessleenyc
Copy link
Contributor

Situations where character counts work against you are less common these days, but this could still be interesting. We'd have to watch out for username conflicts and check if a short link exists if the user doesn't. Alternatively we could delegate to a different domain or subdomain. We're gonna keep thinking about this.

@omenking
Copy link
Contributor Author

For my use case, the issue was more to do with the physical length of the URL than character restrictions.

Instead of subdomaining, you can do something as such:

dev.to/s/X8yF3

The minimum length for a username in the codebase is 2 characters so this suggested method would not conflict. I agree most platforms restrictions are lifted.

So are the routes for username:

  get "/:username/:slug/comments/new/:parent_id_code" => "comments#new"
  get "/:username/:slug/comments/new" => "comments#new"
  get "/:username/:slug/comments" => "comments#index"
  get "/:username/:slug/comments/:id_code" => "comments#index"
  get "/:username/:slug/comments/:id_code/edit" => "comments#edit"
  get "/:username/:slug/comments/:id_code/delete_confirm" => "comments#delete_confirm"

  # Proper link format
  get "/:username/comment/:id_code" => "comments#index"
  get "/:username/comment/:id_code/edit" => "comments#edit"
  get "/:username/comment/:id_code/delete_confirm" => "comments#delete_confirm"
  get "/:username/comment/:id_code/mod" => "moderations#comment"
  get "/:username/comment/:id_code/settings", to: "comments#settings"

  get "/:username/:slug/:view" => "stories#show",
      constraints: { view: /moderate/ }
  get "/:username/:slug/mod" => "moderations#article"
  get "/:username/:slug/edit" => "articles#edit"
  get "/:username/:slug/delete_confirm" => "articles#delete_confirm"
  get "/:username/:view" => "stories#index",
      constraints: { view: /comments|moderate|admin/ }
  get "/:username/:slug" => "stories#show"
  get "/:username" => "stories#index"

@cmgorton cmgorton added this to Backlog in Feature backlog via automation Nov 30, 2020
@cmgorton cmgorton added this to To do in OSS Rotation: Triage stale issues/pr via automation Nov 30, 2020
@cmgorton
Copy link
Contributor

Hey all! Moving forward, we would love for people to head over to forem.dev for many of these feature requests that we need more discussion around.

Since this one has been around for a while without much traction I am going to close it and encourage anyone who would like to see this feature in the future to open a discussion in forem.dev. There we can get more eyes on potential features and highlight any we really would love the community to contribute too. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

3 participants