Skip to content

Latest 🗞️

Thursday, March 26

Git Commits

days commits 5 ohnsh/days
  • 5:24 pm — John Sherrell <dev@ohn.sh>

    New sort order for video tabs prioritizing talking vids, then running vids.

  • 4:01 pm — John Sherrell <dev@ohn.sh>

    Now prioritize talking videos for og:image thumbnail. (Running videos come next, then everything else.)

  • 12:56 pm — John Sherrell <dev@ohn.sh>

    YouTube loader: rudimentary incremental fetching implemented. If a playlist already has items saved in local JSON, only fetch 10 items at a time until an already-saved item is reached, then stop. Implementation uses an async generator to page through the API. I'm uncertain about what exactly happens to the playlist when I *update* metadata on an already-published video, but I'm quite certain that this incremental fetch implementation won't handle it gracefully. When a fresh sync is needed, simply delete the .days/youtube directory, where the API JSON is cached.

  • 10:18 am — John Sherrell <dev@ohn.sh>

    Github loader: important to use `pushed_at` timestamp instead of `updated_at`. The latter is (seemingly) not updated on push.

  • 10:12 am — John Sherrell <dev@ohn.sh>

    Github loader: Only fetch commits for repositories updated since last sync. Still fetching *all* commits, which needs to be optimized.

xpro-nextjs-dashboard commits 2 ohnsh/xpro-nextjs-dashboard
  • 9:47 pm — John Sherrell <dev@ohn.sh>

    Module 26 projects 1-3 finished. Dashboard now rendering some charts and cards.

  • 7:38 pm — John Sherrell <dev@ohn.sh>

    Added vercel project with neon postgres storage. Seeded database with provided placeholder data.

YouTube

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.

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.