Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
577bbec
Remove clean markdown generation and artifacts.
jottakka Feb 27, 2026
c0be9ee
Remove clean markdown generation and related artifacts.
jottakka Mar 2, 2026
295befb
refactor: replace markdownToHtml+addHTMLFile with addCustomRecord in …
jottakka Mar 2, 2026
b78df10
chore: update lockfile after removing remark/rehype deps
jottakka Mar 2, 2026
492ef4a
fix: restore addHTMLFile for structured search results
jottakka Mar 2, 2026
4df8428
chore: disable llmstxt workflow on PRs (fix in next PR)
jottakka Mar 2, 2026
66cb470
Merge main into cleanup/remove-clean-markdown
jottakka Mar 2, 2026
9fe2c4f
feat: clean MDX in markdown API route, fix copy buttons, re-enable ll…
jottakka Mar 2, 2026
306f8e0
🤖 Regenerate LLMs.txt
github-actions[bot] Mar 2, 2026
6d64099
fix: remove cleanMdxToMarkdown — Cloudflare handles MDX conversion
jottakka Mar 2, 2026
e264848
fix: update stale git SHA in llms.txt
jottakka Mar 2, 2026
d203d34
chore: force llms.txt full regeneration
jottakka Mar 2, 2026
490b4fe
🤖 Regenerate LLMs.txt
github-actions[bot] Mar 2, 2026
fb23a34
refactor: remove /api/markdown route and middleware content negotiation
jottakka Mar 2, 2026
1c81482
fix: restore Algolia search component from main (lost in merge)
jottakka Mar 2, 2026
7ee60c7
refactor: remove dead toolkit markdown generation pipeline
jottakka Mar 2, 2026
cd65017
Merge remote-tracking branch 'origin/main' into cleanup/remove-clean-…
jottakka Mar 2, 2026
ffcf096
fix: remove custom copy button from toolkit pages, use default Nextra…
jottakka Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 0 additions & 90 deletions .github/workflows/generate-markdown.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/llmstxt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@ name: Generate LLMs.txt

on:
workflow_dispatch:
push:
branches:
- main
paths:
- "app/en/**/*.mdx"
- "app/en/**/_meta.tsx"
- "scripts/generate-llmstxt.ts"
pull_request:
types: [opened, synchronize, reopened]
paths:
- "app/en/**/*.mdx"
- "app/en/**/_meta.tsx"
- "scripts/generate-llmstxt.ts"

permissions:
contents: write
Expand Down Expand Up @@ -73,6 +84,12 @@ jobs:
evantahler
torresmateo

