Skip to content

Latest πŸ—žοΈ

Monday, March 23

Git Commits

days commits 5 ohnsh/days
  • 11:03 pm β€” John Sherrell <dev@ohn.sh>

    Post about recent Github Actions assignment in MIT xPRO. Filtering drafts in <LatestPosts> feed.

  • 8:46 pm β€” John Sherrell <dev@ohn.sh>

    Responsive grid layout for <LatestVideos>. The grid needs to be upgraded to thumbnails before it's ready.

  • 6:41 pm β€” John Sherrell <dev@ohn.sh>

    The default feed now uses <Excerpt> instead of <Post>. <Excerpt> now renders a "View full post..." link, and calculation of fallback cutoff point (in the absence of an explicit `excerpt` frontmatter or `<!-- excerpt -->` delimeter) has been tuned a bit. Now, the first two paragraphs are included by default, with an internal option to cut things short if a top-level <div> is encountered (e.g. code blocks).

  • 6:38 pm β€” John Sherrell <dev@ohn.sh>

    Added rudimentary Latest Videos feed to index. Unlike the rest of the site, the videos are selected by date *uploaded* (published) rather than date recorded. The idea is to surface older videos as I add them.

  • 12:24 am β€” John Sherrell <dev@ohn.sh>

    No redundant title on post pages. The test is done from the <Post> component and involves checking `Astro.routePattern`. Astro is lowercasing the value (`/[...postslug]` instead of `/[...postSlug]`), which seems like a bug. Still the best test, I think.

YouTube

Sunday, March 22

Git Commits

