HackMD
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    25
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- robots: index, follow lang: en dir: ltr breaks: true --- # What is YAML metadata and how to use it? :::warning Since 2023-06-20 (GMT+8), HackMD does not accept YAML frontmatter as metadata. All metadata defined in YAML frontmatter has been migrated to HackMD and stored there, after which HackMD ignores all changes in the YAML frontmatter section. This tutorial will close on 2023-08-20. Before then, you may want to review each section to see where the metadata goes. ::: YAML is a human-readable data-serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted [^from-Wikipedia]. It is a common practice to use YAML to add metadata, such as title, tags, and descriptions, to Markdown documents. [^from-Wikipedia]: https://en.wikipedia.org/wiki/YAML HackMD defines certain properties that you can use for various aims, for example, controlling behaviors in slide mode. First of all, you have to add the following contents at the **first** line of a note. ``` --- YAML metas --- ``` Replace `YAML metas` with the properties below. The source code of this note can be your reference. title --- :::warning Please refer to the tutorial: [How to edit title and tags](/s/osUXHS5sTe21hcecll0d5g). ::: Set the title of the note, overrides the first Header. > Default: not defined. **Example** ```xml title: meta title ``` description --- :::warning Please refer to the tutorial: [How to edit metadata of a note](/s/z9V2N2odTIWfPX5j8Gt4cg) ::: Set description for the note. > Default: not defined. **Example** ```xml description: meta description ``` image --- :::warning Please refer to the tutorial: [How to edit metadata of a note](/s/z9V2N2odTIWfPX5j8Gt4cg) ::: Set the default image for the note, which will be used as preview image for the link. > Default: HackMD default preview image **Example** ```xml image: https://hackmd.io/screenshot.png ``` :::info ### :bulb: Twitter Social Cards Twitter only displays images that meet the ratio of 1200 to 675. ::: tags --- :::warning Please refer to the tutorial: [How to edit title and tags](/s/osUXHS5sTe21hcecll0d5g). ::: Set tags for the note. overrides tags set with `######tags:` > Default: not defined. **Example** ```xml tags: features, cool, updated ``` type --- :::warning Please refer to the tutorial: [How to create a slide deck](https://hackmd.io/@docs/S1wwUhj5E) ::: Set the type of the note. If you'd like to preview slides in Edit Mode, please set this property to `slide`. **Example** ```xml type: slide ``` robots --- :::warning You will be able to set this again soon. ::: By adding this property, HackMD will add the following HTML tag to the `<head>` section: ```xml <meta name="robots" content="your_meta"> ``` You can set the content property to `noindex, nofollow` to prevent search engines from indexing your note. > Default: not set. **Example** ```xml robots: noindex, nofollow ``` lang --- :::warning Please refer to the tutorial: [Edit note metadata](/s/z9V2N2odTIWfPX5j8Gt4cg). ::: Set note language. Please use ISO 639-1 codes: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes > Default: not defined (`en`) **Example** ```xml lang: ja-jp ``` dir --- :::warning Please refer to the tutorial: [Edit note metadata](/s/z9V2N2odTIWfPX5j8Gt4cg). ::: Set the direction of words. Use `rtl` for languages written from right to left, and `ltr` for those written from left to right. Learn more → http://www.w3.org/International/questions/qa-html-dir > Default: not defined (`ltr`) **Example** ```xml dir: rtl ``` breaks --- :::warning Please refer to the tutorial: [Edit note metadata](/s/z9V2N2odTIWfPX5j8Gt4cg). ::: Tells HackMD to translate a new line into a new line or to be ignored. In original Markdown guideline, you have to add two spaces to make a new line. This property can only be set to `true` or `false`. > Default: note defined (`true`) **Example** ```xml breaks: false ``` GA --- :::warning You will be able to set GA again soon ::: Set Google Analytics ID > Default: not set (disabled) **Example** ```xml GA: UA-12345667-8 ``` disqus --- :::warning Please refer to the tutorial: [Edit note metadata](/s/z9V2N2odTIWfPX5j8Gt4cg). HackMD will provide its own way of commenting on the whole note and is sunsetting disqus. ::: Enable Disqus with your shortname. > Default: not set (disabled) **Example** ```xml disqus: hackmd ``` slideOptions --- :::warning Please refer to the tutorial: [How to create a slide deck](https://hackmd.io/@docs/S1wwUhj5E) ::: Configure presentation behaviors in slide mode. For details, please consult: https://revealjs.com/config/#reconfiguring You can set a theme for the slides. Please consult: https://revealjs.com/themes/ :::warning :bulb: Please indent with two spaces in YAML. ::: > Default: not defined **Example** ```xml slideOptions: transition: fade theme: white ``` lintConfig --- :::warning You will be able to configure lint soon. ::: This option is the vaules for [markdownlint](https://github.com/DavidAnson/markdownlint). For details, please consult [.markdownlint.yaml](https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml). :::warning :bulb: Please indent with two spaces in YAML. ::: **Example** ```md --- lintConfig: MD004: style: "consistent" MD006: false --- # Your other markdown content ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully