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:
Wayne Sutton
2026-01-10 15:53:27 -08:00
parent d5d8de0058
commit 95cc8a4677
43 changed files with 5941 additions and 526 deletions

View File

@@ -0,0 +1,70 @@
---
description: Create a new static page with proper frontmatter
---
# /create-page
Creates a new static page in `content/pages/` with validated frontmatter.
## Workflow
1. Ask for page details (title, slug)
2. Validate slug uniqueness
3. Create the markdown file with frontmatter
4. Remind to run sync
## Required information
| Field | Description |
|-------|-------------|
| title | Page title |
| slug | URL path (must be unique) |
## Optional information
| Field | Description |
|-------|-------------|
| order | Navigation order (lower = first) |
| showInNav | Show in navigation menu (default: true) |
| featured | Show in featured section |
| excerpt | Short text for cards |
| layout | "sidebar" for docs-style |
## File template
```markdown
---
title: "{title}"
slug: "{slug}"
published: true
order: {order}
showInNav: true
---
{content}
```
## Special pages
| Page | Slug | Purpose |
|------|------|---------|
| Homepage intro | home-intro | Content shown on homepage |
| Footer | footer | Footer content |
## After creation
Run sync to publish:
```bash
npm run sync
```
## For docs navigation
Add these fields to include in docs sidebar:
```yaml
docsSection: true
docsSectionGroup: "Group Name"
docsSectionOrder: 1
```

View File

@@ -0,0 +1,60 @@
---
description: Create a new blog post with proper frontmatter
---
# /create-post
Creates a new blog post in `content/blog/` with validated frontmatter.
## Workflow
1. Ask for post details (title, description, tags)
2. Generate a URL-safe slug
3. Create the markdown file with frontmatter
4. Remind to run sync
## Required information
| Field | Description |
|-------|-------------|
| title | Post title |
| description | SEO description (under 160 chars) |
| tags | Array of topic tags |
## Optional information
| Field | Description |
|-------|-------------|
| image | Header/OG image path |
| featured | Show in featured section |
| excerpt | Short text for cards |
| authorName | Author display name |
## File template
```markdown
---
title: "{title}"
description: "{description}"
date: "{YYYY-MM-DD}"
slug: "{slug}"
published: true
tags: [{tags}]
---
{content}
```
## After creation
Run sync to publish:
```bash
npm run sync
```
## Validation
- Slug must be unique across all posts/pages
- Date must be YYYY-MM-DD format
- Tags must be an array

View File

@@ -0,0 +1,70 @@
---
description: Deploy changes to production
---
# /deploy
Full deployment workflow for pushing changes to production.
## Deployment steps
### 1. Sync content to production
```bash
npm run sync:all:prod
```
This syncs:
- All posts and pages
- Discovery files (AGENTS.md, llms.txt)
- Raw markdown files
### 2. Deploy Convex functions
```bash
npx convex deploy
```
This pushes any changes to:
- Mutations and queries
- Schema changes
- HTTP endpoints
- Cron jobs
### 3. Build and deploy frontend
If using Netlify (automatic):
- Push to main branch triggers build
- Netlify runs: `npm ci --include=dev && npx convex deploy --cmd 'npm run build'`
If manual:
```bash
npm run build
```
## Verification checklist
After deployment:
- [ ] Production site loads correctly
- [ ] New content appears
- [ ] Existing content still works
- [ ] No console errors
- [ ] RSS feed updates
- [ ] Sitemap includes new pages
## Environment requirements
| File | Purpose |
|------|---------|
| `.env.production.local` | Production Convex URL |
| Netlify env vars | API keys, Convex deployment |
## Rollback
If something goes wrong:
1. Check Convex dashboard for function errors
2. Redeploy previous Convex version if needed
3. Check Netlify for build logs
4. Trigger a redeploy in Netlify dashboard

View File

@@ -0,0 +1,62 @@
---
description: Import external URL content as a markdown post
---
# /import
Imports content from an external URL and creates a new blog post.
## Usage
```bash
npm run import https://example.com/article
```
## Requirements
- `FIRECRAWL_API_KEY` in `.env.local`
- Valid, accessible URL
## What it does
1. Fetches the URL via Firecrawl API
2. Converts HTML to clean markdown
3. Extracts metadata (title, description)
4. Generates frontmatter
5. Creates file in `content/blog/`
## After import
You still need to run sync:
```bash
npm run sync
```
## Editing imported content
After import, you can edit the generated file in `content/blog/` to:
- Adjust the title
- Update the description
- Add/remove tags
- Edit the content
- Add images
## Troubleshooting
### "FIRECRAWL_API_KEY not set"
Add to your `.env.local`:
```
FIRECRAWL_API_KEY=your_api_key_here
```
### Content looks wrong
Some sites may not convert cleanly. Edit the generated markdown manually.
### Import failed
Check if the URL is accessible and not blocked by robots.txt or authentication.

View File

@@ -0,0 +1,44 @@
---
description: Sync markdown content to production Convex database
---
# /sync-prod
Syncs all markdown content to the production Convex database.
## What it does
Same as `/sync` but targets the production environment using `.env.production.local`.
## Usage
```bash
npm run sync:prod
```
## Requirements
- `.env.production.local` file must exist with `VITE_CONVEX_URL`
- Production Convex deployment must be configured
## When to use
- Before deploying changes to production
- When updating live content
- As part of the deployment workflow
## Full production sync
To sync everything including discovery files:
```bash
npm run sync:all:prod
```
## Verification
After production sync:
1. Check your production site
2. Verify content appears correctly
3. Check Convex dashboard for the production deployment

42
.opencode/command/sync.md Normal file
View 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.