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

Ability to pass a title for the link and/or automatically generate title #941

Closed
12 tasks done
ajtatum opened this issue Dec 29, 2020 · 4 comments · Fixed by #1003
Closed
12 tasks done

Ability to pass a title for the link and/or automatically generate title #941

ajtatum opened this issue Dec 29, 2020 · 4 comments · Fixed by #1003
Labels
Milestone

Comments

@ajtatum
Copy link

ajtatum commented Dec 29, 2020

Services like Bitly and Rebrandly offer the ability to pass in a title for a link, thus making reporting/UI look a bit cleaner. It's far easier to glance over a page/report and see the titles of pages rather than the long URL, but that may be just a personal preference. Either way, I think it would be nice if a title could be passed in.

For further background, for both services mentioned, if the link title isn't passed in the services use the page title. I'm not sure if they grab it from the title tags or the og:title tag. Either way, it's nice that it if it isn't provided it's automatically generated.

Let me know if you need further information or clarification.

Thank you,
AJ


  • Add new nullable title property to short URLs
  • Allow to provide the title while creating/updating short URLs
  • Document title prop in swagger docs
  • Add new config option to enable automatic title resolution when not provided. Should be disabled by default
  • Update installer to support automatic title resolution config option (Add title autogeneration option shlink-installer#101)
  • During short URL creation, allow to dynamically resolve title from long URL if configured so
  • During short URL edition, allow to dynamically resolve title from long URL if configured so, prev title is null or was also dynamically resolved, and no new title has been provided
  • Track if the title was provided or automatically resolved
  • Support searching short URLs list by title
  • Support ordering short URLs list by title
  • Add title field support in shlink-importer (Add support for title field shlink-importer#21)
  • Document the feature (Document new title feature shlink.io#195)
@acelaya
Copy link
Member

acelaya commented Dec 29, 2020

It definitely sounds like something nice to have.

Regarding the title autogeneration, I would probably make it disabled by default, allowing users to opt in through installation config or env vars, as many other features.

Just to avoid adding a new behavior for users updating from older versions.

@acelaya
Copy link
Member

acelaya commented Feb 3, 2021

Hey @ajtatum. I have already started to implement this, and there's one use case that I'm not sure how to resolve.

It's related with the edition of short URLs. Currently Shlink allows to edit the long URL to which a short URL points, together with a few other properties.

My question is, what should happen with the title when the long URL is changed?

  • Keep the title as it is, allowing to provide or resolve the title only during short URL creation.
  • Try to resolve the title from the new long URL, only if there was no title previously and no new title has been provided.
  • Try to resolve the title from the new long URL, only if there was no title, there was title but it was also resolved from previous long URL, and always if no new title was provided.

I tend to think the third one should be the proper one, so in case you originally provided a custom title during creation, it will be preserved, but updated in any other case.

What do you think?

@mdrxy
Copy link

mdrxy commented Aug 5, 2024

Are there plans to add a --title option for short-url:create? I see some work being done relating to that method in 5bccdde.

@acelaya
Copy link
Member

acelaya commented Aug 5, 2024

Are there plans to add a --title option for short-url:create? I see some work being done relating to that method in 5bccdde.

Yes, I noticed that option was missing while working on #2164, and took the opportunity to add it.

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

Successfully merging a pull request may close this issue.

3 participants