From 15e1b3971fe56bbad4b6f52a1fb5f877dcf071a5 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 19 Dec 2024 22:14:32 +0800 Subject: [PATCH] :sparkles: Post listing --- astro.config.mjs | 2 +- src/layouts/Layout.astro | 18 +-- src/pages/en/index.astro | 110 ------------- src/pages/index.astro | 108 ++++++++++++- src/pages/{en => }/posts/[...slug].astro | 0 src/pages/posts/index.astro | 149 ++++++++++++++++++ .../{en => }/products/solar-network.astro | 0 src/pages/{en => }/terms/index.astro | 2 +- src/pages/{en => }/terms/privacy-policy.astro | 4 +- .../{en => }/terms/user-agreements.astro | 4 +- src/pages/zh-cn/terms/privacy-policy.astro | 4 +- src/pages/zh-cn/terms/user-agreements.astro | 9 +- 12 files changed, 275 insertions(+), 135 deletions(-) delete mode 100644 src/pages/en/index.astro rename src/pages/{en => }/posts/[...slug].astro (100%) create mode 100644 src/pages/posts/index.astro rename src/pages/{en => }/products/solar-network.astro (100%) rename src/pages/{en => }/terms/index.astro (95%) rename src/pages/{en => }/terms/privacy-policy.astro (96%) rename src/pages/{en => }/terms/user-agreements.astro (98%) diff --git a/astro.config.mjs b/astro.config.mjs index ab9992e..6a35ce0 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -16,7 +16,7 @@ export default defineConfig({ defaultLocale: 'en', routing: { fallbackType: 'rewrite', - prefixDefaultLocale: true, + prefixDefaultLocale: false, }, }, }) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index f95c18c..b8c7f4b 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -84,17 +84,13 @@ const locale = Astro.currentLocale ?? 'en' -