@farming-labs/docs 0.2.49 → 0.2.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +120 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,120 @@
1
+ # @farming-labs/docs
2
+
3
+ AI-native documentation for Next.js, TanStack Start, SvelteKit, Astro, and Nuxt.
4
+
5
+ Write Markdown or MDX, configure your docs in TypeScript, and ship a polished documentation
6
+ experience for people, IDEs, and AI agents. `@farming-labs/docs` provides the shared configuration,
7
+ types, content pipeline, agent tooling, and CLI used by the Farming Labs framework adapters.
8
+
9
+ ## Features
10
+
11
+ - One `docs.config.ts` file for routing, themes, search, metadata, feedback, and AI features
12
+ - Framework adapters for Next.js, TanStack Start, SvelteKit, Astro, and Nuxt
13
+ - Built-in themes and MDX components such as `Callout`, `Tabs`, `HoverLink`, and `Prompt`
14
+ - Built-in search, generated API references, and Next.js changelog pages
15
+ - Machine-readable `.md` routes, `llms.txt`, sitemaps, JSON-LD, agent discovery, and MCP
16
+ - CLI workflows for scaffolding, upgrades, documentation health checks, and static agent files
17
+
18
+ ## Quick start
19
+
20
+ Run the interactive setup inside an existing project:
21
+
22
+ ```bash
23
+ npx @farming-labs/docs@latest init
24
+ ```
25
+
26
+ Or bootstrap a new documentation project from a template:
27
+
28
+ ```bash
29
+ npx @farming-labs/docs@latest init --template next --name my-docs
30
+ ```
31
+
32
+ Available templates are `next`, `tanstack-start`, `sveltekit`, `astro`, and `nuxt`. The CLI installs
33
+ the packages for your framework, creates the config and starter pages, and adds the theme CSS.
34
+
35
+ ## Framework packages
36
+
37
+ | Framework | Core and adapter | Theme |
38
+ | --- | --- | --- |
39
+ | Next.js | `@farming-labs/docs`, `@farming-labs/next` | `@farming-labs/theme` |
40
+ | TanStack Start | `@farming-labs/docs`, `@farming-labs/tanstack-start` | `@farming-labs/theme` |
41
+ | SvelteKit | `@farming-labs/docs`, `@farming-labs/svelte` | `@farming-labs/svelte-theme` |
42
+ | Astro | `@farming-labs/docs`, `@farming-labs/astro` | `@farming-labs/astro-theme` |
43
+ | Nuxt | `@farming-labs/docs`, `@farming-labs/nuxt` | `@farming-labs/nuxt-theme` |
44
+
45
+ ## Basic configuration
46
+
47
+ Every framework uses `defineDocs()`. A minimal Next.js config looks like this:
48
+
49
+ ```ts
50
+ import { defineDocs } from "@farming-labs/docs";
51
+ import { fumadocs } from "@farming-labs/theme";
52
+
53
+ export default defineDocs({
54
+ entry: "docs",
55
+ theme: fumadocs(),
56
+ metadata: {
57
+ titleTemplate: "%s – Docs",
58
+ description: "My documentation site",
59
+ },
60
+ });
61
+ ```
62
+
63
+ Next.js projects also wrap `next.config.ts`:
64
+
65
+ ```ts
66
+ import { withDocs } from "@farming-labs/next/config";
67
+
68
+ export default withDocs();
69
+ ```
70
+
71
+ Import your selected theme in the app's global stylesheet:
72
+
73
+ ```css
74
+ @import "tailwindcss";
75
+ @import "@farming-labs/theme/default/css";
76
+ ```
77
+
78
+ Import the CSS for the selected preset. The default `fumadocs()` preset uses
79
+ `@farming-labs/theme/default/css`. SvelteKit, Astro, and Nuxt import their theme helpers from the
80
+ corresponding packages shown above; the CLI wires up the right config and CSS automatically.
81
+
82
+ ## Write content in Markdown or MDX
83
+
84
+ ```mdx
85
+ ---
86
+ title: "Installation"
87
+ description: "Get up and running"
88
+ ---
89
+
90
+ # Installation
91
+
92
+ Your documentation starts here.
93
+ ```
94
+
95
+ Routing is file-based, so a page such as `app/docs/guides/deployment/page.mdx` becomes
96
+ `/docs/guides/deployment` in Next.js. The CLI scaffolds the correct directory layout for every
97
+ supported framework.
98
+
99
+ ## Documentation for agents
100
+
101
+ Farming Labs can expose the same docs in machine-readable forms, including:
102
+
103
+ - `llms.txt` and full-document feeds
104
+ - Markdown routes for individual pages
105
+ - `skill.md`, `AGENTS.md`, and agent discovery endpoints
106
+ - A built-in Model Context Protocol (MCP) server
107
+ - Schema.org JSON-LD, sitemaps, and generated `robots.txt`
108
+ - Agent-focused health checks with `docs doctor --agent`
109
+
110
+ ## Learn more
111
+
112
+ - [Documentation](https://docs.farming-labs.dev/docs)
113
+ - [Configuration reference](https://docs.farming-labs.dev/docs/configuration)
114
+ - [Themes](https://docs.farming-labs.dev/docs/themes)
115
+ - [Examples](https://github.com/farming-labs/docs/tree/main/examples)
116
+ - [GitHub repository](https://github.com/farming-labs/docs)
117
+
118
+ ## License
119
+
120
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/docs",
3
- "version": "0.2.49",
3
+ "version": "0.2.50",
4
4
  "description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
5
5
  "keywords": [
6
6
  "docs",