協助改進此頁面
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
若要為本使用者指南貢獻內容,請點選每個頁面右側面板中的在 GitHub 上編輯此頁面連結。
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
AsciiDoc 語法參考
AsciiDoc 是 AWS 文件的偏好標記語言。儘管工具對 Markdown 語法 (如標題與清單) 有部分支援,但為確保內容一致性與正確轉譯,我們建議所有內容皆使用 AsciiDoc 語法。
本指南涵蓋您在貢獻 Amazon EKS 文件時所需的常見語法元素。如需更進階的語法與詳細資訊,請參閱 AsciiDoc
新頁面
每個新的 AsciiDoc 文件均應以 建立新頁面 中定義的結構開頭。
標題
使用標題以階層方式組織內容:
= Page/topic title (level 1) == Section title (level 2) === Level 3 heading ==== Level 4 heading ===== Level 5 heading ====== Level 6 heading
注意:在 AWS 文件中,標題一律使用句子大小寫。
文字格式
透過文字格式化突出重要資訊:
Use *bold text* for UI labels. Use _italic text_ for introducing terms or light emphasis. Use `monospace text` for code, file names, and commands.
清單
無序清單
為無特定先後順序的項目建立項目符號清單:
* First item * Second item ** Nested item ** Another nested item * Third item
有序清單
為循序步驟或有優先順序的項目建立編號清單:
. First step . Second step .. Substep 1 .. Substep 2 . Third step
連結
如需了解如何正確格式化連結的詳細資訊,請參閱 插入連結。不支援 Markdown 樣式的連結。
程式碼範例
內嵌程式碼
針對內嵌程式碼使用反引號:
Use the `kubectl get pods` command to list all pods.
程式碼區塊
建立具備語法反白功能且支援屬性 (類似實體) 的程式碼區塊:
[source,python,subs="verbatim,attributes"] ---- def hello_world(): print("Hello, World!") ----
映像
插入映像時,請加上替代文字以確保可存取性:
image::images/image-file.png[Alt text description]
資料表
建立資料表,以組織資訊:
[%header,cols="2"] |=== |Header 1 |Header 2 |Cell 1,1 |Cell 1,2 |Cell 2,1 |Cell 2,2 |===
若需更複雜的資料表,請參閱 AsciiDoc 資料表文件
標註
使用標註突出重要資訊與提示內容:
NOTE: This is a note callout for general information. TIP: This is a tip callout for helpful advice. IMPORTANT: This is an important callout for critical information.
預覽版:
注意
這是一個備註標註。
包含其他檔案
包含了來自其他檔案的內容:
include::filename.adoc[]
屬性 (類似實體)
使用預先定義的屬性以維持一致性。特別注意,對於 AWS 與
arn:aws:
,您必須使用屬性。
{aws} provides Amazon EKS as a managed Kubernetes service.
[source,bash,subs="verbatim,attributes"] ---- aws iam attach-role-policy \ --role-name AmazonEKSAutoClusterRole \ --policy-arn {arn-aws}iam::aws:policy/AmazonEKSClusterPolicy ----
如需屬性清單,請參閱 ../attributes.txt 檔案。
程序
格式化逐步程序:
To create an Amaozon EKS cluster. do the following steps. . Sign in to the {aws} Management Console. . Open the Amazon EKS console. . Choose *Create cluster*. ...