fix(blog): remove test-post.md, fix blog index slug links

- Delete extra test-post.md (scope creep from F4)
- Fix EN blog index: strip 'en/' prefix from post.id in links
- Fix RU blog index: strip 'ru/' prefix from post.id in links
- Fix schema URLs in both blog indices to use clean slugs
This commit is contained in:
emil
2026-05-14 03:28:08 +03:00
parent 25fd24d236
commit ea77828094
6 changed files with 123 additions and 26 deletions
-12
View File
@@ -1,12 +0,0 @@
---
title: "Test Post"
description: "A test blog post for verification."
pubDate: 2025-01-15
modDate: 2025-01-15
draft: false
lang: en
category: guide
tags: ["test"]
---
This is a test blog post.
+2 -2
View File
@@ -27,7 +27,7 @@ const blogSchema = {
headline: post.data.title,
description: post.data.description,
datePublished: post.data.pubDate.toISOString(),
url: `https://randify.pro/blog/${post.slug}/`,
url: `https://randify.pro/blog/${post.id.replace(/^en\//, "").replace(/\.md$/, "")}/`,
})),
};
---
@@ -69,7 +69,7 @@ const blogSchema = {
{posts.map((post) => (
<li>
<a
href={`/blog/${post.slug}/`}
href={`/blog/${post.id.replace(/^en\//, "").replace(/\.md$/, "")}/`}
class="group block rounded-xl border border-zinc-800/60 bg-zinc-900/40 p-6 hover:border-accent/40 hover:bg-zinc-900/60 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950"
>
<div class="flex flex-wrap items-center gap-2 mb-3">
+2 -2
View File
@@ -27,7 +27,7 @@ const blogSchema = {
headline: post.data.title,
description: post.data.description,
datePublished: post.data.pubDate.toISOString(),
url: `https://randify.pro/ru/blog/${post.slug}/`,
url: `https://randify.pro/ru/blog/${post.id.replace(/^ru\//, "").replace(/\.md$/, "")}/`,
})),
};
---
@@ -69,7 +69,7 @@ const blogSchema = {
{posts.map((post) => (
<li>
<a
href={`/ru/blog/${post.slug}/`}
href={`/ru/blog/${post.id.replace(/^ru\//, "").replace(/\.md$/, "")}/`}
class="group block rounded-xl border border-zinc-800/60 bg-zinc-900/40 p-6 hover:border-accent/40 hover:bg-zinc-900/60 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950"
>
<div class="flex flex-wrap items-center gap-2 mb-3">