days commits 6 ohnsh/days
  • 11:07 pm β€” John Sherrell <dev@ohn.sh>

    De-duplicate effort deriving slugs (2026/03/22) versus keys (2026-03-22).

  • 10:39 pm β€” John Sherrell <dev@ohn.sh>

    Finally giving in and making date slugs fully numeric. It looks especially bad next to the dev server's 4-digit port number, but in practice, it's the most sensible option. Sorting works without conversion to javascript's truly godforsaken date object. Simple string replacement converts between ISO-like dates (2026-03-22) and slugs (2026/03/22). And currently my post slugs are formatted like `2026/03/post-title-slug`. I think I like them that way, but definitely not if the month is an abbreviation.

  • 8:44 pm β€” John Sherrell <dev@ohn.sh>

    Re-organize posts for a reality where their paths directly map to URL slugs. New [...postSlugs].astro for routing those slugs. Simplified sidebar loading in all routes with new `getSidebar()` which imports its own day and tag maps. (Now that the project has grown, a few routes don't need those maps for anything except the sidebar.)

  • 5:32 pm β€” John Sherrell <dev@ohn.sh>

    Added slugify library; wrapping with lib/slugify.ts to define default custom replacements for emoji.

  • 2:49 pm β€” John Sherrell <dev@ohn.sh>

    Minimum viable Excerpt implementation for posts. Not actually rendering <Excerpt> anywhere yet, but it will inevitably become the default when listing days or posts. Inspired by HiDeoo/starlight-blog, which is a bit more sophisticated. <Excerpt> will render the markdown-formatted `excerpt` property from the post frontmatter if available. Otherwise, the rendered post is passed through to <ExcerptWrapper>, which scans the HTML for a special delimeter: `<!-- excerpt -->`. If a match is found, the post is cut off at the delimeter. If not, the default fallback is to cut off the post after the first `</p>`.

  • 2:48 pm β€” John Sherrell <dev@ohn.sh>

    Clean up types a little bit.

Saturday, March 21

Git Commits

xpro-nextjs-dashboard commits 2 ohnsh/xpro-nextjs-dashboard
  • 10:48 pm β€” John Sherrell <dev@ohn.sh>

    Module 25 complete. Mostly worked on rendering /ui/dashboard, /ui/customers, and /ui/invoices within a layout. (For some reason, per the instructions, the layout is copied to each route instead of being shared.)

  • 12:08 am β€” John Sherrell <dev@ohn.sh>

    Starting Next.js dashboard project for MIT xPRO course. Upgraded everything--next, react, tailwind, etc. Only keeping around .mjs versions of config files. Made a few config changes for Tailwind 4 to work, plus replaced `@tailwind` directives in global.css with `@import "tailwindcss"`.

days commits 5 ohnsh/days
  • 8:03 pm β€” John Sherrell <dev@ohn.sh>

    Added rudimentary latest posts feed to index. Currently, it links to the post's day because there's no route for individual posts. I'm not sure if it's worth making one.

  • 6:35 pm β€” John Sherrell <dev@ohn.sh>

    Extracting tags from YouTube descriptions now. Still not using them. (If I add YouTube tags to the main tag map, things get messy. Need to create emoji-slug mappings and think through what I'm actually trying to accomplish.)

  • 6:08 pm β€” John Sherrell <dev@ohn.sh>

    March 21 metadata.

  • 6:05 pm β€” John Sherrell <dev@ohn.sh>

    Working on metadata overlay to merge into collections (especially youtube). Probably pausing for now, but probably also should at least parse descriptions for tags inside the youtube loader.

  • 10:37 am β€” John Sherrell <dev@ohn.sh>

    Fix off-by-one bug after refactoring lib/dates.ts. Need to always be explicit about whether a date is a timestamp (okay to implicitly convert to local time) or a "plain date" (which is important to represent the way it's typed out). To help with this, I made a new wrapper, `slugFromDay`, which is only for plain date strings like '2026-03-21'.

Friday, March 20

Firebase Quotas and Cloudflare Workers

I’m currently enrolled in the MIT xPRO Professional Certificate in Coding program. In a recent assignment, we β€œdelved” (as the course materials would put it) into GitHub Actions by setting up an automated testing and deployment workflow for a simple Express.js app. See the README on GitHub for my full report.

The deployment component was supposed to happen on Firebase, but I had already reached my project quota due to an earlier batch of assignments. After digging, I found information suggesting that my quota would reset 30 days after deleting the old projects, but the actual error message just said to contact support to request an increase. I received a prompt response (but to my Gmail account, of course, so I didn’t see it for a few days):

View full post…

Git Commits

days commits 9 ohnsh/days
  • 5:09 pm β€” John Sherrell <dev@ohn.sh>

    Clean up loaders/github.ts

  • 4:55 pm β€” John Sherrell <dev@ohn.sh>

    Reverse-chronological sort for days listed under /tags/[tag].

  • 3:09 pm β€” John Sherrell <dev@ohn.sh>

    Merge branch 'pure-loaders'

  • 3:08 pm β€” John Sherrell <dev@ohn.sh>

    Now sorting commits, but the technique is a little ugly. I'm considering guaranteeing a sort order for various arrays when Day object is initialized.

  • 3:01 pm β€” John Sherrell <dev@ohn.sh>

    Daily commits now rendering again. Refactor seemingly complete. Need to get commits sorted on page.

  • 1:27 pm β€” John Sherrell <dev@ohn.sh>

    3/19 metadata.

  • 1:20 pm β€” John Sherrell <dev@ohn.sh>

    loaders/github.ts now exports two loaders: repoLoader() and commitLoader(). There will be a collection for each. Getting to the meat of this refactor in the <GithubDay> and <RepoDay> components.

  • 12:43 pm β€” John Sherrell <dev@ohn.sh>

    Improve schemas/typing in youtube loader. No longer manually creating API schema. Presently, types are inferred when importing the intermediate .json file. When fetching directly, I need to use a schema provided by the API to generate a zod schema and/or typescript type.

  • 12:24 pm β€” John Sherrell <dev@ohn.sh>

    YouTube collection rendering again. Simplified loader creates a 'pure' collection of videos keyed by videoid. It also computes the day (using video title and pubDate) and stores it in each entry. Actual sorting of entries into days happens elsewhere, as it should.

xpro-nextjs-dashboard commits 1 ohnsh/xpro-nextjs-dashboard
  • 8:40 pm β€” John Sherrell <dev@ohn.sh>

    Initial commit from Create Next App

Thursday, March 19

tags:

Git Commits

days commits 3 ohnsh/days
  • 5:48 pm β€” John Sherrell <dev@ohn.sh>

    Building again. Still lots to do.

  • 1:56 pm β€” John Sherrell <dev@ohn.sh>

    lib/dates.ts finally doesn't make me wince. Thoroughly renamed and refactored. Instead of expecting only plain dates, `dayFromDate()` and `slugFromDate()` work with either full timestamps (which are fine to implicitly convert to local time) or plain dates (which are important to represent the way they were originally typed out). You explicitly specify whether it's a `plainDate` using a second parameter (default false). If so, it's normalized to midnight UTC so that later string extraction knows to always use UTC getters.

  • 4:55 am β€” John Sherrell <dev@ohn.sh>

    New branch for reworking loaders. Everything is broken right now.

ra24-3-cloudflare commits 1 ohnsh/ra24-3-cloudflare
  • 12:28 am β€” John Sherrell <dev@ohn.sh>

    README.md CE.

YouTube