diff --git a/src/components/ArticleContent.astro b/src/components/ArticleContent.astro index 6ef94bc..ba29de4 100644 --- a/src/components/ArticleContent.astro +++ b/src/components/ArticleContent.astro @@ -206,6 +206,9 @@ & .languages-available { margin: 25px 0; font-size: var(--font-size-lg); + & a:not(:last-child)::after { + content: ","; + } } } diff --git a/src/components/ArticleItem.astro b/src/components/ArticleItem.astro index fd949ca..fdb7ffb 100644 --- a/src/components/ArticleItem.astro +++ b/src/components/ArticleItem.astro @@ -1,23 +1,19 @@ --- import type { CollectionEntry } from "astro:content"; -import slugify from "@sindresorhus/slugify"; import { URL_BLOG_PREFIX } from "@root/pages/[...blog].astro"; -import { DEFAULT_LANGUAGE } from "@root/constants"; import { getLanguageFromURL } from "@i18n/utils"; -import { createDateFormatter } from "@root/utils"; +import { createDateFormatter, createRelativeArticleUrl } from "@root/utils"; export interface Props { entry: CollectionEntry<"blog">; } const pageLang = getLanguageFromURL(Astro.url.pathname); +const { entry } = Astro.props as Props; const { - entry: { - id, - data: { title, pubDate }, - }, -} = Astro.props as Props; -const slug = slugify(title, { lowercase: true }); + id, + data: { title, pubDate }, +} = entry; const articleLang = id.split("/")[0]; --- @@ -27,11 +23,7 @@ const articleLang = id.split("/")[0]; itemtype="http://schema.org/BlogPosting" class="article-item" > - +

{title}

{articleLang !== pageLang && {articleLang.toLocaleUpperCase()}} diff --git a/src/components/PageHeading.astro b/src/components/PageHeading.astro index ded384f..c7c3023 100644 --- a/src/components/PageHeading.astro +++ b/src/components/PageHeading.astro @@ -16,14 +16,13 @@ const { heading, description } = Astro.props as Props;