Use pretty URLs for blog posts in listings

This commit is contained in:
Obsidian Sync 2026-02-25 19:19:24 +05:30
parent f872c83c63
commit d83500a0c9

View file

@ -18,7 +18,7 @@ const datePrefix = `${day} ${month}. `;
---
<a
href={`/${entry.collection}/${entry.id}`}
href={entry.collection === "blog" ? `/${entry.id}` : `/${entry.collection}/${entry.id}`}
class="not-prose group relative flex flex-nowrap rounded-lg border border-black/15 px-4 py-3 pr-10 transition-colors duration-300 ease-in-out hover:bg-black/5 hover:text-black focus-visible:bg-black/5 focus-visible:text-black dark:border-white/20 dark:hover:bg-white/5 dark:hover:text-white dark:focus-visible:bg-white/5 dark:focus-visible:text-white"
>
<div class="flex flex-1 flex-col truncate">