概览
本指南提供了一般准则,可帮助您编写自己的 Google Earth Engine 教程。其目标是让用户能够轻松创建高质量教程,这些教程应清晰、简洁,且易于整个 Earth Engine 社区理解。
下面的教程模板还可作为额外指南,帮助您开始编写自己的教程。如需详细了解如何使用模板开始编写教程,请参阅编写教程。
此外,Google Cloud 社区教程样式指南为面向广大受众群体编写端到端教程提供了有价值的参考,而 Google JavaScript 样式指南则详细介绍了在 JavaScript 代码示例中使用的推荐样式。审核人员在审核您提交的内容时可能会参考这些指南。
一般准则
- 言简意赅。
- 不要重复。
- 不要重复表达相同的意思(即使措辞不同)。
- 定期标记进度。
- 在教程的关键节点添加图片和文字,让用户知道自己操作正确。请谨慎使用!
- 尽可能使用主动语态。
- “当用户更改值时”,而不是“当值更改时”。
- 例外情况:如果您必须刻意使用主动语态,或者执行者显而易见或不相关,则可以使用被动语态(例如,使用“返回 GIF 动画”而不是“Earth Engine 返回 GIF 动画”)。
- 务必符合事实。
- 避免使用最高级(“这是100%最好且最快的方法”)。
- 避免宣传产品或服务。
- 避免使用有争议的主题。
- 在引用特定方法、数据集和分析时,请添加引用和网址。
- 确保教程内容完整。
- 尽量不要依赖 API 之外的特殊库或公共 Earth Engine Data Catalog中没有的数据集。
- 如果您要提供额外的数据或算法,请确保您有权分享这些内容。请附上所有必要的许可和出处说明。
- 测试代码。
- 在提交文章以供审核之前,请务必运行并测试所有包含的代码示例。
教程文件标头
如果您手动创建和提交社区教程,而不使用编写教程中提供的模板,则需要手动将适当的元数据和许可标头添加到文件开头。选择所需格式以查看可复制到您自己的教程中的模板:
Markdown
将以下内容添加到文档开头。标头前面不应有空格或其他字符:
---
title: Your tutorial title
description: A short description of the tutorial, all on one line with no carriage returns.
author: your-github-username
tags: comma-separated, lowercase, list, of, related, keywords
date_published: YYYY-MM-DD
---
<!--
Copyright 2023 The Google Earth Engine Community Authors
Licensed 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
https://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.
-->
请务必先替换相应的模板字段,然后再提交教程以供审核。
Colab
在笔记本开头的代码单元中添加以下内容:
#@title Copyright 2023 The Earth Engine Community Authors { display-mode: "form" }
#
# Licensed 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
#
# https://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.
教程模板
Markdown
如果您熟悉 git 和 GitHub,则可以使用以下代码作为模板来开始:
---
title: Your tutorial title
description: A short description of the tutorial, all on one line with no carriage returns.
author: your-github-username
tags: comma-separated, lowercase, list, of, related, keywords
date_published: YYYY-MM-DD
---
<!--
Copyright 2023 The Google Earth Engine Community Authors
Licensed 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
https://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.
-->
In a few sentences, describe what the user is going to learn. Be sure to include
_concise_ background information; only include what's helpful and relevant.
When in doubt, leave it out!
## Section heading 1
Break up your tutorial into manageable sections.
With one or more paragraphs, separated by a blank line.
Inside your sections, you can also:
1. Use numbered lists
1. ..when the order..
1. ..of items is important.
And:
- This is a bulleted list.
- Use bulleted lists when items are not strictly ordered.
..and even:
Use | tables | to organize | content
------- | -------- | ----------- | -------
Your | tables | can | also
contain | multiple | rows | ...
## Section heading 2
Use separate sections for related, but discrete, groups of steps.
Use code blocks to show users how to do something after describing it:
```js
// Use comments to describe details that can't be easily expressed in code.
// Always try making code more self descriptive before adding a comment.
// Similarly, avoid repeating verbatim what's already said in code
// (e.g., "assign ImageCollection to variable 'coll'").
var coll = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA');
```
### Use subsections if appropriate
Consider breaking longer sections that cover multiple topics or span multiple
pages into subsections.
或者,您也可以按照编写教程中的说明,直接在 GitHub 的网页版文件编辑器中打开上述模板。
请务必参阅编写教程,了解有关如何提议、编写和提交教程的重要详细信息。
Colab
如需使用推荐的样式模板创建新的 Colab 笔记本,请点击此处:
系统随即会打开一个笔记本,其中包含有关编写和提交教程的说明。请务必参阅编写教程,了解有关提案、编写和提交流程的重要详情。