mirror of
https://github.com/Such-Software/such.software.git
synced 2026-10-24 06:38:32 +02:00
fix: content audit — SEO, cross-links, draft filtering, styling
- Add sitemap.xml and robots.txt (such.software-site) - Fix blog date on neroswap post (2025→2026) - Filter draft posts from generateStaticParams and getPost - Fix stale product list in website-relaunch blog post - Fix Godot version (4.6→4) - Add cross-links: product pages→blog posts, blog posts→product pages - Add OG/Twitter metadata to blog [slug] pages - Fix Bauhaus Echo privacy: hover color (emerald→blue), contact URL - Fix Suchoice: card styling (p-6→glass-card), font-semibold→font-bold - Fix products listing meta to include Suchoice
This commit is contained in:
@@ -47,6 +47,7 @@ export function getPost(slug: string): Post | null {
|
||||
|
||||
const raw = fs.readFileSync(filePath, "utf-8");
|
||||
const { data, content } = matter(raw);
|
||||
if (data.draft === true) return null;
|
||||
const iso = data.date ?? "";
|
||||
return {
|
||||
slug,
|
||||
@@ -65,5 +66,10 @@ export function getAllSlugs(): string[] {
|
||||
return fs
|
||||
.readdirSync(CONTENT_DIR)
|
||||
.filter((f) => f.endsWith(".mdx"))
|
||||
.filter((f) => {
|
||||
const raw = fs.readFileSync(path.join(CONTENT_DIR, f), "utf-8");
|
||||
const { data } = matter(raw);
|
||||
return data.draft !== true;
|
||||
})
|
||||
.map((f) => f.replace(/\.mdx$/, ""));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user