Skip to content

Commit

Permalink
Refactor link generation in BlogItemH.astro
Browse files Browse the repository at this point in the history
  • Loading branch information
kizzandev committed Feb 5, 2024
1 parent 463fdb3 commit d27d17b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/atom/BlogItemH.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const maxWidth = Astro.props.maxChars
const slug = Astro.props.title.toLowerCase().replace(/\s/g, '-');
const link = `${Astro.props.lang ?? ''}/blog/article/${slug}`;
let link = `/blog/article/${slug}`;
if (Astro.props.lang) link = `/${Astro.props.lang}/blog/article/${slug}`;
---

<li>
Expand Down

0 comments on commit d27d17b

Please sign in to comment.