2016-04-20 10:03:55 +00:00
|
|
|
---
|
|
|
|
robots: index, follow
|
|
|
|
lang: en
|
|
|
|
dir: ltr
|
|
|
|
breaks: true
|
|
|
|
---
|
|
|
|
|
|
|
|
Supported YAML metadata
|
|
|
|
===
|
|
|
|
|
|
|
|
First you need to insert syntax like this at the **start** of the note:
|
|
|
|
```
|
|
|
|
---
|
|
|
|
YAML metas
|
|
|
|
---
|
|
|
|
```
|
|
|
|
|
|
|
|
Replace the "YAML metas" in this section with any YAML options as below.
|
|
|
|
You can also refer to this note's source code.
|
|
|
|
|
2016-06-21 13:42:03 +00:00
|
|
|
title
|
|
|
|
---
|
|
|
|
This option will set the note title which prior than content title.
|
|
|
|
|
|
|
|
> default: not set
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2016-06-21 13:42:03 +00:00
|
|
|
title: meta title
|
|
|
|
```
|
|
|
|
|
|
|
|
description
|
|
|
|
---
|
|
|
|
This option will set the note description.
|
|
|
|
|
|
|
|
> default: not set
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2016-06-21 13:42:03 +00:00
|
|
|
description: meta description
|
|
|
|
```
|
|
|
|
|
2020-06-27 13:26:08 +00:00
|
|
|
image
|
|
|
|
---
|
|
|
|
This option will set the html meta tag 'image'.
|
|
|
|
|
|
|
|
> default: not set
|
|
|
|
|
|
|
|
**Example**
|
|
|
|
```yml
|
|
|
|
image: https://raw.githubusercontent.com/hackmdio/codimd/develop/public/screenshot.png
|
|
|
|
```
|
|
|
|
|
2016-06-21 13:42:03 +00:00
|
|
|
tags
|
|
|
|
---
|
|
|
|
This option will set the tags which prior than content tags.
|
|
|
|
|
|
|
|
> default: not set
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2016-06-21 13:42:03 +00:00
|
|
|
tags: features, cool, updated
|
|
|
|
```
|
|
|
|
|
2016-04-20 10:03:55 +00:00
|
|
|
robots
|
|
|
|
---
|
|
|
|
This option will give below meta in the note head meta:
|
|
|
|
```xml
|
|
|
|
<meta name="robots" content="your_meta">
|
|
|
|
```
|
|
|
|
So you can prevent any search engine index your note by set `noindex, nofollow`.
|
|
|
|
|
2016-06-21 13:42:03 +00:00
|
|
|
> default: not set
|
2016-04-20 10:03:55 +00:00
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2016-04-20 10:03:55 +00:00
|
|
|
robots: noindex, nofollow
|
|
|
|
```
|
|
|
|
|
|
|
|
lang
|
|
|
|
---
|
|
|
|
This option will set the language of the note, that might alter some typography of it.
|
|
|
|
You can find your the language code in ISO 639-1 standard:
|
|
|
|
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
|
|
|
|
|
|
|
> default: not set (which will be en)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2016-04-20 10:03:55 +00:00
|
|
|
langs: ja-jp
|
|
|
|
```
|
|
|
|
|
|
|
|
dir
|
|
|
|
---
|
2018-11-10 21:12:36 +00:00
|
|
|
This option specifies the direction of the text in this note.
|
2016-04-20 10:03:55 +00:00
|
|
|
You can only use whether `rtl` or `ltr`.
|
|
|
|
Look more at here:
|
|
|
|
http://www.w3.org/International/questions/qa-html-dir
|
|
|
|
|
|
|
|
> default: not set (which will be ltr)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2016-04-20 10:03:55 +00:00
|
|
|
dir: rtl
|
|
|
|
```
|
|
|
|
|
|
|
|
breaks
|
|
|
|
---
|
|
|
|
This option means the hardbreaks in the note will be parsed or be ignore.
|
2018-06-22 19:07:30 +00:00
|
|
|
The original markdown syntax breaks only if you put space twice, but CodiMD choose to breaks every time you enter a break.
|
2016-04-20 10:03:55 +00:00
|
|
|
You can only use whether `true` or `false`.
|
|
|
|
|
|
|
|
> default: not set (which will be true)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2016-04-20 10:03:55 +00:00
|
|
|
breaks: false
|
|
|
|
```
|
2016-07-31 16:08:44 +00:00
|
|
|
|
|
|
|
GA
|
|
|
|
---
|
2018-11-10 21:12:36 +00:00
|
|
|
This option allows you to enable Google Analytics with your ID.
|
2016-07-31 16:08:44 +00:00
|
|
|
|
|
|
|
> default: not set (which won't enable)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2016-07-31 16:08:44 +00:00
|
|
|
GA: UA-12345667-8
|
|
|
|
```
|
|
|
|
|
2016-08-15 03:25:27 +00:00
|
|
|
disqus
|
|
|
|
---
|
2018-11-10 21:12:36 +00:00
|
|
|
This option allows you to enable Disqus with your shortname.
|
2016-08-15 03:25:27 +00:00
|
|
|
|
|
|
|
> default: not set (which won't enable)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2018-06-22 19:07:30 +00:00
|
|
|
disqus: codimd
|
2016-08-15 03:25:27 +00:00
|
|
|
```
|
|
|
|
|
2020-06-01 20:27:16 +00:00
|
|
|
toc
|
|
|
|
---
|
|
|
|
|
|
|
|
This option allows you to set options regarding the table of contents (toc). Currently, its only option is to set the maxDepth.
|
|
|
|
|
|
|
|
**Notice: always use two spaces as indention in YAML metadata!**
|
|
|
|
|
|
|
|
|
|
|
|
> **maxDepth:**
|
|
|
|
> default: not set (whioch will show everything until level 3 (h1 -- h3))
|
2020-06-03 16:41:41 +00:00
|
|
|
> max: 5 (as defined by md-toc.js)
|
2020-06-01 20:27:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
**Example**
|
|
|
|
|
|
|
|
|
2018-11-10 21:11:07 +00:00
|
|
|
type
|
|
|
|
---
|
|
|
|
This option allows you to switch the document view to the slide preview, to simplify live editing of presentations.
|
|
|
|
|
|
|
|
> default: not set
|
|
|
|
|
|
|
|
**Example:**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2018-11-10 21:11:07 +00:00
|
|
|
type: slide
|
|
|
|
```
|
|
|
|
|
2016-07-31 16:08:44 +00:00
|
|
|
slideOptions
|
|
|
|
---
|
2018-11-10 21:12:36 +00:00
|
|
|
This option allows you to provide custom options to slide mode.
|
2016-07-31 16:08:44 +00:00
|
|
|
Please below document for more details:
|
|
|
|
https://github.com/hakimel/reveal.js/#configuration
|
|
|
|
|
2017-06-03 05:33:07 +00:00
|
|
|
You could also set slide theme which named in below css files:
|
|
|
|
https://github.com/hakimel/reveal.js/tree/master/css/theme
|
|
|
|
|
2016-07-31 16:08:44 +00:00
|
|
|
**Notice: always use two spaces as indention in YAML metadata!**
|
|
|
|
|
|
|
|
> default: not set (which use default slide options)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 21:12:36 +00:00
|
|
|
```yml
|
2016-07-31 16:08:44 +00:00
|
|
|
slideOptions:
|
|
|
|
transition: fade
|
2017-06-03 05:33:07 +00:00
|
|
|
theme: white
|
2018-06-22 19:07:30 +00:00
|
|
|
```
|