You are probably looking for something on the previous version of this website 2024.jagasantagostino.com
Hello, Internet traveler!
There's some extreme-makeover going on here. I wanted to update this website for a long time, started a few times, changed
my mind on how to do it along the way a few more times and never really finished.
This time instead of doing a big-bang release and procrastinate the hell out of it, I decided to start from scratch
Like... really raw... ...unstyled kind of scratch and add new things piece by piece.
If you want to follow along, here's a log of what I've done so far:
Handled markdown rendering for notes saved in DB
decided to use a custom marked-based setup instead of leveraging Astro's content collection cause I wanted to have full controll for dynamic content without having to requild or doing weird things for simple content changes.
I learned that marked has built-in support for automatically rendering links GFM this allows links pasted as text to be rendered as html links, I've added a custom renderer to handle youtube links automatically and render them as an embedded video.
Is a soup of string contatenation but I'm surprised by how easy some thing were to implement
Added notes, not visible yet but is an important step.
Decided to separate tech and non-tech notes, on the backed I'm just using a category field to differentiate and keep the editing interface simple but when showing them I plan to use different UI for each category so makes sense to separate them and have a different URL for each, I also don't want to show tech notes to people who don't care about them.
While I'm enjoying the simplicity of a basic text area is a bit cumbersome to add links etc, not sure if I'll take the WYSIWYG route with something like Tiptap or Markdown.
Some housekeeping, simplified how I will publish personal notes and tech posts, the old approach was a bit overcomplicated, loving to use mode plain browser API even for the backoffice, Astro makes it really nice to do, I'm likely to put some HTMX in here at some point.
Creating a files management system based on Cloudflare R2, is definitely more complicated than using a SaaS but YOLO!!! I'm having fun doing it, learning interesting stuff and the flexibility is worth it.
Filling the gap my way.
It's pretty weird how this work log journal came to be, but I like it a lot, already feel like blogging the way I
want to share things.
For some reasons this reminded me of "The Gap" one of my favourite videos of all times, that I often share and
rewarch whe I do as It's just 2 minutes long.
The GAP by Ira Glass
While watching it again I realized I've been watchintg it for over a decade now, and I still love it, this time I
took a few minute to see who made it, and wrote a thanks you message, I believe he knows he has done something very
good but the amout of good as a ripple effect is probably order of magnitude highter than he would even image.
Created a backoffice to write notes and save them to a DB, I went with Turso as I like their DX and simplicity.
Why use a DB when you can write markdown files with Astro?
Good question! I like to be able to write notes on the go and limiting myself to only write on a code editor
or on GitHub ends up with me avoiding to write as much as I want to share
I started using better-auth as I'm using it on another project (TanStack
Start) and enjoing it so far.
I got it working but when I started putting pages behing auth I noticed that in Astro the easier (and less error
prone) way to do it is to check the url paths in a middleware.
Well, if I have to do it that way why don't just use basic auth instead?
Unfortunately basic auth sucks bad on iOS Safari and can't proberly save it for a while.
In the end I decided to just throw away the better-auth implementation and go super simple, and have a cookie
based auth what I check in the middleware. Nice and simple.
Eventually yes, but I prefer to expriment in the dark for the moment, especially while I'm writing many drafts that I'm not ready to share but I plan to shre "raw" initial versions of writing to show how they evolved from just a vomited series of words that barely make sense to myself to something that I considered worth publishing.
I'm still esistant about using a single website for tech and non tech things, I liked to have jagascript.com separated but maybe the friction of different projects is what made me now taking care on them or write for a long time?
Regardless in this moment I deciede to take the simplest path and make it work first, that's not a irriversible decision and I can always chage my mind later but better make somethign come complex later (for a good reason) than not make anything at all.