From dc1b76b20f3af484d79516f130e7586f3a921aaa Mon Sep 17 00:00:00 2001 From: Emil Gulamov <125820963+mearashadowfax@users.noreply.github.com> Date: Tue, 23 Apr 2024 23:49:47 +0400 Subject: [PATCH] Update logic for loading blog posts in different languages The changes in this commit involve updates to the logic that drives loading of blog posts. Further changes were made to various components to pass the locale as a prop, which is then used for URL formation in these components. --- src/components/ui/LanguagePicker.astro | 19 +++++++++++-- src/components/ui/cards/CardBlog.astro | 5 ++-- src/components/ui/cards/CardBlogRecent.astro | 7 +++-- src/content/blog/post-1.md | 19 ------------- src/content/blog/post-2.md | 20 -------------- src/content/blog/post-3.md | 19 ------------- src/pages/blog/[...slug].astro | 16 +++++++---- src/pages/blog/index.astro | 29 ++++++++++++-------- src/pages/fr/blog/index.astro | 21 ++++++++------ 9 files changed, 64 insertions(+), 91 deletions(-) delete mode 100644 src/content/blog/post-1.md delete mode 100644 src/content/blog/post-2.md delete mode 100644 src/content/blog/post-3.md diff --git a/src/components/ui/LanguagePicker.astro b/src/components/ui/LanguagePicker.astro index 5325c8f..4696129 100644 --- a/src/components/ui/LanguagePicker.astro +++ b/src/components/ui/LanguagePicker.astro @@ -25,10 +25,11 @@ import Icon from "./icons/Icon.astro";