Files
Randify.pro/src/content/config.ts
T
emil 25fd24d236 feat(blog+categories): Wave 3-5 — blog infrastructure, categories, content, navigation
- Install @astrojs/rss and setup content collections (blog + generators)
- Create BlogLayout with BlogPosting schema, article OG tags, prev/next nav
- Create blog post pages EN/RU ([slug].astro) with dynamic routing
- Create blog index pages EN/RU with post cards and filtering
- Create RSS feeds EN/RU with auto-discovery links
- Create generator category pages EN/RU (5 categories each)
- Add category navigation pills to homepage
- Create Breadcrumbs, RelatedGenerators, RelatedPosts components
- Add breadcrumbs to GeneratorLayout and BlogLayout
- Wire RelatedGenerators into GeneratorLayout
- Wire RelatedPosts into blog post pages
- Create 8 EN + 8 RU blog post templates with placeholder content
- Add blog link to LanguageSwitcher navigation
- Add category and blog translation keys
2026-05-14 03:19:06 +03:00

31 lines
818 B
TypeScript

import { defineCollection, z } from "astro:content";
import { generatorSchema } from "@/lib/generator-schema";
const generators = defineCollection({
type: "data",
schema: generatorSchema,
});
const blog = defineCollection({
type: "content",
schema: ({ image }) =>
z.object({
title: z.string().max(120),
description: z.string().max(160),
pubDate: z.date(),
modDate: z.date().optional(),
draft: z.boolean().default(false),
lang: z.enum(["en", "ru"]),
category: z.enum(["tutorial", "guide", "news", "tips"]),
tags: z.array(z.string()).default([]),
ogImage: image().optional(),
relatedGenerators: z.array(z.string()).optional(),
relatedPosts: z.array(z.string()).optional(),
}),
});
export const collections = {
generators,
blog,
};