@farming-labs/next 0.1.86 → 0.1.89
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 +12 -2
- package/package.json +3 -3
package/dist/config.mjs
CHANGED
|
@@ -85,6 +85,7 @@ export const { GET, POST } = createDocsAPI({
|
|
|
85
85
|
changelog: docsConfig.changelog,
|
|
86
86
|
feedback: docsConfig.feedback,
|
|
87
87
|
mcp: docsConfig.mcp,
|
|
88
|
+
llmsTxt: docsConfig.llmsTxt,
|
|
88
89
|
sitemap: docsConfig.sitemap,
|
|
89
90
|
search: docsConfig.search,
|
|
90
91
|
analytics: docsConfig.analytics,
|
|
@@ -868,7 +869,8 @@ function buildAgentSpecRewrites() {
|
|
|
868
869
|
}
|
|
869
870
|
];
|
|
870
871
|
}
|
|
871
|
-
function buildLlmsTxtRewrites() {
|
|
872
|
+
function buildLlmsTxtRewrites(entry) {
|
|
873
|
+
const normalizedEntry = entry.replace(/^\/+|\/+$/g, "") || "docs";
|
|
872
874
|
return [
|
|
873
875
|
{
|
|
874
876
|
source: DEFAULT_LLMS_TXT_ROUTE,
|
|
@@ -885,6 +887,14 @@ function buildLlmsTxtRewrites() {
|
|
|
885
887
|
{
|
|
886
888
|
source: DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE,
|
|
887
889
|
destination: "/api/docs?format=llms-full"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
source: `/${normalizedEntry}/:section*/llms.txt`,
|
|
893
|
+
destination: `/api/docs?format=llms§ion=/${normalizedEntry}/:section*/llms.txt`
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
source: `/${normalizedEntry}/:section*/llms-full.txt`,
|
|
897
|
+
destination: `/api/docs?format=llms-full§ion=/${normalizedEntry}/:section*/llms-full.txt`
|
|
888
898
|
}
|
|
889
899
|
];
|
|
890
900
|
}
|
|
@@ -1052,7 +1062,7 @@ function mergeDocsMarkdownRewrites(entry, mcp, sitemap, agentFeedback, result) {
|
|
|
1052
1062
|
const autoRewrites = [
|
|
1053
1063
|
...buildAgentSpecRewrites(),
|
|
1054
1064
|
...buildMcpRewrites(mcp),
|
|
1055
|
-
...buildLlmsTxtRewrites(),
|
|
1065
|
+
...buildLlmsTxtRewrites(entry),
|
|
1056
1066
|
...buildSkillMdRewrites(),
|
|
1057
1067
|
...buildSitemapRewrites(sitemap),
|
|
1058
1068
|
...buildDocsMarkdownRewrites(entry),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.89",
|
|
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.89",
|
|
104
|
+
"@farming-labs/theme": "0.1.89"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@farming-labs/docs": ">=0.0.1",
|