💾 Archived View for gmi.bacardi55.io › blog › 2024 › 02 › 13 › bookmarks-section-the-pesos-way captured on 2024-07-09 at 00:05:47. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-03-21)

-=-=-=-=-=-=-

Bookmarks section, the PESOS way (kind of)

Posted on 2024-02-13

Introduction

Following my recent [blog adventures], I added a [Bookmarks] section on this site. I've [recently written] that I use [linkding] to save my bookmarks. While it is perfect for storing / accessing / searching bookmarks, it is not perfect to share them. Following the [indieweb] principle, I decided to have a dedicated page to list them. I **think** it qualifies more as [PESOS] (Publish Elsewhere, Syndicate (to your) Own Site) than [POSSE] (Publish (on your) Own Site, Syndicate Elsewhere) because it comes from a 3rd party (even though I selfhost it on my homelab), or it may be in between :D. Not that it matters to be honest, but just funny to think about…

You may want to check the [About page] for all the different RSS feeds if you don't want to receive updates of every post type (blog, gemlog, bookmarks)…

blog adventures

Bookmarks

recently written

linkding

indieweb

PESOS

POSSE

About page

What was wrong with the previous setup?

Main limitations were:

Links bot

How does it work now?

Linkding is still my source of truth for all bookmarks. Some of them are shared, some are not. Instead of creating an RSS feed based on the [public shared page] with [RSS Bridge], I'm using Linkding API via the [AIO Linkding] python library. With it, I can get all bookmarks, ignore the archived and not shared ones, and for each create a simple `<id>.md' file for hugo (but would work with any static site generator).

I created a dedicated content type on hugo called `bookmarks', so all I need is to copy the generated `md' files to `/path/to/hugo/content/bookmarks/' and hugo will generate the [listing page] and the [RSS feed].

The `md' file generated by the python script are very simple and looks like this:

+++
title = "Mirroring Sourcehut to GitHub"
author = ["Bacardi55"]
id = 162
date = 2024-02-09
tags = ["development", "git", "github", "sourcehut"]
bookmark_url = "https://ersei.net/en/blog/srht-time"
description = "Mirroring Sourcehut to GitHub"
+++

---

Personal notes:

Using sourcehut builds and ssh-key for push access

To display bookmarks, I have a slightly different template than for blog posts that you can [see on sourcehut]. The python script is not yet shared publicly as it is in a rough state (with the Linkding API token hardcoded). I need to make it better before sharing it, but if you can't wait, reach out and I can share the current sanitized version.

public shared page

RSS Bridge

AIO Linkding

listing page

RSS feed

see on sourcehut

What about automation

The "work" there is still to be done. Right now, I've just updated my deployment script to run the python script mentioned above at the start. Before starting the script, the `/path/to/hugo/content/bookmarks/' is emptied so that removed bookmarks on Linkding will not stay on this site. Markdown filenames are based on Linkding ID, so it shouldn't duplicate stuff in RSS readers are filename / URL and content should stay the same (unless explicitly modified in Linkding directly).

So not great, because it means either a manual deployment just to update the bookmarks page, or updating it when I deploy a new blog post. No ideal at all.

The main reason I haven't tried to automate it more is because I'm planing on updating my blog / gemlog deployment scripts/processes, so I'm going to wait on that to do it once correctly and not have to redo it later anyway :).

Bonus

As this is now a clean RSS feed on my main site, I've changed my [links BOT] to now use [this RSS feed] instead of the one created on the fly by RSS Bridge. RSS Bridge container has been switched off for now, as I didn't have any other use cases for it.

links BOT

this RSS feed

/gemlog/

Send me a gemini mention

send me an email!