I hope you’ve had nice holidays!
I’ve updated my Bitlyize service to work with v4 of the Bit.ly API. It parses the input for all URLs and replaces them with shortened links connected to your account. Not only can this make long links more readable, it gives you some analytics on how often the links are used (and deeper analytics like country of origin, referrer, and other data). If you pass it a Bit.ly-shortened link, it will expand it to its original URL.
The downside to shortened links is you can’t tell where they go, which can make them seem a little sketchy. You get to weigh the tradeoffs there. This service makes it easy to expand shortened URLs in place, though.
By the way, shortened links aren’t just obscured for readers and recipients, they’re opaque to future you as well. If you want to use short links for blogging or note taking, I recommend using the !bitly
function of SearchLink, which can give you title attributes. It requires separate configuration, but then instead of just a bit.ly link, you can run !bitly ++t Brett Terpstra project searchlink
and get [SearchLink](https://bit.ly/47lzuXS "SearchLink")
, which is a bit more descriptive. You can also just pass it a long url like [Marked 2.6.18](!bitly https://brettterpstra.com/2023/01/03/marked-2-dot-6-18-with-100-percent-less-jitter/)
and get [Marked 2.6.18](https://bit.ly/3ieHDcH "Marked 2.6.18 with 100% less jitter")
.
These Services require Ruby, which is no longer included with macOS by default. You can get it by installing the Apple Command Line Tools, or see this article for information on installing Ruby with Homebrew/ASDF. You don’t need Rails or anything after the Installing Ruby section in the latter article.
Anyway, download the Service below, double click to install, then set up a configuration file. The file should be located at ~/.config/bitly/config.yaml
and only needs two settings:
```yaml