Allow post permalink pattern configuration

This commit is contained in:
prototypa
2023-01-24 00:22:13 -05:00
parent ddeac0576f
commit 47948c3da3
7 changed files with 68 additions and 35 deletions

View File

@ -38,7 +38,7 @@ const image = await findImage(post.image);
post.title
) : (
<a
href={getPermalink(post.slug, 'post')}
href={getPermalink(post.permalink, 'post')}
class="hover:text-primary dark:hover:text-blue-700 transition ease-in duration-200"
>
{post.title}

View File

@ -17,7 +17,7 @@ export interface Props {
const { post } = Astro.props;
const image = await findImage(post.image);
const link = !BLOG?.post?.disabled ? getPermalink(post.slug, 'post') : '';
const link = !BLOG?.post?.disabled ? getPermalink(post.permalink, 'post') : '';
---
<article class={`max-w-md mx-auto md:max-w-none grid gap-6 md:gap-8 ${image ? 'md:grid-cols-2' : ''}`}>