2016-04-20 06:03:55 -04:00
|
|
|
---
|
|
|
|
robots: index, follow
|
|
|
|
lang: en
|
|
|
|
dir: ltr
|
|
|
|
breaks: true
|
|
|
|
---
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
# Supported YAML metadata
|
2016-04-20 06:03:55 -04:00
|
|
|
|
|
|
|
First you need to insert syntax like this at the **start** of the note:
|
2020-07-01 05:52:17 -04:00
|
|
|
```yaml
|
2016-04-20 06:03:55 -04:00
|
|
|
---
|
|
|
|
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.
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## title
|
|
|
|
|
2016-06-21 09:42:03 -04:00
|
|
|
This option will set the note title which prior than content title.
|
|
|
|
|
|
|
|
> default: not set
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2016-06-21 09:42:03 -04:00
|
|
|
title: meta title
|
|
|
|
```
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## description
|
|
|
|
|
2019-08-16 17:46:17 -04:00
|
|
|
This option will set the note description as a `<meta name="description">` tag. This only affects the [Publish](../features#Share-Notes) function.
|
2016-06-21 09:42:03 -04:00
|
|
|
|
|
|
|
> default: not set
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2016-06-21 09:42:03 -04:00
|
|
|
description: meta description
|
|
|
|
```
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## tags
|
|
|
|
|
2016-06-21 09:42:03 -04:00
|
|
|
This option will set the tags which prior than content tags.
|
|
|
|
|
|
|
|
> default: not set
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2016-06-21 09:42:03 -04:00
|
|
|
tags: features, cool, updated
|
|
|
|
```
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## robots
|
|
|
|
|
2016-04-20 06:03:55 -04:00
|
|
|
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 09:42:03 -04:00
|
|
|
> default: not set
|
2016-04-20 06:03:55 -04:00
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2016-04-20 06:03:55 -04:00
|
|
|
robots: noindex, nofollow
|
|
|
|
```
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## lang
|
|
|
|
|
2019-08-16 17:46:17 -04:00
|
|
|
This option will set the language of the note.
|
|
|
|
Setting the language helps the browser to apply rules such as typography correctly.
|
2016-04-20 06:03:55 -04:00
|
|
|
You can find your the language code in ISO 639-1 standard:
|
2020-07-01 05:52:17 -04:00
|
|
|
<https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>
|
2016-04-20 06:03:55 -04:00
|
|
|
|
|
|
|
> default: not set (which will be en)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2020-07-02 15:39:34 -04:00
|
|
|
lang: ja-jp
|
2016-04-20 06:03:55 -04:00
|
|
|
```
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## dir
|
|
|
|
|
2018-11-10 16:12:36 -05:00
|
|
|
This option specifies the direction of the text in this note.
|
2016-04-20 06:03:55 -04:00
|
|
|
You can only use whether `rtl` or `ltr`.
|
|
|
|
Look more at here:
|
2020-07-01 05:52:17 -04:00
|
|
|
<http://www.w3.org/International/questions/qa-html-dir>
|
2016-04-20 06:03:55 -04:00
|
|
|
|
|
|
|
> default: not set (which will be ltr)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2016-04-20 06:03:55 -04:00
|
|
|
dir: rtl
|
|
|
|
```
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## breaks
|
|
|
|
|
2016-04-20 06:03:55 -04:00
|
|
|
This option means the hardbreaks in the note will be parsed or be ignore.
|
2020-07-02 11:22:52 -04:00
|
|
|
The original markdown syntax breaks only if you put space twice, but HedgeDoc choose to breaks every time you enter a break.
|
2016-04-20 06:03:55 -04:00
|
|
|
You can only use whether `true` or `false`.
|
|
|
|
|
|
|
|
> default: not set (which will be true)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2016-04-20 06:03:55 -04:00
|
|
|
breaks: false
|
|
|
|
```
|
2016-07-31 12:08:44 -04:00
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## GA
|
|
|
|
|
2018-11-10 16:12:36 -05:00
|
|
|
This option allows you to enable Google Analytics with your ID.
|
2016-07-31 12:08:44 -04:00
|
|
|
|
|
|
|
> default: not set (which won't enable)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2016-07-31 12:08:44 -04:00
|
|
|
GA: UA-12345667-8
|
|
|
|
```
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## disqus
|
|
|
|
|
2018-11-10 16:12:36 -05:00
|
|
|
This option allows you to enable Disqus with your shortname.
|
2016-08-14 23:25:27 -04:00
|
|
|
|
|
|
|
> default: not set (which won't enable)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2020-07-02 11:22:52 -04:00
|
|
|
disqus: hedgedoc
|
2016-08-14 23:25:27 -04:00
|
|
|
```
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## type
|
|
|
|
|
2018-11-10 16:11:07 -05:00
|
|
|
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 16:12:36 -05:00
|
|
|
```yml
|
2018-11-10 16:11:07 -05:00
|
|
|
type: slide
|
|
|
|
```
|
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## slideOptions
|
|
|
|
|
2018-11-10 16:12:36 -05:00
|
|
|
This option allows you to provide custom options to slide mode.
|
2022-09-01 05:14:26 -04:00
|
|
|
|
|
|
|
Slide mode is achieved using [Reveal](https://revealjs.com/), an HTML presentation framework.
|
2022-09-01 05:29:58 -04:00
|
|
|
The current stable version of HedgeDoc uses Reveal 3.
|
2022-09-01 05:14:26 -04:00
|
|
|
|
2022-09-01 08:19:54 -04:00
|
|
|
See the document below for more details on the available slide options:
|
2022-09-01 05:14:26 -04:00
|
|
|
<https://github.com/hakimel/reveal.js/blob/3.9.2/README.md#configuration>
|
2016-07-31 12:08:44 -04:00
|
|
|
|
2017-06-03 01:33:07 -04:00
|
|
|
You could also set slide theme which named in below css files:
|
2020-07-01 05:52:17 -04:00
|
|
|
<https://github.com/hakimel/reveal.js/tree/master/css/theme>
|
2017-06-03 01:33:07 -04:00
|
|
|
|
2016-07-31 12:08:44 -04:00
|
|
|
**Notice: always use two spaces as indention in YAML metadata!**
|
|
|
|
|
|
|
|
> default: not set (which use default slide options)
|
|
|
|
|
|
|
|
**Example**
|
2018-11-10 16:12:36 -05:00
|
|
|
```yml
|
2016-07-31 12:08:44 -04:00
|
|
|
slideOptions:
|
|
|
|
transition: fade
|
2017-06-03 01:33:07 -04:00
|
|
|
theme: white
|
2018-06-22 15:07:30 -04:00
|
|
|
```
|
2019-10-04 13:58:02 -04:00
|
|
|
|
2020-07-01 05:52:17 -04:00
|
|
|
## opengraph
|
|
|
|
|
2022-09-01 05:14:26 -04:00
|
|
|
This option allows you to override the default generated opengraph metadata.
|
2019-10-04 13:58:02 -04:00
|
|
|
See the [OpenGraph protocol documentation](https://ogp.me) for more information.
|
|
|
|
|
|
|
|
**Notice: always use two spaces as indention in YAML metadata!**
|
|
|
|
|
2022-09-01 05:14:26 -04:00
|
|
|
> default: not set (uses auto-generated metadata)
|
2019-10-04 13:58:02 -04:00
|
|
|
|
|
|
|
**Example**
|
|
|
|
```yml
|
|
|
|
opengraph:
|
|
|
|
title: Special title for OpenGraph protocol
|
|
|
|
image: https://dummyimage.com/600x600/000/fff
|
|
|
|
image:type: image/png
|
|
|
|
```
|