or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
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.
Syncing
xxxxxxxxxx
What is YAML metadata and how to use it?
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 [1]. It is a common practice to use YAML to add metadata, such as title, tags, and descriptions, to Markdown documents.
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.
Replace
YAML metas
with the properties below. The source code of this note can be your reference.title
Please refer to the tutorial: How to edit title and tags.
Set the title of the note, overrides the first Header.
Example
description
Please refer to the tutorial: How to edit metadata of a note
Set description for the note.
Example
image
Please refer to the tutorial: How to edit metadata of a note
Set the default image for the note, which will be used as preview image for the link.
Example
- 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 only displays images that meet the ratio of 1200 to 675.
tags
Please refer to the tutorial: How to edit title and tags.
Set tags for the note. overrides tags set with
######tags:
Example
type
Please refer to the tutorial: How to create a slide deck
Set the type of the note. If you'd like to preview slides in Edit Mode, please set this property to
slide
.Example
robots
You will be able to set this again soon.
By adding this property, HackMD will add the following HTML tag to the
<head>
section:You can set the content property to
noindex, nofollow
to prevent search engines from indexing your note.Example
lang
Please refer to the tutorial: Edit note metadata.
Set note language. Please use ISO 639-1 codes:
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Example
dir
Please refer to the tutorial: Edit note metadata.
Set the direction of words. Use
rtl
for languages written from right to left, andltr
for those written from left to right.Learn more →
http://www.w3.org/International/questions/qa-html-dir
Example
breaks
Please refer to the tutorial: Edit note metadata.
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
orfalse
.Example
GA
You will be able to set GA again soon
Set Google Analytics ID
Example
disqus
Please refer to the tutorial: Edit note metadata.
HackMD will provide its own way of commenting on the whole note and is sunsetting disqus.
Enable Disqus with your shortname.
Example
slideOptions
Please refer to the tutorial: How to create a slide deck
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/
- 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 →Example
lintConfig
You will be able to configure lint soon.
This option is the vaules for markdownlint. For details, please consult .markdownlint.yaml.
- 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 →Example
https://en.wikipedia.org/wiki/YAML ↩︎