- name: Request team review
if: steps.check-changes.outputs.has_changes == 'true' && steps.cpr.outputs.pull-request-number != ''
continue-on-error: true
run: gh pr edit ${{ steps.cpr.outputs.pull-request-number }} --add-reviewer ArcadeAI/engineering-tools-and-dx
env:
GH_TOKEN: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}
- name: Enable Pull Request Automerge
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name != 'pull_request'
run: gh pr merge --squash --auto ${{ steps.cpr.outputs.pull-request-number }}
Expand Down
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pnpm vale:check # Check docs against style rules
```

Run a single test:

```bash
pnpm vitest run tests/broken-link-check.test.ts
```
Expand All @@ -26,7 +27,7 @@ pnpm vitest run tests/broken-link-check.test.ts
- **`app/_lib/`** — Data-fetching utilities (toolkit catalog, slug generation, static params).
- **`app/api/`** — API routes (markdown export, toolkit-data, glossary).
- **`toolkit-docs-generator/`** — Generates MCP toolkit documentation from server metadata JSON files in `toolkit-docs-generator/data/toolkits/`.
- **`scripts/`** — Build/CI scripts (clean markdown export, Vale style fixes, redirect checking, pagefind indexing, i18n sync).
- **`scripts/`** — Build/CI scripts (Vale style fixes, redirect checking, pagefind indexing, i18n sync).
- **`tests/`** — Vitest tests (broken links, internal link validation, sitemap, smoke tests).
- **`lib/`** — Next.js utilities (glossary remark plugin, llmstxt plugin).
- **`next.config.ts`** — Contains ~138 redirect rules.
Expand Down
7 changes: 4 additions & 3 deletions app/_components/copy-page-override.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ const DROPDOWN_IDENTIFIER = "Markdown for LLMs";

/**
* This component overrides the default nextra-theme-docs "Copy page" button behavior
* to fetch clean markdown from our API instead of copying raw MDX source.
* to fetch markdown from our API instead of copying raw MDX source.
*/
export function CopyPageOverride() {
const pathname = usePathname();

const fetchAndCopyMarkdown = useCallback(async (): Promise<boolean> => {
try {
const markdownUrl = `/api/markdown${pathname}.md`;
const response = await fetch(markdownUrl);
const response = await fetch(pathname, {
headers: { Accept: "text/markdown" },
});

if (!response.ok) {
throw new Error(`Failed to fetch markdown: ${response.status}`);
Expand Down
69 changes: 1 addition & 68 deletions app/_components/toolkit-docs/components/page-actions.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
"use client";

import { Check, Copy, ExternalLink } from "lucide-react";
import { usePathname } from "next/navigation";
import { useCallback, useState } from "react";
import { ExternalLink } from "lucide-react";

const GITHUB_JSON_BASE_URL =
"https://github.com/ArcadeAI/docs/blob/main/toolkit-docs-generator/data/toolkits";
const COPY_FEEDBACK_MS = 2000;

/**
* Builds the GitHub URL for editing the toolkit JSON file.
*/
function buildGithubEditUrl(toolkitId: string): string {
const jsonFileName = `${toolkitId.toLowerCase()}.json`;
return `${GITHUB_JSON_BASE_URL}/${jsonFileName}`;
Expand All @@ -20,11 +14,6 @@ type EditJsonOnGithubProps = {
toolkitId: string;
};

/**
* EditJsonOnGithub
*
* Renders a link to edit the toolkit JSON file on GitHub.
*/
export function EditJsonOnGithub({ toolkitId }: EditJsonOnGithubProps) {
const editUrl = buildGithubEditUrl(toolkitId);

Expand All @@ -42,72 +31,16 @@ export function EditJsonOnGithub({ toolkitId }: EditJsonOnGithubProps) {
);
}

/**
* CopyPageButton
*
* Simple button that copies the generated markdown content on click.
* Styled to match Nextra's native copy button.
*/
function CopyPageButton() {
const pathname = usePathname();
const [copied, setCopied] = useState(false);
const [loading, setLoading] = useState(false);

const handleCopy = useCallback(async () => {
if (loading) {
return;
}

setLoading(true);
try {
const response = await fetch(`/api/markdown${pathname}.md`);
if (!response.ok) {
throw new Error("Failed to fetch markdown");
}
const content = await response.text();
await navigator.clipboard.writeText(content);
setCopied(true);
setTimeout(() => setCopied(false), COPY_FEEDBACK_MS);
} catch {
// Silent fail - user can retry
} finally {
setLoading(false);
}
}, [pathname, loading]);

return (
<button
className="inline-flex items-center gap-2 rounded-md border border-neutral-700 bg-neutral-800/50 px-3 py-1.5 font-medium text-sm text-neutral-200 transition-colors hover:bg-neutral-700/50 disabled:opacity-50"
disabled={loading}
onClick={handleCopy}
type="button"
>
{copied ? (
<Check className="h-4 w-4 text-green-400" />
) : (
<Copy className="h-4 w-4" />
)}
{copied ? "Copied!" : "Copy page"}
</button>
);
}

type PageActionsBarProps = {
toolkitId: string;
};

/**
* PageActionsBar
*
* Renders the page actions bar with copy button and edit link.
*/
export function PageActionsBar({ toolkitId }: PageActionsBarProps) {
return (
<div
className="mb-4 flex flex-wrap items-center justify-end gap-4"
data-toolkit-page-actions
>
<CopyPageButton />
<EditJsonOnGithub toolkitId={toolkitId} />
</div>
);
Expand Down
Loading