@farming-labs/theme 0.1.25 → 0.1.27
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/dist/docs-api.mjs +15 -1
- package/package.json +2 -2
package/dist/docs-api.mjs
CHANGED
|
@@ -149,12 +149,25 @@ function resolveAgentSpecRequest(url) {
|
|
|
149
149
|
if (url.searchParams.get("agent")?.trim() === "spec") return true;
|
|
150
150
|
return normalizeUrlPath(url.pathname) === DEFAULT_AGENT_SPEC_ROUTE;
|
|
151
151
|
}
|
|
152
|
-
function buildAgentSpec({ origin, entry, mcp, feedback, llms }) {
|
|
152
|
+
function buildAgentSpec({ origin, entry, i18n, mcp, feedback, llms }) {
|
|
153
153
|
const normalizedEntry = normalizePathSegment(entry) || "docs";
|
|
154
154
|
return {
|
|
155
155
|
version: "1",
|
|
156
156
|
name: "@farming-labs/docs",
|
|
157
157
|
baseUrl: origin,
|
|
158
|
+
site: {
|
|
159
|
+
title: llms.siteTitle ?? "Documentation",
|
|
160
|
+
description: llms.siteDescription,
|
|
161
|
+
entry: normalizedEntry,
|
|
162
|
+
baseUrl: llms.baseUrl ?? origin
|
|
163
|
+
},
|
|
164
|
+
locales: {
|
|
165
|
+
enabled: i18n !== null,
|
|
166
|
+
available: i18n?.locales ?? [],
|
|
167
|
+
default: i18n?.defaultLocale ?? null,
|
|
168
|
+
queryParam: "lang",
|
|
169
|
+
fallbackQueryParam: "locale"
|
|
170
|
+
},
|
|
158
171
|
api: {
|
|
159
172
|
docs: DEFAULT_DOCS_API_ROUTE,
|
|
160
173
|
agentSpec: DEFAULT_AGENT_SPEC_ROUTE,
|
|
@@ -995,6 +1008,7 @@ function createDocsAPI(options) {
|
|
|
995
1008
|
if (resolveAgentSpecRequest(url)) return Response.json(buildAgentSpec({
|
|
996
1009
|
origin: url.origin,
|
|
997
1010
|
entry,
|
|
1011
|
+
i18n,
|
|
998
1012
|
mcp: mcpConfig,
|
|
999
1013
|
feedback: agentFeedbackConfig,
|
|
1000
1014
|
llms: llmsConfig
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/theme",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "Theme package for @farming-labs/docs — layout, provider, MDX components, and styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"tsdown": "^0.20.3",
|
|
134
134
|
"typescript": "^5.9.3",
|
|
135
135
|
"vitest": "^3.2.4",
|
|
136
|
-
"@farming-labs/docs": "0.1.
|
|
136
|
+
"@farming-labs/docs": "0.1.27"
|
|
137
137
|
},
|
|
138
138
|
"peerDependencies": {
|
|
139
139
|
"@farming-labs/docs": ">=0.0.1",
|