forked from danielcgilibert/blog-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request danielcgilibert#86 from Seventeezz/fix/speical-cha…
…r-in-tag-urls fix: handle special characters in tag URLs
- Loading branch information
Showing
1 changed file
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
--- | ||
export interface Props { | ||
tag: string | ||
} | ||
const { tag } = Astro.props | ||
--- | ||
|
||
<a href={`/tags/${tag.toLowerCase()}`} aria-label={tag}> | ||
<span | ||
class='bg-indigo-600 font-semibold text-white dark:bg-indigo-900 dark:text-white shadow text-sm w-fit px-2 py-1 md:px-5 md:py-2 rounded-full' | ||
> | ||
{tag ?? 'Blog Tag'} | ||
</span> | ||
</a> | ||
--- | ||
export interface Props { | ||
tag: string | ||
} | ||
const { tag } = Astro.props | ||
--- | ||
|
||
<a href={`/tags/${encodeURIComponent(tag.toLowerCase())}`} aria-label={tag}> | ||
<span | ||
class='bg-indigo-600 font-semibold text-white dark:bg-indigo-900 dark:text-white shadow text-sm w-fit px-2 py-1 md:px-5 md:py-2 rounded-full' | ||
> | ||
{tag ?? 'Blog Tag'} | ||
</span> | ||
</a> |