@farming-labs/theme 0.1.122 → 0.1.123

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.
@@ -58,7 +58,7 @@ interface DocsAPIOptions {
58
58
  mcp?: boolean | DocsMcpConfig;
59
59
  /** llms.txt configuration. Enabled by default; set false to opt out. */
60
60
  llmsTxt?: boolean | LlmsTxtOptions;
61
- /** Sitemap configuration used for sitemap.xml and sitemap.md. */
61
+ /** Sitemap configuration used for sitemap.xml, sitemap.md, and docs/sitemap.md. */
62
62
  sitemap?: boolean | DocsSitemapConfig;
63
63
  /** Robots.txt generation policy used for the agent discovery spec. */
64
64
  robots?: boolean | DocsRobotsConfig;
package/dist/docs-api.mjs CHANGED
@@ -3,7 +3,7 @@ import { getNextAppDir } from "./get-app-dir.mjs";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import matter from "gray-matter";
6
- import { buildDocsAskAIContext, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsRobotsResponse, createDocsSitemapResponse, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownVaryHeader, hasDocsMarkdownSignatureAgent, normalizeDocsRelated, performDocsSearch, renderDocsLlmsTxt, renderDocsMarkdownNotFound, renderDocsRelatedMarkdownLines, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsI18n, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsSitemapConfig, resolvePageSidebarFolderIndexBehavior, resolveSearchRequestConfig, selectDocsLlmsTxtContent } from "@farming-labs/docs";
6
+ import { DEFAULT_SITEMAP_MD_DOCS_ROUTE, buildDocsAskAIContext, createDocsAgentTraceContext, createDocsAgentTraceId, createDocsRobotsResponse, createDocsSitemapResponse, emitDocsAgentTraceEvent, emitDocsAnalyticsEvent, formatDocsAskAIPackageHints, getDocsLlmsTxtMaxCharsIssue, getDocsMarkdownVaryHeader, hasDocsMarkdownSignatureAgent, normalizeDocsRelated, performDocsSearch, renderDocsLlmsTxt, renderDocsMarkdownNotFound, renderDocsRelatedMarkdownLines, resolveAskAISearchRequestConfig, resolveChangelogConfig, resolveDocsI18n, resolveDocsLlmsTxtRequest, resolveDocsLlmsTxtSections, resolveDocsLocale, resolveDocsSitemapConfig, resolvePageSidebarFolderIndexBehavior, resolveSearchRequestConfig, selectDocsLlmsTxtContent } from "@farming-labs/docs";
7
7
  import { buildApiReferenceOpenApiDocumentAsync, createDocsMcpHttpHandler, createFilesystemDocsMcpSource, readDocsSitemapManifest, resolveApiReferenceConfig, resolveDocsMcpConfig } from "@farming-labs/docs/server";
8
8
 
9
9
  //#region src/docs-api.ts
@@ -297,8 +297,10 @@ function buildAgentSpec({ origin, entry, i18n, search, mcp, feedback, llms, site
297
297
  markdown: {
298
298
  enabled: sitemapConfig.markdown.enabled,
299
299
  route: sitemapConfig.markdown.route,
300
+ docsRoute: sitemapConfig.markdown.docsRoute,
300
301
  wellKnownRoute: sitemapConfig.markdown.wellKnownRoute,
301
- api: `${DEFAULT_DOCS_API_ROUTE}?format=sitemap-md`
302
+ api: `${DEFAULT_DOCS_API_ROUTE}?format=sitemap-md`,
303
+ defaultDocsRoute: DEFAULT_SITEMAP_MD_DOCS_ROUTE
302
304
  }
303
305
  },
304
306
  robots: {
@@ -1167,7 +1169,7 @@ function renderSkillDocument({ origin, entry, search, mcp, feedback, llms, sitem
1167
1169
  }
1168
1170
  if (sitemapConfig.enabled) {
1169
1171
  if (sitemapConfig.xml.enabled) lines.push(`- Sitemap XML: ${sitemapConfig.xml.route}`);
1170
- if (sitemapConfig.markdown.enabled) lines.push(`- Sitemap Markdown: ${sitemapConfig.markdown.route}`, `- Sitemap well-known alias: ${sitemapConfig.markdown.wellKnownRoute}`);
1172
+ if (sitemapConfig.markdown.enabled) lines.push(`- Sitemap Markdown: ${sitemapConfig.markdown.route}`, ...sitemapConfig.markdown.docsRoute ? [`- Sitemap docs alias: ${sitemapConfig.markdown.docsRoute}`] : [], `- Sitemap well-known alias: ${sitemapConfig.markdown.wellKnownRoute}`);
1171
1173
  }
1172
1174
  if (mcp.enabled) lines.push(`- MCP: ${DEFAULT_MCP_PUBLIC_ROUTE}, ${DEFAULT_MCP_WELL_KNOWN_ROUTE}`);
1173
1175
  lines.push("", "## Reusable Framework Skills", "For framework setup, CLI, page actions, Ask AI, or configuration work, install the reusable Farming Labs skills:", "", "```sh", "npx skills add farming-labs/docs", "```");
@@ -1213,7 +1215,7 @@ function renderAgentsDocument({ origin, entry, search, mcp, feedback, llms, site
1213
1215
  if (robotsEnabled) lines.push(`- Robots policy: ${DEFAULT_ROBOTS_TXT_ROUTE}`);
1214
1216
  if (sitemapConfig.enabled) {
1215
1217
  if (sitemapConfig.xml.enabled) lines.push(`- Sitemap XML: ${sitemapConfig.xml.route}`);
1216
- if (sitemapConfig.markdown.enabled) lines.push(`- Sitemap Markdown: ${sitemapConfig.markdown.route}`, `- Sitemap well-known alias: ${sitemapConfig.markdown.wellKnownRoute}`);
1218
+ if (sitemapConfig.markdown.enabled) lines.push(`- Sitemap Markdown: ${sitemapConfig.markdown.route}`, ...sitemapConfig.markdown.docsRoute ? [`- Sitemap docs alias: ${sitemapConfig.markdown.docsRoute}`] : [], `- Sitemap well-known alias: ${sitemapConfig.markdown.wellKnownRoute}`);
1217
1219
  }
1218
1220
  if (openapi.enabled && openapi.url) {
1219
1221
  lines.push(`- OpenAPI schema: ${openapi.url}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/theme",
3
- "version": "0.1.122",
3
+ "version": "0.1.123",
4
4
  "description": "Theme package for @farming-labs/docs — layout, provider, MDX components, and styles",
5
5
  "keywords": [
6
6
  "docs",
@@ -139,7 +139,7 @@
139
139
  "tsdown": "^0.20.3",
140
140
  "typescript": "^5.9.3",
141
141
  "vitest": "^3.2.4",
142
- "@farming-labs/docs": "0.1.122"
142
+ "@farming-labs/docs": "0.1.123"
143
143
  },
144
144
  "peerDependencies": {
145
145
  "@farming-labs/docs": ">=0.0.1",