更新日志的目的是记录值得注意的更改,然后这些更改会作为 Cloudflare 更新日志 的一部分以及特定产品的更新日志页面显示。
指导性、直截了当
pcx_content_type: changelog
products:
- product-a
- product-b
- product-c欲了解更多详情,请参考 pcx_content_type。
产品经理和工程师会手动或通过其团队拥有的自动化流程来维护更新日志。PCX 提供审核,但不负责创建或编写更新日志。
在创建更新日志时,您需要一个 MDX 页面文件以及一个相应的更新日志条目文件夹。
这些文件的组合使我们能够:
- 在 HTML 页面上渲染传统的更新日志内容。
- 通过更新日志内容以编程方式创建 RSS 订阅源。
- 将我们所有的更新日志内容汇集到 Cloudflare 全局更新日志中。
您的 Markdown 文件需要具有几个特殊的值,以引入更新日志信息。这些值已在示例页面中突出显示。
有关 ProductChangelog 组件的更多信息,请参考风格指南。
---
pcx_content_type: changelog
products:
- dns
title: Changelog
description: Track recent changes, new features, and bug fixes for Cloudflare DNS.
---
import { ProductChangelog } from "~/components";
{/* <!-- Actual content lives in /src/content/changelog/dns/. --> */}
<ProductChangelog product="dns" />更新日志条目保存在我们文档的另一个位置:/src/content/changelog/ ↗。
每个条目都将是其自身的 MDX 文件,类似于以下内容。
---
title: Account-level DNS analytics now available via GraphQL Analytics API
description: Authoritative DNS analytics can now be accessed on the account level via the GraphQL Analytics API.
products:
- dns
date: 2025-06-19
---
Authoritative DNS analytics are now available on the **account level** via the [Cloudflare GraphQL Analytics API](/analytics/graphql-api/).
This allows users to query DNS analytics across multiple zones in their account, by using the `accounts` filter.
Here is an example to retrieve all DNS queries across all zones in an account that resulted in an `NXDOMAIN` response over a given time frame. Please replace `a30f822fcd7c401984bf85d8f2a5111c` with your actual account ID.
```graphql graphql-api-explorer title="GraphQL example for account-level DNS analytics"
query Viewer {
viewer {
accounts(filter: { accountTag: "a30f822fcd7c401984bf85d8f2a5111c" }) {
dnsAnalyticsAdaptive(
limit: 10
filter: {
date_geq: "2025-06-16"
responseCode: "NXDOMAIN"
date_leq: "2025-06-18"
}
orderBy: [datetime_DESC]
) {
zoneTag
queryName
responseCode
queryType
datetime
}
}
}
}To learn more and get started, refer to the DNS Analytics documentation.
### 属性
每个更新日志条目都具有以下属性:
- `title` <Type text="string" /> <MetaInfo text="required" />
- 显示在标题标头和社交媒体嵌入中。
- `description` <Type text="string" /> <MetaInfo text="required" />
- 显示在社交媒体嵌入中。
- `date` <Type text="date" /> <MetaInfo text="required" />
- 这应当是一个格式为 `YYYY-MM-DD` 的日期。例如,`2025-02-04`。
- `products` <Type text="Array<String>" /> <MetaInfo text="(default: current location) required" />
- 产品列表区分大小写。只能使用小写。
- 这应当是一个字符串数组,每个字符串均指向产品集合中某文件的名称(不带文件扩展名)。
- 您的条目所在的文件夹(例如 `src/content/changelog/workers/2025-02-13-new-product-feature.mdx`)将被推断为此属性的一部分。如果您不想将该条目与其他产品相关联,则可以完全从 frontmatter 中省略它。
- 如果您希望引用不在此集合中的产品,例如存在于现有产品的子路径中的产品,您可以创建一个“仅元数据”的条目:
```yaml title="src/content/proucts/workers-observability.yaml"
name: Workers Observability
product:
title: Workers Observability
url: /workers/observability/
group: Developer platform
show: falsehiddenBoolean(default: false) optional- 如果为
true,此页面将可以通过直接链接访问,但会在主 更新日志 页面和所有 RSS 订阅源中隐藏。 - 如果为
true,还将添加noindex属性,以便搜索引擎爬虫不会对页面进行索引。
- 如果为