Skip to content

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.

YouTube