Update Tags.astro

This commit is contained in:
Liron Abutbul
2023-06-09 08:01:41 +03:00
committed by GitHub
parent e11a7c8f0d
commit f65fa1659b

View File

@ -8,9 +8,10 @@ export interface Props {
tags: Post['tags']; tags: Post['tags'];
class?: string; class?: string;
title?: string | undefined; title?: string | undefined;
isCategory?: boolean;
} }
const { tags, class: className = 'text-sm', title = undefined } = Astro.props; const { tags, class: className = 'text-sm', title = undefined, isCategory = false } = Astro.props;
--- ---
{ {
@ -26,7 +27,7 @@ const { tags, class: className = 'text-sm', title = undefined } = Astro.props;
tag tag
) : ( ) : (
<a <a
href={getPermalink(tag, 'tag')} href={getPermalink(tag, (isCategory ? 'category' : 'tag')}
class="text-muted dark:text-slate-300 hover:text-primary dark:hover:text-gray-200" class="text-muted dark:text-slate-300 hover:text-primary dark:hover:text-gray-200"
> >
{tag} {tag}