mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
Update version to 1.0.0 across package.json and changelog. Configure netlify.toml with Convex deployment URL (agreeable-trout-200.convex.site). Verify TypeScript type-safety for src and convex directories. Confirm Netlify build passes with SPA 404 fallback configured. Update TASK.md with deployment steps and files.md with complete file structure.
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import { defineSchema, defineTable } from "convex/server";
|
|
import { v } from "convex/values";
|
|
|
|
export default defineSchema({
|
|
// Blog posts table
|
|
posts: defineTable({
|
|
slug: v.string(),
|
|
title: v.string(),
|
|
description: v.string(),
|
|
content: v.string(),
|
|
date: v.string(),
|
|
published: v.boolean(),
|
|
tags: v.array(v.string()),
|
|
readTime: v.optional(v.string()),
|
|
image: v.optional(v.string()), // Header/OG image URL
|
|
lastSyncedAt: v.number(),
|
|
})
|
|
.index("by_slug", ["slug"])
|
|
.index("by_date", ["date"])
|
|
.index("by_published", ["published"])
|
|
.searchIndex("search_content", {
|
|
searchField: "content",
|
|
filterFields: ["published"],
|
|
})
|
|
.searchIndex("search_title", {
|
|
searchField: "title",
|
|
filterFields: ["published"],
|
|
}),
|
|
|
|
// Static pages (about, projects, contact, etc.)
|
|
pages: defineTable({
|
|
slug: v.string(),
|
|
title: v.string(),
|
|
content: v.string(),
|
|
published: v.boolean(),
|
|
order: v.optional(v.number()), // Display order in nav
|
|
lastSyncedAt: v.number(),
|
|
})
|
|
.index("by_slug", ["slug"])
|
|
.index("by_published", ["published"]),
|
|
|
|
// View counts for analytics
|
|
viewCounts: defineTable({
|
|
slug: v.string(),
|
|
count: v.number(),
|
|
}).index("by_slug", ["slug"]),
|
|
|
|
// Site configuration (about content, links, etc.)
|
|
siteConfig: defineTable({
|
|
key: v.string(),
|
|
value: v.any(),
|
|
}).index("by_key", ["key"]),
|
|
});
|