diff --git a/src/components/ArticlePost.astro b/src/components/ArticlePost.astro index 4671a61..b2fbbe2 100644 --- a/src/components/ArticlePost.astro +++ b/src/components/ArticlePost.astro @@ -5,14 +5,15 @@ import { createDateFormatter } from "@root/utils"; import ArticleCover from "@components/ArticleCover.astro"; import ArticleComments from "@components/ArticleComments.astro"; // import TranslatedLink from "../TranslatedLink"; -// import { useTranslation } from "@i18n/utils"; +import { useTranslation, getLanguageFromURL } from "@i18n/utils"; export type Props = { article: CollectionEntry<"blog">; lang: string; }; -const { article, lang } = Astro.props as Props; +const { article } = Astro.props as Props; +const pageLang = getLanguageFromURL(Astro.url.pathname); const canonicalUrl = new URL(Astro.url.pathname, Astro.site); const { data: { coverImage, title, author, description, tags, pubDate }, @@ -50,7 +51,7 @@ const {
diff --git a/src/components/Footer.astro b/src/components/Footer.astro index e30c9aa..1bb8b2a 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -3,19 +3,20 @@ import { SITE_METADATA } from "@root/constants"; import { Icon } from "astro-icon"; import TranslatedLink from "./TranslatedLink.astro"; import UIString from "./UIString.astro"; -const date = new Date(); ---