owned this note changed a year ago
Linked with GitHub

YAML metadata 說明

首先,你必須要在筆記的 第一行 加入以下語法:

---
YAML metas
---

將這個區塊的 "YAML metas" 替換成以下任意的 YAML 選項
您也可以參考本份筆記的原始碼

title

此選項會設定筆記的標題,會優先於內容的標題

預設值:未設定

範例

title: meta title

description

此選項會設定筆記的描述

預設值:未設定

範例

description: meta description

image

此選項會設定筆記的預設圖片 (用於連結預覽)

預設值:HackMD 預設圖片

範例

image: https://hackmd.io/screenshot.png

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Twitter 的圖片

自訂圖片必須符合 Twitter 的長寬比(1200:675),Twitter 才會顯示。

type

此選項可設定筆記的類型。如果想要在編輯模式預覽投影片,請記得設定。

範例

type: slide

robots

此選項會將以下 meta 加至筆記的 head meta

<meta name="robots" content="your_meta">

因此您可以透過"noindex, nofollow 防止任何搜尋引擎索引您的筆記

預設值:未設定

範例

robots: noindex, nofollow

lang

此選項會設定筆記的語言,這會影響到它的排版方式
您可以在 ISO 639-1 標準 找到您的語言編碼:
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

預設:未設定 (也就是 en)

範例

langs: ja-jp

dir

此選項提供以描述筆記的文字方向
您只能設定 rtl 或是 ltr (右至左、左至右)
詳細請至:
http://www.w3.org/International/questions/qa-html-dir

預設值:未設定 (也就是 ltr)

Example

dir: rtl

breaks

此選項設定筆記的換行是否會被轉換或是忽略
最一開始的 markdown 語法中,要在每一行的最後面加上兩個空白才會換行,但是 HackMD 選擇當您每次輸入換行的時候都會換行
您只能設定 true 或是 false

預設值:未設定 (也就是 true)

範例

breaks: false

GA

此選項可以透過 ID 啟用 Google Analytics

預設值:未設定 (停用)

範例

GA: UA-12345667-8

disqus

此選項可以透過 shortname 啟用 Disqus

預設值:未設定 (停用)

範例

disqus: hackmd

slideOptions

此選項可用於自訂簡報模式
詳細請至:
https://revealjs.com/config/

您也可以設定簡報模式的主題,名稱於下列的 css 檔案:
https://revealjs.com/themes/

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
請保持使用兩個空白作為 YAML metadata 的縮排方式!

預設值:未設定 (使用預設的簡報選項)

範例

slideOptions:
  transition: fade
  theme: white

lintConfig

此選項為 markdownlint 的設定值,詳細的設定詳見 .markdownlint.yaml

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
請保持使用兩個空白作為 YAML metadata 的縮排方式!

範例

---
lintConfig:
  MD004:
    style: "consistent"
  MD006: false
---

# Your other markdown content
Select a repo