Skip to content

feat: devtools editor & advanced mdx collocations#200

Draft
Kinfe123 wants to merge 4 commits into
mainfrom
feat/devtools-editor
Draft

feat: devtools editor & advanced mdx collocations#200
Kinfe123 wants to merge 4 commits into
mainfrom
feat/devtools-editor

Conversation

@Kinfe123
Copy link
Copy Markdown
Member

@Kinfe123 Kinfe123 commented May 20, 2026

Summary by cubic

Adds a built‑in DevTools visual MDX editor to edit docs in place, switch themes, and publish previews during local development. Also streamlines theme UX by removing forced Tabs style defaults across all presets.

  • New Features

    • devTools in defineDocs: boolean or DevToolsConfig; types exported in @farming-labs/docs and fumadocs.
    • Visual editor UI (DocsDevTools) injected on docs pages in local dev; reads/writes the current page via /api/docs?devtools=page.
    • Public path → source mapping respects custom docsPath when writing back to app/docs/**/page.mdx.
    • Theme and nav editing: /api/docs?devtools=theme updates app/global.css and docs.config.tsx; /api/docs?devtools=nav-item updates frontmatter title. Publish Preview via /api/docs?devtools=publish (requires FARMING_CLOUD_API_KEY or FARMING_API_KEY).
    • Local-only guard: DevTools API returns 404 unless enabled and the request is local/non-production; UI hidden when staticExport: true.
    • Exports DocsDevTools from fumadocs; docs-page client wires docsApiUrl. Tests cover read/write, path mapping, disabled state, and cloud credential requirements.
  • Migration

    • Enable locally: devTools: true in defineDocs({ entry: "docs", ... }).
    • To publish previews, set FARMING_CLOUD_API_KEY (or FARMING_API_KEY).

Written for commit 97606e3. Summary will update on new commits. Review in cubic

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment May 22, 2026 11:43am

@Kinfe123 Kinfe123 changed the title Feat/devtools editor feat: devtools editor & advanced mdx collocations May 20, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 20, 2026

Open in StackBlitz

@farming-labs/astro

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro@200

@farming-labs/astro-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro-theme@200

@farming-labs/docs

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/docs@200

@farming-labs/theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/theme@200

@farming-labs/next

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/next@200

@farming-labs/nuxt

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt@200

@farming-labs/nuxt-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt-theme@200

@farming-labs/svelte

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte@200

@farming-labs/svelte-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte-theme@200

@farming-labs/tanstack-start

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/tanstack-start@200

commit: 97606e3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant