@roottale/cms-core 0.72.1 → 0.73.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @roottale/cms-core
2
2
 
3
+ ## 0.73.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5806994: 공개 페이지의 색인을 사이트가 관리하는 `robots.forceIndex` 정책을 추가합니다. 개별 noindex와 분류 승격보다 우선하되 미리보기·미발행·콘텐츠 조건의 `forceNoindex`를 해제하지 않습니다. 관리자와 공개 head·사이트맵이 같은 정책을 사용할 수 있습니다.
8
+
3
9
  ## 0.72.1
4
10
 
5
11
  ## 0.72.0
package/dist/index.cjs CHANGED
@@ -2207,6 +2207,7 @@ function resolveMetadata(input) {
2207
2207
  }
2208
2208
  }
2209
2209
  }
2210
+ if (input.robots?.forceIndex) result.noindex = false;
2210
2211
  if (input.robots?.forceNoindex) result.noindex = true;
2211
2212
  if (input.robots?.forceNofollow) result.nofollow = true;
2212
2213
  return result;
@@ -2248,6 +2249,8 @@ var MetadataPatchSchema = import_zod3.z.object({
2248
2249
  nofollow: metadataFields.nofollow.nullable().optional()
2249
2250
  }).strict();
2250
2251
  var MetadataRobotsPolicySchema = import_zod3.z.object({
2252
+ /** Site-owned indexing of public content. Mandatory noindex always takes precedence. */
2253
+ forceIndex: import_zod3.z.boolean().optional(),
2251
2254
  forceNoindex: import_zod3.z.boolean().optional(),
2252
2255
  forceNofollow: import_zod3.z.boolean().optional(),
2253
2256
  /** Stable policy reason codes. They explain an enforced exclusion, never relax it. */
@@ -2606,7 +2609,7 @@ function evaluateContentPolicy(policy, post, options = {}) {
2606
2609
  const forced = !visible || indexing.length > 0 || options.robots?.forceNoindex === true;
2607
2610
  const inheritedReasons = options.robots?.forceNoindex ? options.robots.noindexReasons?.length ? options.robots.noindexReasons : ["content:forced-noindex"] : [];
2608
2611
  const noindexReasons = [.../* @__PURE__ */ new Set([...visibility, ...indexing, ...inheritedReasons])].slice(0, 64);
2609
- const manualNoindex = readMetadataValues(post.metaJson?.seo).noindex === true;
2612
+ const manualNoindex = !options.robots?.forceIndex && readMetadataValues(post.metaJson?.seo).noindex === true;
2610
2613
  return {
2611
2614
  visible,
2612
2615
  indexable: visible && !forced && !manualNoindex,