@cmssy/next 0.5.2 → 0.5.3

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/index.cjs CHANGED
@@ -284,7 +284,7 @@ function createCmssyRobots(config, options = {}) {
284
284
  return {
285
285
  rules,
286
286
  ...includeSitemap ? { sitemap: `${baseUrl}/sitemap.xml` } : {},
287
- ...baseUrl ? { host: baseUrl } : {}
287
+ ...options.host && baseUrl ? { host: baseUrl } : {}
288
288
  };
289
289
  };
290
290
  }
package/dist/index.d.cts CHANGED
@@ -80,10 +80,16 @@ interface CreateCmssyRobotsOptions extends SeoBaseUrlOption {
80
80
  rules?: MetadataRoute.Robots["rules"];
81
81
  /** Reference `${baseUrl}/sitemap.xml`. Defaults to true. */
82
82
  sitemap?: boolean;
83
+ /**
84
+ * Emit the non-standard `Host:` directive (a Yandex extension). Google
85
+ * ignores it and reports a warning in Search Console, so it is off by
86
+ * default. Enable only when targeting Yandex.
87
+ */
88
+ host?: boolean;
83
89
  }
84
90
  /**
85
- * Builds the default export for Next's `app/robots.ts`. Allows crawling, points
86
- * to the sitemap, and reports the canonical host. Drop in as:
91
+ * Builds the default export for Next's `app/robots.ts`. Allows crawling and
92
+ * points to the sitemap. Drop in as:
87
93
  *
88
94
  * export default createCmssyRobots(cmssy);
89
95
  */
package/dist/index.d.ts CHANGED
@@ -80,10 +80,16 @@ interface CreateCmssyRobotsOptions extends SeoBaseUrlOption {
80
80
  rules?: MetadataRoute.Robots["rules"];
81
81
  /** Reference `${baseUrl}/sitemap.xml`. Defaults to true. */
82
82
  sitemap?: boolean;
83
+ /**
84
+ * Emit the non-standard `Host:` directive (a Yandex extension). Google
85
+ * ignores it and reports a warning in Search Console, so it is off by
86
+ * default. Enable only when targeting Yandex.
87
+ */
88
+ host?: boolean;
83
89
  }
84
90
  /**
85
- * Builds the default export for Next's `app/robots.ts`. Allows crawling, points
86
- * to the sitemap, and reports the canonical host. Drop in as:
91
+ * Builds the default export for Next's `app/robots.ts`. Allows crawling and
92
+ * points to the sitemap. Drop in as:
87
93
  *
88
94
  * export default createCmssyRobots(cmssy);
89
95
  */
package/dist/index.js CHANGED
@@ -282,7 +282,7 @@ function createCmssyRobots(config, options = {}) {
282
282
  return {
283
283
  rules,
284
284
  ...includeSitemap ? { sitemap: `${baseUrl}/sitemap.xml` } : {},
285
- ...baseUrl ? { host: baseUrl } : {}
285
+ ...options.host && baseUrl ? { host: baseUrl } : {}
286
286
  };
287
287
  };
288
288
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/next",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Next.js App Router bindings for cmssy headless sites (createCmssyPage + draft preview)",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -41,7 +41,7 @@
41
41
  "dist"
42
42
  ],
43
43
  "peerDependencies": {
44
- "@cmssy/react": "^0.5.2",
44
+ "@cmssy/react": "^0.5.3",
45
45
  "next": ">=15",
46
46
  "react": "^18.2.0 || ^19.0.0",
47
47
  "react-dom": "^18.2.0 || ^19.0.0"
@@ -54,7 +54,7 @@
54
54
  "tsup": "^8.3.0",
55
55
  "typescript": "^5.6.0",
56
56
  "vitest": "^2.1.0",
57
- "@cmssy/react": "0.5.2"
57
+ "@cmssy/react": "0.5.3"
58
58
  },
59
59
  "dependencies": {
60
60
  "jose": "^6.2.3"