mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
New and Updated: ConvexFS Media Library with Bunny CDN integration ,OpenCode AI development tool integration, AI image generation download and copy options
This commit is contained in:
42
.opencode/command/sync.md
Normal file
42
.opencode/command/sync.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
description: Sync markdown content to development Convex database
|
||||
---
|
||||
|
||||
# /sync
|
||||
|
||||
Syncs all markdown content from `content/blog/` and `content/pages/` to the development Convex database.
|
||||
|
||||
## What it does
|
||||
|
||||
1. Reads all `.md` files from content directories
|
||||
2. Parses frontmatter with gray-matter
|
||||
3. Validates required fields
|
||||
4. Calculates reading time if not provided
|
||||
5. Upserts content to Convex database
|
||||
6. Generates raw markdown files in `public/raw/`
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
npm run sync
|
||||
```
|
||||
|
||||
## When to use
|
||||
|
||||
- After creating or editing markdown files
|
||||
- After importing content from URLs
|
||||
- When content is not appearing on the site
|
||||
|
||||
## Output
|
||||
|
||||
The command shows:
|
||||
- Number of posts synced
|
||||
- Number of pages synced
|
||||
- Any validation warnings
|
||||
- Generated raw files
|
||||
|
||||
## Next steps
|
||||
|
||||
After syncing, visit `http://localhost:5173` to see your content.
|
||||
|
||||
For production sync, use `/sync-prod` instead.
|
||||
Reference in New Issue
Block a user