@farming-labs/next 0.1.113 → 0.1.115
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/config.mjs +23 -11
- package/package.json +3 -3
package/dist/config.mjs
CHANGED
|
@@ -1077,8 +1077,10 @@ function buildAgentSpecRewrites() {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
];
|
|
1079
1079
|
}
|
|
1080
|
-
function buildLlmsTxtRewrites(entry) {
|
|
1081
|
-
const
|
|
1080
|
+
function buildLlmsTxtRewrites(entry, docsPath) {
|
|
1081
|
+
const internalBase = `/${normalizeRouteSegment(entry)}`;
|
|
1082
|
+
const publicBase = docsPath;
|
|
1083
|
+
const baseRoutes = Array.from(new Set([internalBase, publicBase].filter(Boolean)));
|
|
1082
1084
|
return [
|
|
1083
1085
|
{
|
|
1084
1086
|
source: DEFAULT_LLMS_TXT_ROUTE,
|
|
@@ -1096,14 +1098,24 @@ function buildLlmsTxtRewrites(entry) {
|
|
|
1096
1098
|
source: DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE,
|
|
1097
1099
|
destination: "/api/docs?format=llms-full"
|
|
1098
1100
|
},
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1101
|
+
...baseRoutes.flatMap((baseRoute) => [
|
|
1102
|
+
{
|
|
1103
|
+
source: `${baseRoute}/llms.txt`,
|
|
1104
|
+
destination: "/api/docs?format=llms"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
source: `${baseRoute}/llms-full.txt`,
|
|
1108
|
+
destination: "/api/docs?format=llms-full"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
source: `${baseRoute}/:section*/llms.txt`,
|
|
1112
|
+
destination: `/api/docs?format=llms§ion=${baseRoute}/:section*/llms.txt`
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
source: `${baseRoute}/:section*/llms-full.txt`,
|
|
1116
|
+
destination: `/api/docs?format=llms-full§ion=${baseRoute}/:section*/llms-full.txt`
|
|
1117
|
+
}
|
|
1118
|
+
])
|
|
1107
1119
|
];
|
|
1108
1120
|
}
|
|
1109
1121
|
function buildSkillMdRewrites() {
|
|
@@ -1310,7 +1322,7 @@ function mergeDocsMarkdownRewrites(entry, docsPath, mcp, sitemap, agentFeedback,
|
|
|
1310
1322
|
...buildDocsPathRewrites(entry, docsPath),
|
|
1311
1323
|
...buildAgentFeedbackRewrites(agentFeedback)
|
|
1312
1324
|
];
|
|
1313
|
-
const autoAfterFilesRewrites = buildLlmsTxtRewrites(entry);
|
|
1325
|
+
const autoAfterFilesRewrites = buildLlmsTxtRewrites(entry, docsPath);
|
|
1314
1326
|
if (!result) return {
|
|
1315
1327
|
beforeFiles: dedupeRewrites(autoBeforeFilesRewrites),
|
|
1316
1328
|
afterFiles: dedupeRewrites(autoAfterFilesRewrites)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.115",
|
|
4
4
|
"description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"tsdown": "^0.20.3",
|
|
101
101
|
"typescript": "^5.9.3",
|
|
102
102
|
"vitest": "^3.2.4",
|
|
103
|
-
"@farming-labs/docs": "0.1.
|
|
104
|
-
"@farming-labs/theme": "0.1.
|
|
103
|
+
"@farming-labs/docs": "0.1.115",
|
|
104
|
+
"@farming-labs/theme": "0.1.115"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@farming-labs/docs": ">=0.0.1",
|