From a57df0d6c89909ccd20fa4775ac19fa704351e04 Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Thu, 5 Mar 2026 00:28:54 +0700 Subject: [PATCH] Fix: Blog URLs and remove duplicate AI Automation links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 1. Blog URLs now correct (without .md extension) - Changed from: /blog/core-web-vitals.md/ - Changed to: /blog/core-web-vitals/ 2. Fixed duplicate AI Automation in navigation - Removed duplicate from header submenu - Removed duplicate from mobile menu - Removed duplicate from footer - Now 4 unique services in all menus Blog: - getStaticPaths: slug.replace('.md', '') - blog/index.astro: links use slug.replace('.md', '') - Blog builds to correct URLs without .md Navigation: - Header submenu: 4 services (not 5) - Mobile menu: 4 services (not 5) - Footer: 4 services (was 5 with duplicate) Services (4 unique): 1. พัฒนาเว็บไซต์ 2. AI Automation 3. พัฒนาแอปพลิเคชัน 4. ที่ปรึกษาการตลาดออนไลน์ --- src/layouts/Layout.astro | 24 +++++++++--------------- src/pages/blog/[slug].astro | 2 +- src/pages/blog/index.astro | 4 ++-- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 11b516a..629effc 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -6,7 +6,7 @@ interface Props { description?: string; } -const { title = 'MoreminiMore - AI Automation', description = 'เพิ่มยอดขายด้วย AI & Automation' } = Astro.props; +const { title = 'MoreminiMore - ที่ปรึกษาองค์กร AI', description = 'เพิ่มยอดขายด้วย AI & Technology' } = Astro.props; --- @@ -75,22 +75,18 @@ const { title = 'MoreminiMore - AI Automation', description = 'เพิ่ม
พัฒนาเว็บไซต์
E-Commerce, UX/UI
+ +
AI Automation
+
AI & Chatbot
+
พัฒนาแอปพลิเคชัน
iOS, Android
- -
AI Automation
-
AI & Automation
-
- +
ที่ปรึกษาการตลาดออนไลน์
Digital Marketing
- -
AI Automation
-
Chatbot, RPA
-
@@ -117,10 +113,9 @@ const { title = 'MoreminiMore - AI Automation', description = 'เพิ่ม
พัฒนาเว็บไซต์ + AI Automation พัฒนาแอปพลิเคชัน - AI Automation ที่ปรึกษาการตลาดออนไลน์ - AI Automation
เรื่องน่ารู้ @@ -139,7 +134,7 @@ const { title = 'MoreminiMore - AI Automation', description = 'เพิ่ม
MoreminiMore Logo -

AI Automation เพิ่มยอดขายด้วยข้อมูล

+

ที่ปรึกษาองค์กร AI เพิ่มยอดขายด้วยข้อมูล

diff --git a/src/pages/blog/[slug].astro b/src/pages/blog/[slug].astro index 112cf5c..0a114e4 100644 --- a/src/pages/blog/[slug].astro +++ b/src/pages/blog/[slug].astro @@ -5,7 +5,7 @@ import { getCollection } from 'astro:content'; export async function getStaticPaths() { const posts = await getCollection('blog'); return posts.map((post) => ({ - params: { slug: post.id }, + params: { slug: post.id.replace('.md', '') }, props: { post }, })); } diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 5901f3d..439e4c2 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -26,14 +26,14 @@ posts.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); ))}

- {post.data.title} + {post.data.title}

{post.data.description}

{post.data.author} {post.data.pubDate.toLocaleDateString('th-TH')}
- อ่านเพิ่มเติม → + อ่านเพิ่มเติม →
))}