AsciiDoc 語法參考 - Amazon EKS

協助改善此頁面

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

若要提供此使用者指南,請選擇位於每個頁面右窗格中的在 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 檔案。

程序

step-by-step程序:

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*. ...