You might be asking why I decided to do something that is completely free already and was recycled over and over again. Well the reason is I stumbled upon peculiar problem.
Basically I wanted to host my link list myself, and existing solutions were not satisfactory enough for me. Either because of how routing behaved, or were too bloated (really? laravel for simple page with links? I'm looking at you linkstack).
Basically I needed on that will fit my docker stack and is easy to configure with traefik.
And I decided to make one in Astro. Easy, light, no backend, just frontend, quick configuration with yaml. That was my goal.
Issue #1
I didn't want to spend too much time on styling. Sooo... tailwing - check, daisyui, check, ChatGPT plis spit out template in astro... I said astro, not React... I said tailwind, not bootstrap... FFFFFFFFFF... Fine, I'll do it myself too.
Two hours later and three different skins to choose from, now we can put some data.
Issue #2
Ok, after some googling seems like we can import yaml as is to our script directly using rollup-yaml plugin. That would be actually nice, but the problem is, yaml is packed together with application, which it does not give us much control over it's contents.
Finally I ended up loading it with fetch and js-yaml
from "public".
Issue #3
At this point I could already package my application, but one more thing I have to consider was base image for my container. I can go either with nginx, but then my yaml file have to be loaded and parsed on the client.
However, if I go Astro SSR route and run it with node, the file can be loaded by server in the background, and no requests for config file is made on client side. Downside however is that I have to install all server dependencies on server side during image creation.
I went with node:alpine
. Less processing on client side = better user experience.
Now I can hook up my list of links (don't confuse with linked list), and attach a volume to a file with my configuration without any UI, backend, server, database or any other dependency whatsoever.
All of that took me maybe 4-5 hrs so I decided to simply open-source it.
Feel free to check it out, use it, fork it, or whatever. Contributions welcome.
Top comments (0)