Skip to content

Commit

Permalink
feat(TIL): link T.I.Ls tags to global blog tag page
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed Sep 14, 2024
1 parent 40fb6c3 commit 86b9569
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/til-item.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Link from 'next/link'
import { TIL } from '#content'

import { slug } from '~/lib/slug'
Expand All @@ -18,12 +19,13 @@ export function TilItem({ til }: { til: TIL }) {
</div>
<div className="flex flex-wrap gap-1">
{til.tags.map(tag => (
<span
className="rounded-lg bg-neutral-400/10 p-1 text-sm leading-none"
<Link
href={`/blog/tag/${slug(tag)}`}
className="rounded-lg bg-neutral-400/10 p-1 text-sm leading-none transition-colors hover:bg-neutral-400/20"
key={tag}
>
{tag}
</span>
</Link>
))}
</div>
</div>
Expand Down

0 comments on commit 86b9569

Please sign in to comment.