mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
feat: Added a Sync version control system for tracking changes to posts, pages, home content, and footer.
This commit is contained in:
@@ -7,7 +7,7 @@ published: true
|
||||
featured: true
|
||||
featuredOrder: 5
|
||||
layout: "sidebar"
|
||||
blogFeatured: true
|
||||
blogFeatured: false
|
||||
image: /images/agentmail-blog.png
|
||||
tags: ["agentmail", "newsletter", "email", "setup"]
|
||||
docsSection: true
|
||||
|
||||
@@ -5,7 +5,7 @@ date: "2025-12-28"
|
||||
slug: "how-to-use-mcp-server"
|
||||
image: /images/mcp-blog.png
|
||||
published: true
|
||||
blogFeatured: true
|
||||
blogFeatured: false
|
||||
layout: "sidebar"
|
||||
tags: ["mcp", "cursor", "ai", "tutorial", "netlify"]
|
||||
docsSection: true
|
||||
|
||||
@@ -9,6 +9,7 @@ readTime: "8 min read"
|
||||
featured: true
|
||||
layout: "sidebar"
|
||||
featuredOrder: 2
|
||||
blogFeatured: true
|
||||
image: /images/dashboard.png
|
||||
excerpt: "A complete guide to using the dashboard for managing your markdown blog without leaving your browser."
|
||||
docsSection: true
|
||||
|
||||
@@ -11,6 +11,56 @@ docsSectionOrder: 4
|
||||
|
||||
All notable changes to this project.
|
||||
|
||||
## v2.16.0
|
||||
|
||||
Released January 9, 2026
|
||||
|
||||
**Version control system**
|
||||
|
||||
Added a Sync version control system for tracking changes to posts, pages, home content, and footer.
|
||||
|
||||
**Features:**
|
||||
|
||||
- 3-day version history for all content
|
||||
- Dashboard toggle to enable/disable version control
|
||||
- Version history modal with unified diff visualization
|
||||
- Preview mode to view previous version content
|
||||
- One-click restore with automatic backup of current state
|
||||
- Automatic cleanup of versions older than 3 days (daily cron at 3 AM UTC)
|
||||
- Version stats display in Config section
|
||||
|
||||
**How to use:**
|
||||
|
||||
1. Navigate to Dashboard > Config
|
||||
2. Find the "Version Control" card
|
||||
3. Toggle "Enable version control" on
|
||||
4. Edit posts/pages or run sync commands to capture versions
|
||||
5. Click the History button in the editor to view version history
|
||||
6. Select a version to view diff or preview, then click "Restore This Version"
|
||||
|
||||
**Technical:**
|
||||
|
||||
- New `convex/versions.ts` with 7 functions (isEnabled, setEnabled, createVersion, getVersionHistory, getVersion, restoreVersion, cleanupOldVersions, getStats)
|
||||
- New `contentVersions` table with indexes for efficient queries
|
||||
- New `versionControlSettings` table for toggle state
|
||||
- New `VersionHistoryModal.tsx` component using existing DiffCodeBlock
|
||||
- Version capture integrated into cms.ts, posts.ts, and pages.ts
|
||||
- Cleanup cron job in crons.ts
|
||||
|
||||
**Files changed:**
|
||||
|
||||
- `convex/schema.ts` - Added contentVersions and versionControlSettings tables
|
||||
- `convex/versions.ts` - New file with all version control logic
|
||||
- `convex/cms.ts` - Added version capture before dashboard edits
|
||||
- `convex/posts.ts` - Added version capture before sync updates
|
||||
- `convex/pages.ts` - Added version capture before sync updates
|
||||
- `convex/crons.ts` - Added daily cleanup job
|
||||
- `src/components/VersionHistoryModal.tsx` - New version history modal
|
||||
- `src/pages/Dashboard.tsx` - Added Version Control config card and History button
|
||||
- `src/styles/global.css` - Added ~370 lines of version modal CSS
|
||||
|
||||
---
|
||||
|
||||
## v2.15.3
|
||||
|
||||
Released January 9, 2026
|
||||
@@ -208,7 +258,7 @@ Diff and patch code blocks now render with enhanced visualization powered by @pi
|
||||
- View toggle button to switch between modes
|
||||
- Theme-aware colors matching dark/light/tan/cloud themes
|
||||
- Copy button for copying raw diff content
|
||||
- Automatic routing: Use ```diff or ```patch in markdown
|
||||
- Automatic routing: Use `diff or `patch in markdown
|
||||
|
||||
**New documentation:**
|
||||
|
||||
@@ -351,6 +401,7 @@ semanticSearch: {
|
||||
```
|
||||
|
||||
When disabled:
|
||||
|
||||
- Search modal shows only keyword search (no mode toggle)
|
||||
- Embedding generation skipped during sync (saves API costs)
|
||||
- Existing embeddings preserved in database (no data loss)
|
||||
@@ -379,12 +430,12 @@ Search now supports two modes accessible via Cmd+K:
|
||||
|
||||
**When to use each mode:**
|
||||
|
||||
| Use Case | Mode |
|
||||
|----------|------|
|
||||
| Specific code, commands, exact phrases | Keyword |
|
||||
| Use Case | Mode |
|
||||
| ----------------------------------------- | -------- |
|
||||
| Specific code, commands, exact phrases | Keyword |
|
||||
| Conceptual questions ("how do I deploy?") | Semantic |
|
||||
| Need to highlight matches on page | Keyword |
|
||||
| Not sure of exact terminology | Semantic |
|
||||
| Need to highlight matches on page | Keyword |
|
||||
| Not sure of exact terminology | Semantic |
|
||||
|
||||
**Configuration:**
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: "Dashboard"
|
||||
slug: "docs-dashboard"
|
||||
published: true
|
||||
order: 5
|
||||
order: 1
|
||||
showInNav: false
|
||||
layout: "sidebar"
|
||||
rightSidebar: true
|
||||
@@ -375,6 +375,63 @@ This creates a file in `content/blog/` that requires syncing.
|
||||
|
||||
**Note:** The dashboard provides a UI for these commands. When the sync server is running (`npm run sync-server`), you can execute commands directly from the dashboard with real-time output. Otherwise, the dashboard shows commands in a modal for copying to your terminal.
|
||||
|
||||
### Version control
|
||||
|
||||
The dashboard includes a Sync version control system that tracks changes to posts, pages, home content, and footer content.
|
||||
|
||||
**Features:**
|
||||
|
||||
- 3-day version history for all content
|
||||
- Toggle to enable/disable version control
|
||||
- View version history with unified diff visualization
|
||||
- Preview previous versions
|
||||
- One-click restore with automatic backup
|
||||
- Automatic cleanup of versions older than 3 days
|
||||
|
||||
**Enabling version control:**
|
||||
|
||||
1. Navigate to Dashboard > Config
|
||||
2. Find the "Version Control" card
|
||||
3. Toggle "Enable version control" on
|
||||
|
||||
When enabled, versions are captured:
|
||||
|
||||
- Before sync updates (from markdown files)
|
||||
- Before dashboard edits (Save Changes button)
|
||||
- Before restoring a previous version
|
||||
|
||||
**Viewing version history:**
|
||||
|
||||
1. Open any post or page in the Dashboard editor
|
||||
2. Click the clock (History) button in the editor toolbar
|
||||
3. Select a version from the list to view details
|
||||
4. Toggle between "Diff" and "Preview" modes
|
||||
5. Click "Restore This Version" to revert
|
||||
|
||||
**How it works:**
|
||||
|
||||
- Versions are stored in the `contentVersions` table
|
||||
- Settings stored in `versionControlSettings` table (database, not config file)
|
||||
- Cleanup runs daily at 3:00 AM UTC via cron job
|
||||
- Restore creates a backup of current content before reverting
|
||||
- Uses existing DiffCodeBlock component for diff visualization
|
||||
|
||||
**Version sources:**
|
||||
|
||||
| Source | When created |
|
||||
| --------- | ---------------------------- |
|
||||
| sync | Before markdown sync updates |
|
||||
| dashboard | Before dashboard edits |
|
||||
| restore | Before restoring a version |
|
||||
|
||||
**Stats display:**
|
||||
|
||||
The Version Control card in Config shows:
|
||||
|
||||
- Total version count
|
||||
- Post versions count
|
||||
- Page versions count
|
||||
|
||||
### Environment variables
|
||||
|
||||
**Convex Environment Variables:**
|
||||
@@ -394,7 +451,7 @@ npx convex env set VARIABLE_NAME value
|
||||
|
||||
**Local Environment Variables (.env.local):**
|
||||
|
||||
| Variable | Description |
|
||||
| ------------------- | ------------------------------------------ |
|
||||
| `VITE_CONVEX_URL` | Your Convex deployment URL (auto-created) |
|
||||
| `FIRECRAWL_API_KEY` | For CLI import command only |
|
||||
| Variable | Description |
|
||||
| ------------------- | ----------------------------------------- |
|
||||
| `VITE_CONVEX_URL` | Your Convex deployment URL (auto-created) |
|
||||
| `FIRECRAWL_API_KEY` | For CLI import command only |
|
||||
|
||||
Reference in New Issue
Block a user