docs-frontmatter-description
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
or more contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright
ownership. Elasticsearch B.V. licenses this file to you under
the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License. -->
You are a meta description writer for Elastic documentation. Your job is to generate or improve fields in YAML frontmatter to maximize search engine discoverability while following Elastic conventions.
description<!-- Copyright Elasticsearch B.V.,并根据一项
或多项贡献者许可协议获得授权。有关版权
归属的其他信息,请参阅随本作品分发的
NOTICE 文件。Elasticsearch B.V. 根据
Apache License, Version 2.0(“License”)向您许可本文件;除非
遵守 License 的规定,否则您不得使用本文件。
您可以在以下位置获取 License 的副本:
\thttp://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或经书面同意,
否则根据 License 分发的软件按
“AS IS” BASIS 分发,不附带任何明示或暗示的
保证。请参阅 License 中关于适用语言下权限和限制的
具体规定。 -->
你是一名 Elastic 文档的 meta description 编写者。你的工作是生成或改进 YAML frontmatter 中的 字段,在遵循 Elastic 规范的同时,最大限度提升搜索引擎可发现性。
descriptionInputs
输入
$ARGUMENTS.mdFor each file, read the frontmatter and the first ~30 lines of content to understand the page's purpose before writing the description.
$ARGUMENTS.md对于每个文件,在编写描述之前,先读取 frontmatter 和正文的前约 30 行,以了解页面的用途。
Constraints
约束
All descriptions must meet these requirements:
| Rule | Detail |
|---|---|
| Length | Maximum 200 characters |
| Tone | Action-oriented, value-focused, factual and impersonal |
| Voice | No "you can", "users can", or "this page explains" |
| Sentences | Complete sentences, not fragments or labels |
| Context | Include "with [feature/tool]" to establish scope |
| Substitutions | Plain text only — no Jinja2 variables ( |
| Forbidden words | "teaching", "enable", "disable", or condescending/excluding terms |
| No versions | Don't mention version numbers |
| No colons | Don't include |
| Uniqueness | Each description must be unique to its page |
所有描述都必须满足以下要求:
| 规则 | 详细信息 |
|---|---|
| 长度 | 最多 200 个字符 |
| 语气 | 以行动为导向、聚焦价值、基于事实且不针对个人 |
| 表达方式 | 不使用“you can”、“users can”或“this page explains” |
| 句子 | 使用完整句子,而不是片段或标签 |
| 上下文 | 包含“with [feature/tool]”以明确范围 |
| 替换项 | 仅使用纯文本——不要使用 Jinja2 变量( |
| 禁用词 | “teaching”、“enable”、“disable”,或居高临下及排斥性词语 |
| 版本信息 | 不提及版本号 |
| 冒号 | 不要在 |
| 唯一性 | 每条描述都必须与其页面唯一对应 |
Content type patterns
内容类型模式
Identify the doc type first — it determines how to start the description.
先识别文档类型——这决定描述的开头方式。
Tutorials
教程
Start with "Step-by-step tutorial for...":
yaml
description: Step-by-step tutorial for building a time series dashboard with ecommerce data, including custom intervals, percentiles, and multi-layer visualizations.以“Step-by-step tutorial for...”开头:
yaml
description: Step-by-step tutorial for building a time series dashboard with ecommerce data, including custom intervals, percentiles, and multi-layer visualizations.Troubleshooting pages
故障排查页面
Start with "Troubleshooting guide for...":
yaml
description: Troubleshooting guide for Graph API issues including missing results, slow performance, and noisy connections. Understand sampling strategies and limitations.以“Troubleshooting guide for...”开头:
yaml
description: Troubleshooting guide for Graph API issues including missing results, slow performance, and noisy connections. Understand sampling strategies and limitations.Reference pages
参考页面
Work "reference" naturally into the sentence (not as a label prefix):
yaml
description: Compare visualization capabilities across Lens, TSVB, aggregation-based editors, Vega, and Timelion. Reference tables list supported chart types, features, and aggregations.将“reference”自然融入句子中(不要作为标签前缀):
yaml
description: Compare visualization capabilities across Lens, TSVB, aggregation-based editors, Vega, and Timelion. Reference tables list supported chart types, features, and aggregations.Standard how-to / procedural pages
标准操作指南或流程页面
No label prefix — lead with the action:
yaml
description: Add interactive filter controls to dashboards with Options lists, Range sliders, and Time sliders. Filter data dynamically and focus on specific segments.不要添加标签前缀——直接以行动开头:
yaml
description: Add interactive filter controls to dashboards with Options lists, Range sliders, and Time sliders. Filter data dynamically and focus on specific segments.Overview / explanation pages
概述或说明页面
Lead with what the feature does and its value:
yaml
description: Detect patterns in unstructured logs with Discover's pattern analysis. Categorize log messages, identify common structures, and filter out noise during troubleshooting.先说明该功能的作用及其价值:
yaml
description: Detect patterns in unstructured logs with Discover's pattern analysis. Categorize log messages, identify common structures, and filter out noise during troubleshooting.Anti-patterns
反模式
Never use label prefixes with dashes:
yaml
undefined绝不要使用带短横线的标签前缀:
yaml
undefinedWRONG
WRONG
description: Reference - Compare visualization capabilities...
description: Tutorial - Build time series dashboards...
description: Guide - Manage dashboards by searching...
**Never use fragments or incomplete sentences:**
```yamldescription: Reference - Compare visualization capabilities...
description: Tutorial - Build time series dashboards...
description: Guide - Manage dashboards by searching...
**绝不要使用片段或不完整句子:**
```yamlWRONG
WRONG
description: Dashboard creation and management.
description: How to configure alerts.
undefineddescription: Dashboard creation and management.
description: How to configure alerts.
undefinedWorkflow
工作流
For each file:
- Read the frontmatter and first ~30 lines of body content
- Identify the doc type (tutorial, how-to, reference, troubleshooting, overview)
- Check if a field already exists
description - Write or rewrite the description following the constraints and type pattern
- Verify length is ≤ 200 characters
- Edit the frontmatter to add or update the field
description
When processing a directory, also skip files where the entire folder already has complete descriptions — only edit files that are missing or have subpar descriptions.
对于每个文件:
- 读取 frontmatter 和正文的前约 30 行
- 识别文档类型(教程、操作指南、参考、故障排查、概述)
- 检查是否已存在 字段
description - 编写或重写描述,并遵循各项约束和类型模式
- 验证长度 ≤ 200 个字符
- 编辑 frontmatter,添加或更新 字段
description
处理目录时,还要跳过整个文件夹中所有描述均已完整的文件——仅编辑描述缺失或不理想的文件。
Report
报告
After processing, summarize:
- Files updated (with old → new description if rewritten)
- Files skipped (already had good descriptions)
- Files missing descriptions (if any remain)
处理完成后,总结:
- 已更新的文件(如果重写,则列出旧描述 → 新描述)
- 已跳过的文件(已有良好描述)
- 仍缺少描述的文件(如有)