mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
update: sync commands copy icons added
This commit is contained in:
@@ -22,7 +22,7 @@ Your content is instantly available to browsers, LLMs, and AI agents.. Write mar
|
||||
- **Total Posts**: 17
|
||||
- **Total Pages**: 4
|
||||
- **Latest Post**: 2025-12-29
|
||||
- **Last Updated**: 2026-01-04T05:50:22.819Z
|
||||
- **Last Updated**: 2026-01-04T17:25:36.680Z
|
||||
|
||||
## Tech stack
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Project instructions for Claude Code.
|
||||
## Project context
|
||||
|
||||
<!-- Auto-updated by sync:discovery -->
|
||||
<!-- Site: markdown | Posts: 17 | Pages: 4 | Updated: 2026-01-04T05:50:22.820Z -->
|
||||
<!-- Site: markdown | Posts: 17 | Pages: 4 | Updated: 2026-01-04T17:25:36.682Z -->
|
||||
|
||||
Markdown sync framework. Write markdown in `content/`, run sync commands, content appears instantly via Convex real-time database. Built for developers and AI agents.
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@ An open-source publishing framework built for AI agents and developers to ship w
|
||||
|
||||
**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
|
||||
- <span class="copy-command">npm run sync</span> - Sync markdown content
|
||||
- <span class="copy-command">npm run sync:discovery</span> - Update discovery files (AGENTS.md, llms.txt)
|
||||
- <span class="copy-command">npm run sync:all</span> - 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
|
||||
- <span class="copy-command">npm run sync:prod</span> - Sync markdown content
|
||||
- <span class="copy-command">npm run sync:discovery:prod</span> - Update discovery files
|
||||
- <span class="copy-command">npm run sync:all:prod</span> - 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.
|
||||
|
||||
|
||||
@@ -25,15 +25,15 @@ Reference documentation for setting up, customizing, and deploying this markdown
|
||||
|
||||
**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
|
||||
- <span class="copy-command">npm run sync</span> - Sync markdown content
|
||||
- <span class="copy-command">npm run sync:discovery</span> - Update discovery files (AGENTS.md, llms.txt)
|
||||
- <span class="copy-command">npm run sync:all</span> - 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
|
||||
- <span class="copy-command">npm run sync:prod</span> - Sync markdown content
|
||||
- <span class="copy-command">npm run sync:discovery:prod</span> - Update discovery files
|
||||
- <span class="copy-command">npm run sync:all:prod</span> - Sync content + discovery files together
|
||||
|
||||
## Quick start
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# llms.txt - Information for AI assistants and LLMs
|
||||
# Learn more: https://llmstxt.org/
|
||||
# Last updated: 2026-01-04T05:50:22.820Z
|
||||
# Last updated: 2026-01-04T17:25:36.682Z
|
||||
|
||||
> Your content is instantly available to browsers, LLMs, and AI agents.
|
||||
|
||||
|
||||
@@ -17,15 +17,15 @@ An open-source publishing framework built for AI agents and developers to ship w
|
||||
|
||||
**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
|
||||
- <span class="copy-command">npm run sync</span> - Sync markdown content
|
||||
- <span class="copy-command">npm run sync:discovery</span> - Update discovery files (AGENTS.md, llms.txt)
|
||||
- <span class="copy-command">npm run sync:all</span> - 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
|
||||
- <span class="copy-command">npm run sync:prod</span> - Sync markdown content
|
||||
- <span class="copy-command">npm run sync:discovery:prod</span> - Update discovery files
|
||||
- <span class="copy-command">npm run sync:all:prod</span> - 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.
|
||||
|
||||
|
||||
@@ -7,6 +7,22 @@ Date: 2026-01-04
|
||||
|
||||
All notable changes to this project.
|
||||
|
||||
## v2.8.6
|
||||
|
||||
Released January 4, 2026
|
||||
|
||||
**Fork configuration improvements**
|
||||
|
||||
- Fork configuration script now updates 14 files (was 11)
|
||||
- Added `src/pages/DocsPage.tsx` (SITE_URL constant)
|
||||
- Added `netlify/edge-functions/mcp.ts` (SITE_URL, SITE_NAME, MCP_SERVER_NAME)
|
||||
- Added `scripts/send-newsletter.ts` (default SITE_URL)
|
||||
- Improved `public/openapi.yaml` handling for all example URLs
|
||||
- Logo gallery hrefs now use relative URLs instead of hardcoded markdown.fast URLs
|
||||
- Updated `fork-config.json.example` with missing options (statsPage, mcpServer, imageLightbox)
|
||||
|
||||
Updated files: `scripts/configure-fork.ts`, `src/config/siteConfig.ts`, `FORK_CONFIG.md`, `content/blog/fork-configuration-guide.md`, `fork-config.json.example`
|
||||
|
||||
## v2.8.5
|
||||
|
||||
Released January 3, 2026
|
||||
|
||||
@@ -15,15 +15,15 @@ Reference documentation for setting up, customizing, and deploying this markdown
|
||||
|
||||
**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
|
||||
- <span class="copy-command">npm run sync</span> - Sync markdown content
|
||||
- <span class="copy-command">npm run sync:discovery</span> - Update discovery files (AGENTS.md, llms.txt)
|
||||
- <span class="copy-command">npm run sync:all</span> - 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
|
||||
- <span class="copy-command">npm run sync:prod</span> - Sync markdown content
|
||||
- <span class="copy-command">npm run sync:discovery:prod</span> - Update discovery files
|
||||
- <span class="copy-command">npm run sync:all:prod</span> - Sync content + discovery files together
|
||||
|
||||
## Quick start
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ const sanitizeSchema = {
|
||||
p: ["style"], // Allow inline styles on p elements
|
||||
a: ["style", "href", "target", "rel"], // Allow inline styles on links
|
||||
img: [...(defaultSchema.attributes?.img || []), "style"], // Allow inline styles on images
|
||||
span: ["className", "class", "style"], // Allow class attribute on span for copy-command
|
||||
iframe: [
|
||||
"src",
|
||||
"width",
|
||||
@@ -71,6 +72,30 @@ function CodeCopyButton({ code }: { code: string }) {
|
||||
);
|
||||
}
|
||||
|
||||
// Inline copy button for commands in lists
|
||||
function InlineCopyButton({ command }: { command: string }) {
|
||||
const [copied, setCopied] = useState(false);
|
||||
|
||||
const handleCopy = async (e: React.MouseEvent) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
await navigator.clipboard.writeText(command);
|
||||
setCopied(true);
|
||||
setTimeout(() => setCopied(false), 2000);
|
||||
};
|
||||
|
||||
return (
|
||||
<button
|
||||
className="inline-copy-button"
|
||||
onClick={handleCopy}
|
||||
aria-label={copied ? "Copied!" : "Copy command"}
|
||||
title={copied ? "Copied!" : "Copy command"}
|
||||
>
|
||||
{copied ? <Check size={12} /> : <Copy size={12} />}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
// Image lightbox component
|
||||
function ImageLightbox({
|
||||
src,
|
||||
@@ -706,6 +731,19 @@ export default function BlogPost({
|
||||
td({ children }) {
|
||||
return <td className="blog-td">{children}</td>;
|
||||
},
|
||||
// Span component with copy-command support
|
||||
span({ className, children }) {
|
||||
if (className === "copy-command") {
|
||||
const command = getTextContent(children);
|
||||
return (
|
||||
<span className="copy-command">
|
||||
<code className="inline-code">{command}</code>
|
||||
<InlineCopyButton command={command} />
|
||||
</span>
|
||||
);
|
||||
}
|
||||
return <span className={className}>{children}</span>;
|
||||
},
|
||||
// Iframe component with domain whitelisting for YouTube and Twitter/X
|
||||
iframe(props) {
|
||||
const src = props.src as string;
|
||||
@@ -981,6 +1019,19 @@ export default function BlogPost({
|
||||
td({ children }) {
|
||||
return <td className="blog-td">{children}</td>;
|
||||
},
|
||||
// Span component with copy-command support
|
||||
span({ className, children }) {
|
||||
if (className === "copy-command") {
|
||||
const command = getTextContent(children);
|
||||
return (
|
||||
<span className="copy-command">
|
||||
<code className="inline-code">{command}</code>
|
||||
<InlineCopyButton command={command} />
|
||||
</span>
|
||||
);
|
||||
}
|
||||
return <span className={className}>{children}</span>;
|
||||
},
|
||||
// Iframe component with domain whitelisting for YouTube and Twitter/X
|
||||
iframe(props) {
|
||||
const src = props.src as string;
|
||||
|
||||
@@ -1729,6 +1729,48 @@ body {
|
||||
font-size: var(--font-size-inline-code);
|
||||
}
|
||||
|
||||
/* Copy command inline styles */
|
||||
.copy-command {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.copy-command .inline-code {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.inline-copy-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
transition:
|
||||
opacity 0.15s ease,
|
||||
background 0.15s ease,
|
||||
color 0.15s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.inline-copy-button:hover {
|
||||
opacity: 1;
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
border-color: var(--text-muted);
|
||||
}
|
||||
|
||||
.inline-copy-button:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* Image styles */
|
||||
.blog-image-wrapper {
|
||||
display: block;
|
||||
|
||||
Reference in New Issue
Block a user