feat: add discovery files sync commands and update documentation

This commit is contained in:
Wayne Sutton
2025-12-24 23:16:34 -08:00
parent 1ac6b9fc84
commit 03ff3eb844
28 changed files with 2345 additions and 81 deletions

View File

@@ -82,6 +82,18 @@ The setup takes about 10 minutes:
**Development vs Production:** Use `npm run sync` when testing locally against your dev Convex deployment. Use `npm run sync:prod` when deploying content to your live production site.
**Sync commands:**
**Development:**
- `npm run sync` - Sync markdown content
- `npm run sync:discovery` - Update discovery files (AGENTS.md, llms.txt)
- `npm run sync:all` - Sync content + discovery files together
**Production:**
- `npm run sync:prod` - Sync markdown content
- `npm run sync:discovery:prod` - Update discovery files
- `npm run sync:all:prod` - Sync content + discovery files together
**Import external content:** Run `npm run import <url>` to scrape and create local markdown drafts. Then sync to dev or prod. There is no separate import command for production because import creates local files only.
Read the [setup guide](/setup-guide) for detailed steps.

View File

@@ -0,0 +1,34 @@
---
title: "Happy holidays and thank you"
description: "A quick note of thanks for stars, forks, and feedback. More AI-first publishing features coming in 2026."
date: "2025-12-25"
slug: "happy-holidays-2025"
published: true
tags: ["updates", "community", "ai"]
readTime: "2 min read"
featured: true
featuredOrder: 0
excerpt: "Thank you for the stars, forks, and feedback. More AI-first publishing features are coming."
authorName: "Wayne Sutton"
authorImage: "/images/authors/markdown.png"
---
# Happy holidays and thank you
Thank you for using this markdown framework. Your stars, forks, and feedback help make it better.
## Feedback and feature requests
Found a bug? Have an idea? Open an issue on [GitHub](https://github.com/waynesutton/markdown-site). Issues help prioritize what to build next.
## What's coming
More AI-first publishing features are on the way. The changelog at [/changelog](/changelog) tracks all updates. Check it regularly for new releases.
Recent additions include tag pages, related posts, and improved AI service integrations. The roadmap focuses on making content creation faster and more accessible to AI agents.
## Keep building
Write markdown. Sync from the terminal. Your content appears instantly. That's the goal.
Happy holidays.

View File

@@ -186,8 +186,18 @@ export default defineSchema({
Blog posts live in `content/blog/` as markdown files. Sync them to Convex:
**Development:**
```bash
npm run sync
npm run sync # Sync markdown content
npm run sync:discovery # Update discovery files (AGENTS.md, llms.txt)
npm run sync:all # Sync content + discovery files together
```
**Production:**
```bash
npm run sync:prod # Sync markdown content
npm run sync:discovery:prod # Update discovery files
npm run sync:all:prod # Sync content + discovery files together
```
This reads all markdown files, parses the frontmatter, and uploads them to your Convex database.
@@ -391,16 +401,17 @@ This image appears when sharing on social media. Recommended: 1200x630 pixels.
2. Push to GitHub
3. Wait for Netlify to rebuild
The `npm run sync` command only syncs markdown text content. Images are deployed when Netlify builds your site.
The `npm run sync` command only syncs markdown text content. Images are deployed when Netlify builds your site. Use `npm run sync:discovery` to update discovery files (AGENTS.md, llms.txt) when site configuration changes.
### Sync After Adding Posts
After adding or editing posts, sync to Convex.
**Development sync:**
```bash
npm run sync
npm run sync # Sync markdown content
npm run sync:discovery # Update discovery files
npm run sync:all # Sync everything together
```
**Production sync:**
@@ -414,9 +425,10 @@ VITE_CONVEX_URL=https://your-prod-deployment.convex.cloud
Get your production URL from the [Convex Dashboard](https://dashboard.convex.dev) by selecting your project and switching to the Production deployment.
Then sync:
```bash
npm run sync:prod
npm run sync:prod # Sync markdown content
npm run sync:discovery:prod # Update discovery files
npm run sync:all:prod # Sync everything together
```
### Environment Files
@@ -435,6 +447,7 @@ Both files are gitignored. Each developer creates their own local environment fi
| Blog posts in `content/blog/` | `npm run sync` | Instant (no rebuild) |
| Pages in `content/pages/` | `npm run sync` | Instant (no rebuild) |
| Featured items (via frontmatter) | `npm run sync` | Instant (no rebuild) |
| Site config changes | `npm run sync:discovery` | Updates discovery files |
| Import external URL | `npm run import` then sync | Instant (no rebuild) |
| Images in `public/images/` | Git commit + push | Requires rebuild |
| `siteConfig` in `Home.tsx` | Redeploy | Requires rebuild |
@@ -1080,8 +1093,9 @@ Each post and page includes a share dropdown with options for AI tools:
| What you want | Command needed |
| ------------------------------------ | ------------------------------ |
| Content visible on your site | `npm run sync` or `sync:prod` |
| Discovery files updated | `npm run sync:discovery` or `sync:discovery:prod` |
| AI links (ChatGPT/Claude/Perplexity) | `git push` to GitHub |
| Both | `npm run sync` then `git push` |
| Both content and discovery | `npm run sync:all` or `sync:all:prod` |
**Download as SKILL.md** formats the content as an Anthropic Agent Skills file with metadata, triggers, and instructions sections.
@@ -1131,6 +1145,7 @@ The import script will:
- Run `npm run sync` to push to development
- Run `npm run sync:prod` to push to production
- Use `npm run sync:all` or `npm run sync:all:prod` to sync content and update discovery files together
Imported posts are created as drafts (`published: false`). Review, edit, set `published: true`, then sync to your target environment.
@@ -1141,7 +1156,8 @@ Imported posts are created as drafts (`published: false`). Review, edit, set `pu
1. Check that `published: true` in frontmatter
2. Run `npm run sync` to sync posts to development
3. Run `npm run sync:prod` to sync posts to production
4. Verify posts exist in Convex dashboard
4. Use `npm run sync:all` or `npm run sync:all:prod` to sync content and update discovery files together
5. Verify posts exist in Convex dashboard
### RSS/Sitemap not working

View File

@@ -14,6 +14,18 @@ An open-source publishing framework for AI agents and developers. Write markdown
**CLI publishing workflow.** Write markdown locally, then run `npm run sync` (dev) or `npm run sync:prod` (production). Content appears instantly via Convex real-time sync. Images require git commit and push since they are served as static files from Netlify.
**Sync commands:**
**Development:**
- `npm run sync` - Sync markdown content
- `npm run sync:discovery` - Update discovery files (AGENTS.md, llms.txt)
- `npm run sync:all` - Sync content + discovery files together
**Production:**
- `npm run sync:prod` - Sync markdown content
- `npm run sync:discovery:prod` - Update discovery files
- `npm run sync:all:prod` - Sync content + discovery files together
**Version controlled.** Markdown source files live in your repo alongside code. Commit changes, review diffs, roll back like any codebase. The sync command pushes content to the database.
```bash

View File

@@ -8,6 +8,30 @@ layout: "sidebar"
All notable changes to this project.
## v1.28.0
Released December 25, 2025
**Discovery files sync automation**
- New discovery files sync script
- Automatically updates AGENTS.md and llms.txt with current app data
- Reads from siteConfig.ts and queries Convex for post/page counts
- Preserves existing AGENTS.md instructional content
- Regenerates llms.txt with current site information
- New npm sync commands
- `npm run sync:discovery` - Update discovery files (development)
- `npm run sync:discovery:prod` - Update discovery files (production)
- `npm run sync:all` - Sync content + discovery files together (development)
- `npm run sync:all:prod` - Sync content + discovery files together (production)
- Fork configuration support for gitHubRepo
- Added gitHubRepoConfig to fork-config.json.example
- Updated configure-fork.ts with backward compatibility for legacy fields
Updated files: `scripts/sync-discovery-files.ts`, `package.json`, `fork-config.json.example`, `scripts/configure-fork.ts`, `FORK_CONFIG.md`, `files.md`
Documentation updated: `README.md`, `docs.md`, `setup-guide.md`, `about.md`, `about-this-blog.md`
## v1.27.0
Released December 24, 2025

View File

@@ -10,6 +10,20 @@ Reference documentation for setting up, customizing, and deploying this markdown
**How publishing works:** Write posts in markdown, run `npm run sync` for development or `npm run sync:prod` for production, and they appear on your live site immediately. No rebuild or redeploy needed. Convex handles real-time data sync, so connected browsers update automatically.
**Sync commands:**
**Development:**
- `npm run sync` - Sync markdown content
- `npm run sync:discovery` - Update discovery files (AGENTS.md, llms.txt)
- `npm run sync:all` - Sync content + discovery files together
**Production:**
- `npm run sync:prod` - Sync markdown content
- `npm run sync:discovery:prod` - Update discovery files
- `npm run sync:all:prod` - Sync content + discovery files together
## Quick start
```bash
@@ -214,26 +228,42 @@ To add a custom frontmatter field, update these files:
### Syncing content
```bash
# Development
npm run sync
**Development:**
# Production
npm run sync:prod
```bash
npm run sync # Sync markdown content
npm run sync:discovery # Update discovery files (AGENTS.md, llms.txt)
npm run sync:all # Sync content + discovery files together
```
**Production:**
```bash
npm run sync:prod # Sync markdown content
npm run sync:discovery:prod # Update discovery files
npm run sync:all:prod # Sync content + discovery files together
```
**Sync everything together:**
```bash
npm run sync:all # Development: content + discovery
npm run sync:all:prod # Production: content + discovery
```
### When to sync vs deploy
| What you're changing | Command | Timing |
| -------------------------------- | -------------------------- | -------------------- |
| Blog posts in `content/blog/` | `npm run sync` | Instant (no rebuild) |
| Pages in `content/pages/` | `npm run sync` | Instant (no rebuild) |
| Featured items (via frontmatter) | `npm run sync` | Instant (no rebuild) |
| Import external URL | `npm run import` then sync | Instant (no rebuild) |
| Images in `public/images/` | Git commit + push | Requires rebuild |
| `siteConfig` in `Home.tsx` | Redeploy | Requires rebuild |
| Logo gallery config | Redeploy | Requires rebuild |
| React components/styles | Redeploy | Requires rebuild |
| What you're changing | Command | Timing |
| -------------------------------- | -------------------------- | ----------------------- |
| Blog posts in `content/blog/` | `npm run sync` | Instant (no rebuild) |
| Pages in `content/pages/` | `npm run sync` | Instant (no rebuild) |
| Featured items (via frontmatter) | `npm run sync` | Instant (no rebuild) |
| Site config changes | `npm run sync:discovery` | Updates discovery files |
| Import external URL | `npm run import` then sync | Instant (no rebuild) |
| Images in `public/images/` | Git commit + push | Requires rebuild |
| `siteConfig` in `Home.tsx` | Redeploy | Requires rebuild |
| Logo gallery config | Redeploy | Requires rebuild |
| React components/styles | Redeploy | Requires rebuild |
**Markdown content** syncs instantly to Convex. **Images and source code** require pushing to GitHub for Netlify to rebuild.
@@ -408,7 +438,7 @@ excerpt: "Short description for card view."
image: "/images/thumbnail.png"
```
Then run `npm run sync`. No redeploy needed.
Then run `npm run sync` or `npm run sync:all`. No redeploy needed.
| Field | Description |
| --------------- | -------------------------------------------- |
@@ -641,7 +671,7 @@ Mobile sizes defined in `@media (max-width: 768px)` block.
2. Push to GitHub
3. Wait for Netlify to rebuild
The `npm run sync` command only syncs markdown text content. Images are deployed when Netlify builds your site.
The `npm run sync` command only syncs markdown text content. Images are deployed when Netlify builds your site. Use `npm run sync:discovery` to update discovery files (AGENTS.md, llms.txt) when site configuration changes.
**Logo options:**
@@ -689,11 +719,12 @@ Each post and page includes a share dropdown with options:
**Git push required for AI links:** The "Open in ChatGPT," "Open in Claude," and "Open in Perplexity" options use GitHub raw URLs. For these to work, you must push your content to GitHub with `git push`. The `npm run sync` command syncs content to Convex for your live site, but AI services fetch directly from GitHub.
| What you want | Command needed |
| ------------------------------------ | ------------------------------ |
| Content visible on your site | `npm run sync` or `sync:prod` |
| AI links (ChatGPT/Claude/Perplexity) | `git push` to GitHub |
| Both | `npm run sync` then `git push` |
| What you want | Command needed |
| ------------------------------------ | ------------------------------------------------- |
| Content visible on your site | `npm run sync` or `sync:prod` |
| Discovery files updated | `npm run sync:discovery` or `sync:discovery:prod` |
| AI links (ChatGPT/Claude/Perplexity) | `git push` to GitHub |
| Both content and discovery | `npm run sync:all` or `sync:all:prod` |
**Download as SKILL.md:** Downloads the content formatted as an Anthropic Agent Skills file with metadata, triggers, and instructions sections.
@@ -727,7 +758,7 @@ All stats update automatically via Convex subscriptions.
## Raw markdown files
When you run `npm run sync` (development) or `npm run sync:prod` (production), static `.md` files are generated in `public/raw/` for each published post and page.
When you run `npm run sync` (development) or `npm run sync:prod` (production), static `.md` files are generated in `public/raw/` for each published post and page. Use `npm run sync:all` or `npm run sync:all:prod` to sync content and update discovery files together.
**Access pattern:** `/raw/{slug}.md`
@@ -801,6 +832,7 @@ The import command creates local markdown files only. It does not interact with
- `npm run sync` to push to development
- `npm run sync:prod` to push to production
- Use `npm run sync:all` or `npm run sync:all:prod` to sync content and update discovery files together
There is no `npm run import:prod` because import creates local files and sync handles the target environment.
@@ -882,6 +914,7 @@ export default defineSchema({
- Check `published: true` in frontmatter
- Run `npm run sync` for development
- Run `npm run sync:prod` for production
- Use `npm run sync:all` or `npm run sync:all:prod` to sync content and update discovery files together
- Verify in Convex dashboard
**RSS/Sitemap errors**