Aman Bhargava Bangalore India Data Visualization Designer & Developer aman@diagramchasing.fun

#dev notes

4 posts tagged with "dev notes"

← Back to all notes

#dev notes Tagged Posts

Oct 18, 2025 Note

My Netlify builds were failing for the past few days and I couldn’t figure out why because everything looked right to me! It built locally too! This was the error:

11:16:48 PM: [imagetools] Could not load /opt/build/repo/src/content/blog/images/2025-snippets-from-the-new-york-walk-book/img-20251012220719179.png?enhanced (imported by src/content/blog/2025-snippets-from-the-new-york-walk-book.md): Input file is missing: /opt/build/repo/src/content/blog/images/2025-snippets-from-the-new-york-walk-book/img-20251012220719179.png

But that image is there, I swear it is! If it wasn’t there, why is my Mac just letting it work? I looked through my filesystem and saw that it was saved as IMG-..., not img-....

Apparently, the MacOS filesystem is case insensitive.. That would have been nice to know a week ago but ok.

Permalink Aman Bhargava
0
Aug 21, 2025 Note

Rebuilding the site gives me a chance to get things done better. I wanted to add a small sparklines section for the various micronotes I’ll be adding, like the one Aaron Parecki has on his site, and my initial attempt was the tried and tested way I was using for everything else: go through the files and folder structure at build time, count files and parse dates and create a json data structure with the summary (how many bookmarks, notes, etc.). This is fine for a couple of hundred files but the build and processing time will probably grow linearly with it too. I want to keep this lean.

Since I’m already using a server which is hosting getindiekit.org, I thought of making it work within that set-up. IndieKit uses MongoDB for some state-management (files and actual content are stored in my repo), and it provides a very nice way to add more endpoints/routes for whatever you want: https://getindiekit.com/api/add-endpoint

I got Claude to write a small script that would access the DB, create the summary data and return it on a stats endpoint. Problem solved.

Permalink Aman Bhargava
5
Aug 20, 2025 Note

Essentials in starting any project these days:

  • Create project with the npx sv create command. Select netlify/static adapter depending on if I need server functions, select Tailwind, MDSVEX, eslint and prettier.
  • Install shadcn-svelte. It is a much better way of organizing UI components, I will never be touching another UI library like flowbite or daisyui again.
  • Edit app.css with project specific CSS variables that will be picked up by shadcn as well. Theming inspiration from places like tweakcn.com help; being able to centrally change the feel of a site is great.
  • For code assistance, Claude Code is good. I am on the $20 Pro plan.
Permalink Aman Bhargava
0
Aug 20, 2025 Note

Started today on refactoring the personal site. There is too much bloat in terms of packages, my stupidities and versions of crucial things are lagging behind. svelte changed from 4 to 5, Tailwind lost its config.js file, components are all over the place and the list goes on. I might regret saying this but I don’t think it will take as long, since it is a matter of copying and cleaning up existing code. I have some new things as well. I have set up micropub and other new areas of ‘quantified self’, as well as teaching material that needs to be discoverable, and older things like a dedicated tidytuesday section (although the UI is nice) that don’t need as much prominence.

Permalink Aman Bhargava
10