How to create a linklog in a few easy steps
Linklog. Few days ago I didn’t even know what it is. But then I found an interesting approach on Robb Knight’s page (I will repeat myself here for the n-th time, but I really like his approach to the web and online presence!). Then I found Jeremy Keith’s page and I was like: “I want to have something like this too!”. So I created a Linklog.
So you think that’s it? Just an inspiration and a few lines of code and here we are?
Haha.
No, not with me!
The story isn’t that simple#
- Let’s take a look at my links
- Reeder. More than 100 unread items in the read-it-later list.
- Let’s tag things.
- Oh, I have a wrong tag on my item from 2019. It’s a typo there. Not a big deal, I will rename it.
- You can’t rename the tag in Reeder!
- Moreover, there’s no way of working with multiple items at once.
- Let’s search for an alternative!
- Reader from Readwise
- NetNewsWire
- Feedbin
- ReadKit
- [it’s already been more than a week since (3.)]
- How about we report the bug to Reeder developer?
- Bugs reported, no response so far.
- Hmm, I had this Pocket account for a while. Maybe I should use it?
- For sure there are better alternatives to Pocket.
- I had also this Instapaper account…
- Someone mentioned Raindrop on Reddit (or somewhere else).
- Talked to a friend about it. I don’t think he still doesn’t know what I’m talking about with this
/links
thing. Hello Bartek! - But he says that Pocket is good, because it’s a backend that might power up Reeder.
- Something clicked.
- Let’s build an integration in Zapier that saves saved items from Pocket to Raindrop and let’s build an API on top of Raindrop that will be exposed by my own API and then processed and served as JSON, so it can again be consumed by the blog website you are reading right now.
- … exactly, I didn’t mention creating my own API! (because I had this idea of exposing “myself” in form of consumable API… I know many… One? Consumer. Well, irrelevant for now, let’s go!)
- So this Zapier works but I realized… why the heck can’t I just use Pocket everywhere, they have good integrations with the system, browser, mobile etc. and see point (20.) – it might power up Reeder (which I really like!). So I decided to use Pocket.
- Implementing OAuth, getting token, I’m in!
- Let’s write the API in Go, seems easy, I always wanted to have a real project in Go.
- [3 mins later]. Oh, I need to learn Go first. Let’s use Ruby & Sinatra and finish this task this year.
- Of course, I have to have a Dev Container for development, not that I use just Ruby and 2 gems and I already have them in my system.
- I’m in, I fetched links from Pocket and I have JSON api returning them in a slightly different form.
- Why don’t we add also boosted links from Mastodon as originally planned?
- Mastodon API, here we go.
- New classes added, Copilot is helping me with the code, I’m making progress and I have a working API.
- Pocket + Mastodon work together as one endpoint, my job is done with API for now.
- Where do I host this thing. Is Heroku still free? I don’t think so.
- fly.io seems to be a good idea in theory…
- … and in practice, too!
flyctl deploy
and I’m done with API. - Let’s get back to the blog and add the links.
- Hmmm, but how do I comment on the links? I don’t want to have a separate page for each link. Maybe I should have something like DaringFireball’s links?
- Totally, I will do that.
- New page type in Hugo, new shortcode, new template, new CSS, new content, new content type, …
- Ok, system is in place. Do I actually have a link to comment on?
- Yeah, there is one, let’s do it.
- One post later, I have a working proof of concept in place.
- Deploying blog to production.
- Automation kicks in, posts a link on Mastodon.
- BUT THE TEMPLATE DOESN’T INDICATE THAT THIS IS AN EXTERNAL LINK IN THE POTS’S TITLE, I need to resolve that before thousands complaints from people are going to reach my inbox.
- Damn, what about the links in RSS feed? How to make a different link in the feed, not linking to my page, but to the one that I want to share?
- Let’s leave that for now, when people get to the blog, they will see the link to the external page. Problem solved.
- But how to indicate the external page?
- Should I use ↗️ or 🔗 or 🌐 or 🌍 or 🌎 or 🌏?
- I don’t know, let’s use ↗️, looks cool in blue.
- Now I can add commentary on the links I find in the Internet, how cool is that?
- Reflections kicks in – why don’t I use Mastodon for that… nah, let’s not waste time for overthinking!
- New
/linklog
page created, new shortcode, new template, … you know the drill. - But this time it’s also about fetching JSON from my API page, you remember? And I haven’t done anything like that before.
- Ok, I’m implementing and playing with Go (that’s what I wanted, right?), code looks like 💩 but it works.
- Unsorted list? Sorted list? Paragraphs? Let’s do paragraphs.
- I think this blog needs CSS changes in the template…
- … no I didn’t go this route, I know it would end up with a lot of changes and I don’t have time for that (hehe).
- It looks good without modification, actually. Let’s just group links by month.
- Group fetched JSON by month…
- Group fetched JSON…
- Documentation, documentation, random blogposts, Discourse…
- GOT IT!
- I love the end result. I’m happy with it.
- Commit!
- Deploy?
- NO! Write a post about it first!
- I created a linklog. But the story isn’t that simple…
Howgh!
Latest commit: 2962d8d on 2023-08-15 at 01:01. Page history