@farm.js/create-app 0.1.0-beta.9 → 0.1.0-beta.91
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.
- package/README.md +39 -6
- package/bin/create-farm-app.js +8 -3
- package/dist/index.js +3291 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3287 -25
- package/dist/index.mjs.map +1 -1
- package/dist/utils.js +9 -6
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +9 -6
- package/dist/utils.mjs.map +1 -1
- package/package.json +5 -2
- package/templates/_integrations/better-auth/preact/farm.config.ts +20 -0
- package/templates/_integrations/better-auth/preact/src/app/dashboard/page.tsx +73 -0
- package/templates/_integrations/better-auth/preact/src/app/layout.tsx +14 -0
- package/templates/_integrations/better-auth/preact/src/app/page.tsx +36 -0
- package/templates/_integrations/better-auth/preact/src/app/sign-in/page.tsx +10 -0
- package/templates/_integrations/better-auth/preact/src/app/sign-up/page.tsx +10 -0
- package/templates/_integrations/better-auth/preact/src/components/auth-form.tsx +92 -0
- package/templates/_integrations/better-auth/preact/src/components/auth-shell.tsx +16 -0
- package/templates/_integrations/better-auth/preact/src/lib/auth-client.ts +5 -0
- package/templates/_integrations/better-auth/solid/farm.config.ts +20 -0
- package/templates/_integrations/better-auth/solid/src/app/dashboard/page.tsx +67 -0
- package/templates/_integrations/better-auth/solid/src/app/layout.tsx +14 -0
- package/templates/_integrations/better-auth/solid/src/app/page.tsx +36 -0
- package/templates/_integrations/better-auth/solid/src/app/sign-in/page.tsx +10 -0
- package/templates/_integrations/better-auth/solid/src/app/sign-up/page.tsx +10 -0
- package/templates/_integrations/better-auth/solid/src/components/auth-form.tsx +91 -0
- package/templates/_integrations/better-auth/solid/src/components/auth-shell.tsx +16 -0
- package/templates/_integrations/better-auth/solid/src/lib/auth-client.ts +5 -0
- package/templates/_integrations/better-auth/svelte/farm.config.ts +20 -0
- package/templates/_integrations/better-auth/svelte/src/app/dashboard/page.svelte +62 -0
- package/templates/_integrations/better-auth/svelte/src/app/layout.svelte +20 -0
- package/templates/_integrations/better-auth/svelte/src/app/page.svelte +32 -0
- package/templates/_integrations/better-auth/svelte/src/app/sign-in/page.svelte +10 -0
- package/templates/_integrations/better-auth/svelte/src/app/sign-up/page.svelte +10 -0
- package/templates/_integrations/better-auth/svelte/src/components/auth-form.svelte +83 -0
- package/templates/_integrations/better-auth/svelte/src/components/auth-shell.svelte +16 -0
- package/templates/_integrations/better-auth/svelte/src/components/resource-links.svelte +47 -0
- package/templates/_integrations/better-auth/svelte/src/lib/auth-client.ts +5 -0
- package/templates/_integrations/better-auth/vue/farm.config.ts +20 -0
- package/templates/_integrations/better-auth/vue/src/app/dashboard/page.vue +62 -0
- package/templates/_integrations/better-auth/vue/src/app/layout.vue +20 -0
- package/templates/_integrations/better-auth/vue/src/app/page.vue +34 -0
- package/templates/_integrations/better-auth/vue/src/app/sign-in/page.vue +12 -0
- package/templates/_integrations/better-auth/vue/src/app/sign-up/page.vue +12 -0
- package/templates/_integrations/better-auth/vue/src/components/auth-form.vue +86 -0
- package/templates/_integrations/better-auth/vue/src/components/auth-shell.vue +15 -0
- package/templates/_integrations/better-auth/vue/src/components/resource-links.vue +43 -0
- package/templates/_integrations/better-auth/vue/src/lib/auth-client.ts +5 -0
- package/templates/_renderers/preact/farm.config.ts +12 -0
- package/templates/_renderers/preact/package.json +26 -0
- package/templates/_renderers/preact/src/app/api/greeting/route.ts +15 -0
- package/templates/_renderers/preact/src/app/layout.tsx +16 -0
- package/templates/_renderers/preact/src/app/page.tsx +66 -0
- package/templates/_renderers/preact/src/app/preact.css +26 -0
- package/templates/_renderers/preact/src/components/resource-links.tsx +71 -0
- package/templates/_renderers/preact/src/lib/api-client.ts +4 -0
- package/templates/_renderers/preact/src/lib/api.generated.ts +7 -0
- package/templates/_renderers/preact/tsconfig.json +25 -0
- package/templates/_renderers/solid/farm.config.ts +12 -0
- package/templates/_renderers/solid/package.json +25 -0
- package/templates/_renderers/solid/src/app/api/greeting/route.ts +15 -0
- package/templates/_renderers/solid/src/app/layout.tsx +15 -0
- package/templates/_renderers/solid/src/app/page.tsx +56 -0
- package/templates/_renderers/solid/src/app/solid.css +22 -0
- package/templates/_renderers/solid/src/components/resource-links.tsx +71 -0
- package/templates/_renderers/solid/src/lib/api-client.ts +4 -0
- package/templates/_renderers/solid/src/lib/api.generated.ts +7 -0
- package/templates/_renderers/solid/tsconfig.json +25 -0
- package/templates/_renderers/svelte/farm.config.ts +9 -0
- package/templates/_renderers/svelte/package.json +28 -0
- package/templates/_renderers/svelte/src/app/api/greeting/route.ts +15 -0
- package/templates/_renderers/svelte/src/app/layout.svelte +21 -0
- package/templates/_renderers/svelte/src/app/page.svelte +64 -0
- package/templates/_renderers/svelte/src/app/svelte.css +26 -0
- package/templates/_renderers/svelte/src/components/resource-links.svelte +31 -0
- package/templates/_renderers/svelte/src/lib/api-client.ts +4 -0
- package/templates/_renderers/svelte/src/lib/api.generated.ts +7 -0
- package/templates/_renderers/svelte/tsconfig.json +23 -0
- package/templates/_renderers/vue/farm.config.ts +12 -0
- package/templates/_renderers/vue/package.json +26 -0
- package/templates/_renderers/vue/src/app/api/greeting/route.ts +15 -0
- package/templates/_renderers/vue/src/app/layout.vue +21 -0
- package/templates/_renderers/vue/src/app/page.vue +69 -0
- package/templates/_renderers/vue/src/app/vue.css +26 -0
- package/templates/_renderers/vue/src/components/resource-links.vue +33 -0
- package/templates/_renderers/vue/src/env.d.ts +7 -0
- package/templates/_renderers/vue/src/lib/api-client.ts +4 -0
- package/templates/_renderers/vue/src/lib/api.generated.ts +7 -0
- package/templates/_renderers/vue/tsconfig.json +23 -0
- package/templates/auth/.env.example +6 -0
- package/templates/auth/README.md +95 -0
- package/templates/auth/docs.config.ts +33 -0
- package/templates/auth/docs.json +36 -0
- package/templates/auth/farm.config.ts +20 -0
- package/templates/auth/gitignore +10 -0
- package/templates/auth/package.json +37 -0
- package/templates/auth/pnpm-workspace.yaml +13 -0
- package/templates/auth/src/app/dashboard/middleware.ts +13 -0
- package/templates/auth/src/app/dashboard/page.tsx +140 -0
- package/templates/auth/src/app/docs/page.md +29 -0
- package/templates/auth/src/app/error.tsx +25 -0
- package/templates/auth/src/app/globals.css +1064 -0
- package/templates/auth/src/app/layout.tsx +11 -0
- package/templates/auth/src/app/loading.tsx +15 -0
- package/templates/auth/src/app/not-found.tsx +26 -0
- package/templates/auth/src/app/page.tsx +46 -0
- package/templates/auth/src/app/sign-in/page.tsx +16 -0
- package/templates/auth/src/app/sign-up/page.tsx +16 -0
- package/templates/auth/src/components/auth-form.tsx +120 -0
- package/templates/auth/src/components/auth-shell.tsx +21 -0
- package/templates/auth/src/components/resource-links.tsx +78 -0
- package/templates/auth/src/components/sign-out-button.tsx +45 -0
- package/templates/auth/src/components/site-header.tsx +46 -0
- package/templates/auth/tsconfig.json +20 -0
- package/templates/basic/docs.config.ts +33 -0
- package/templates/basic/docs.json +36 -0
- package/templates/basic/farm.config.ts +9 -0
- package/templates/basic/package.json +10 -3
- package/templates/basic/pnpm-workspace.yaml +8 -0
- package/templates/basic/src/app/docs/page.md +29 -0
- package/templates/basic/src/app/globals.css +241 -0
- package/templates/basic/src/app/layout.tsx +3 -5
- package/templates/basic/src/app/page.tsx +20 -61
- package/templates/basic/src/components/resource-links.tsx +78 -0
- package/templates/basic/tsconfig.json +4 -0
- package/templates/better-auth/.env.example +3 -0
- package/templates/better-auth/README.md +95 -0
- package/templates/better-auth/docs.config.ts +33 -0
- package/templates/better-auth/docs.json +36 -0
- package/templates/better-auth/farm.config.ts +46 -0
- package/templates/better-auth/gitignore +10 -0
- package/templates/better-auth/package.json +40 -0
- package/templates/better-auth/pnpm-workspace.yaml +13 -0
- package/templates/better-auth/src/app/dashboard/middleware.ts +15 -0
- package/templates/better-auth/src/app/dashboard/page.tsx +188 -0
- package/templates/better-auth/src/app/docs/page.md +29 -0
- package/templates/better-auth/src/app/error.tsx +25 -0
- package/templates/better-auth/src/app/globals.css +1064 -0
- package/templates/better-auth/src/app/layout.tsx +11 -0
- package/templates/better-auth/src/app/loading.tsx +15 -0
- package/templates/better-auth/src/app/not-found.tsx +26 -0
- package/templates/better-auth/src/app/page.tsx +50 -0
- package/templates/better-auth/src/app/sign-in/page.tsx +16 -0
- package/templates/better-auth/src/app/sign-up/page.tsx +16 -0
- package/templates/better-auth/src/components/auth-form.tsx +120 -0
- package/templates/better-auth/src/components/auth-shell.tsx +21 -0
- package/templates/better-auth/src/components/resource-links.tsx +78 -0
- package/templates/better-auth/src/components/sign-out-button.tsx +45 -0
- package/templates/better-auth/src/components/site-header.tsx +46 -0
- package/templates/better-auth/src/lib/auth-client.ts +5 -0
- package/templates/better-auth/src/lib/auth.ts +46 -0
- package/templates/better-auth/src/lib/migrate-auth.ts +10 -0
- package/templates/better-auth/src/lib/session.ts +8 -0
- package/templates/better-auth/tsconfig.json +20 -0
- package/templates/react-compiler/README.md +62 -0
- package/templates/react-compiler/docs.config.ts +33 -0
- package/templates/react-compiler/docs.json +36 -0
- package/templates/react-compiler/farm.config.ts +29 -0
- package/templates/react-compiler/gitignore +23 -0
- package/templates/react-compiler/package.json +37 -0
- package/templates/react-compiler/pnpm-workspace.yaml +8 -0
- package/templates/react-compiler/public/favicon.svg +5 -0
- package/templates/react-compiler/scripts/verify-experiment.mjs +113 -0
- package/templates/react-compiler/src/app/docs/page.md +29 -0
- package/templates/react-compiler/src/app/globals.css +470 -0
- package/templates/react-compiler/src/app/layout.tsx +22 -0
- package/templates/react-compiler/src/app/page.tsx +47 -0
- package/templates/react-compiler/src/components/compiler-comparison.tsx +93 -0
- package/templates/react-compiler/src/components/resource-links.tsx +78 -0
- package/templates/react-compiler/src/farm.d.ts +74 -0
- package/templates/react-compiler/src/lib/api.generated.ts +10 -0
- package/templates/react-compiler/tsconfig.json +24 -0
- package/templates/basic/src/app/about/page.tsx +0 -32
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://docs.farming-labs.dev/schema/docs.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"entry": "docs",
|
|
5
|
+
"docsPath": "/docs",
|
|
6
|
+
"docs": {
|
|
7
|
+
"mode": "framework",
|
|
8
|
+
"runtime": "farm",
|
|
9
|
+
"root": "."
|
|
10
|
+
},
|
|
11
|
+
"content": {
|
|
12
|
+
"docsRoot": "src/app/docs"
|
|
13
|
+
},
|
|
14
|
+
"site": {
|
|
15
|
+
"name": "Farm App Docs"
|
|
16
|
+
},
|
|
17
|
+
"metadata": {
|
|
18
|
+
"description": "Documentation for your Farm.js app."
|
|
19
|
+
},
|
|
20
|
+
"nav": {
|
|
21
|
+
"title": "Farm App",
|
|
22
|
+
"url": "/"
|
|
23
|
+
},
|
|
24
|
+
"search": {
|
|
25
|
+
"provider": "simple",
|
|
26
|
+
"enabled": true,
|
|
27
|
+
"maxResults": 12
|
|
28
|
+
},
|
|
29
|
+
"llmsTxt": {
|
|
30
|
+
"enabled": true,
|
|
31
|
+
"siteTitle": "Farm App Docs",
|
|
32
|
+
"siteDescription": "Documentation for your Farm.js app."
|
|
33
|
+
},
|
|
34
|
+
"sitemap": true,
|
|
35
|
+
"robots": true
|
|
36
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineConfig } from "@farm.js/core";
|
|
2
|
+
import { react } from "@farm.js/react";
|
|
3
|
+
|
|
4
|
+
const compilerEnabled = process.env.FARM_REACT_COMPILER !== "false";
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
env: {
|
|
8
|
+
public: {
|
|
9
|
+
FARM_REACT_COMPILER_ENABLED: () => compilerEnabled,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
renderer: react({
|
|
13
|
+
experimental: {
|
|
14
|
+
compiler: compilerEnabled,
|
|
15
|
+
},
|
|
16
|
+
}),
|
|
17
|
+
theme: {
|
|
18
|
+
default: "dark",
|
|
19
|
+
},
|
|
20
|
+
// Docs are powered by the @farming-labs/farmjs framework. Farm auto-detects
|
|
21
|
+
// the installed adapter and reads docs.config.ts (docs.json is kept as a
|
|
22
|
+
// language-agnostic fallback/manifest); content lives in src/app/docs.
|
|
23
|
+
docs: {
|
|
24
|
+
enabled: true,
|
|
25
|
+
},
|
|
26
|
+
deploy: {
|
|
27
|
+
target: "node",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Farm and deployment output
|
|
5
|
+
.farm/
|
|
6
|
+
.output/
|
|
7
|
+
.vercel/
|
|
8
|
+
dist/
|
|
9
|
+
|
|
10
|
+
# Local environment files
|
|
11
|
+
.env
|
|
12
|
+
.env.local
|
|
13
|
+
.env.*.local
|
|
14
|
+
|
|
15
|
+
# Local databases
|
|
16
|
+
*.sqlite
|
|
17
|
+
*.sqlite-*
|
|
18
|
+
*.db
|
|
19
|
+
*.db-*
|
|
20
|
+
|
|
21
|
+
# Logs and TypeScript cache
|
|
22
|
+
*.log
|
|
23
|
+
*.tsbuildinfo
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "farmjs-react-compiler-starter",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "farm dev",
|
|
8
|
+
"build": "farm build",
|
|
9
|
+
"start": "farm start",
|
|
10
|
+
"experiment": "pnpm run build && node scripts/verify-experiment.mjs",
|
|
11
|
+
"type-check": "tsc --noEmit"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@farm.js/core": "0.1.0-beta.91",
|
|
15
|
+
"@farm.js/react": "0.1.0-beta.8",
|
|
16
|
+
"@farming-labs/docs": "0.2.111",
|
|
17
|
+
"@farming-labs/farmjs": "0.2.111",
|
|
18
|
+
"@farming-labs/theme": "0.2.111",
|
|
19
|
+
"@fontsource-variable/geist": "5.3.0",
|
|
20
|
+
"@fontsource-variable/geist-mono": "5.3.0",
|
|
21
|
+
"react": "19.2.8",
|
|
22
|
+
"react-dom": "19.2.8"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@farm.js/cli": "0.1.0-beta.91",
|
|
26
|
+
"@playwright/test": "^1.52.0",
|
|
27
|
+
"@types/react": "^19.0.0",
|
|
28
|
+
"@types/react-dom": "^19.0.0",
|
|
29
|
+
"tailwindcss": "^4.0.0",
|
|
30
|
+
"typescript": "^5.3.3",
|
|
31
|
+
"vite": "^5.0.10"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=22.13.0"
|
|
35
|
+
},
|
|
36
|
+
"packageManager": "pnpm@8.12.1"
|
|
37
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
import { access } from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { chromium } from "@playwright/test";
|
|
6
|
+
|
|
7
|
+
const port = Number(process.env.FARM_EXPERIMENT_PORT || 4327);
|
|
8
|
+
const origin = `http://127.0.0.1:${port}`;
|
|
9
|
+
const compilerEnabled = process.env.FARM_REACT_COMPILER !== "false";
|
|
10
|
+
const serverEntry = path.resolve(".farm/.output/server/index.mjs");
|
|
11
|
+
const screenshotPath =
|
|
12
|
+
process.env.FARM_EXPERIMENT_SCREENSHOT || "/tmp/farm-react-compiler-starter.png";
|
|
13
|
+
|
|
14
|
+
await access(serverEntry);
|
|
15
|
+
|
|
16
|
+
let serverOutput = "";
|
|
17
|
+
const server = spawn(process.execPath, [serverEntry], {
|
|
18
|
+
env: {
|
|
19
|
+
...process.env,
|
|
20
|
+
HOST: "127.0.0.1",
|
|
21
|
+
NITRO_HOST: "127.0.0.1",
|
|
22
|
+
NITRO_PORT: String(port),
|
|
23
|
+
PORT: String(port),
|
|
24
|
+
},
|
|
25
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
server.stdout.on("data", (chunk) => {
|
|
29
|
+
serverOutput += chunk;
|
|
30
|
+
});
|
|
31
|
+
server.stderr.on("data", (chunk) => {
|
|
32
|
+
serverOutput += chunk;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
async function waitForServer() {
|
|
36
|
+
for (let attempt = 0; attempt < 120; attempt += 1) {
|
|
37
|
+
if (server.exitCode !== null) {
|
|
38
|
+
throw new Error(`Production server exited early.\n${serverOutput}`);
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
const response = await fetch(origin);
|
|
42
|
+
if (response.ok) return;
|
|
43
|
+
} catch {
|
|
44
|
+
// The server is still starting.
|
|
45
|
+
}
|
|
46
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
47
|
+
}
|
|
48
|
+
throw new Error(`Production server did not start.\n${serverOutput}`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function readNumber(page, selector) {
|
|
52
|
+
return Number((await page.locator(selector).textContent())?.trim());
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
let browser;
|
|
56
|
+
try {
|
|
57
|
+
await waitForServer();
|
|
58
|
+
browser = await chromium.launch({ headless: true });
|
|
59
|
+
const page = await browser.newPage({ viewport: { width: 1280, height: 900 } });
|
|
60
|
+
const browserErrors = [];
|
|
61
|
+
|
|
62
|
+
page.on("console", (message) => {
|
|
63
|
+
if (message.type() === "error") browserErrors.push(message.text());
|
|
64
|
+
});
|
|
65
|
+
page.on("pageerror", (error) => browserErrors.push(error.message));
|
|
66
|
+
|
|
67
|
+
await page.goto(origin, { waitUntil: "networkidle" });
|
|
68
|
+
await page.getByRole("heading", { name: /compiler handles the rest/i }).waitFor();
|
|
69
|
+
assert.equal(
|
|
70
|
+
(await page.locator("[data-compiler-status]").textContent())?.trim(),
|
|
71
|
+
`experimental.compiler: ${String(compilerEnabled)}`,
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const executions = {};
|
|
75
|
+
for (const pathName of ["compiled", "react"]) {
|
|
76
|
+
const root = `[data-path="${pathName}"]`;
|
|
77
|
+
executions[pathName] = {
|
|
78
|
+
initial: await readNumber(page, `${root} [data-metric="executions"]`),
|
|
79
|
+
};
|
|
80
|
+
await page.locator(`${root} [data-action="update"]`).click();
|
|
81
|
+
await page.locator(`${root} [data-action="update"]`).click();
|
|
82
|
+
await page.waitForFunction(
|
|
83
|
+
(selector) => document.querySelector(selector)?.textContent?.trim() === "2",
|
|
84
|
+
`${root} [data-metric="state"]`,
|
|
85
|
+
);
|
|
86
|
+
executions[pathName].final = await readNumber(page, `${root} [data-metric="executions"]`);
|
|
87
|
+
executions[pathName].added = executions[pathName].final - executions[pathName].initial;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
assert.equal(executions.compiled.added, compilerEnabled ? 0 : 2);
|
|
91
|
+
assert.equal(executions.react.added, 2);
|
|
92
|
+
assert.deepEqual(browserErrors, []);
|
|
93
|
+
|
|
94
|
+
await page.screenshot({ path: screenshotPath, fullPage: true });
|
|
95
|
+
|
|
96
|
+
console.log(
|
|
97
|
+
JSON.stringify(
|
|
98
|
+
{
|
|
99
|
+
result: "PASS",
|
|
100
|
+
productionUrl: origin,
|
|
101
|
+
screenshot: screenshotPath,
|
|
102
|
+
compilerEnabled,
|
|
103
|
+
compiledUpdateExecutions: executions.compiled.added,
|
|
104
|
+
reactUpdateExecutions: executions.react.added,
|
|
105
|
+
},
|
|
106
|
+
null,
|
|
107
|
+
2,
|
|
108
|
+
),
|
|
109
|
+
);
|
|
110
|
+
} finally {
|
|
111
|
+
await browser?.close();
|
|
112
|
+
server.kill("SIGTERM");
|
|
113
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Getting Started"
|
|
3
|
+
description: "Your Farm.js documentation, powered by the @farming-labs/farmjs docs framework."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Getting Started
|
|
7
|
+
|
|
8
|
+
These docs are served by the Farm docs runtime, powered by the
|
|
9
|
+
[@farming-labs/farmjs](https://www.npmjs.com/package/@farming-labs/farmjs) docs
|
|
10
|
+
framework. The same Markdown files power human pages, Markdown routes,
|
|
11
|
+
`llms.txt`, the sitemap, search, and agent discovery through `/api/docs`.
|
|
12
|
+
|
|
13
|
+
## Edit this page
|
|
14
|
+
|
|
15
|
+
This page lives at `src/app/docs/page.md`. Add more pages as folders with their
|
|
16
|
+
own `page.md` — for example `src/app/docs/configuration/page.md` is served at
|
|
17
|
+
`/docs/configuration`.
|
|
18
|
+
|
|
19
|
+
## Configure
|
|
20
|
+
|
|
21
|
+
Site-wide docs settings live in `docs.config.ts` at the project root (title,
|
|
22
|
+
navigation, search, `llms.txt`, sitemap, and robots). Farm auto-detects the
|
|
23
|
+
installed adapter because `farm.config.ts` sets `docs: { enabled: true }` — no
|
|
24
|
+
manual wiring required.
|
|
25
|
+
|
|
26
|
+
## Learn more
|
|
27
|
+
|
|
28
|
+
- [Farm.js documentation](https://farmjs.dev/docs)
|
|
29
|
+
- [Configuration guide](https://farmjs.dev/docs/configuration)
|