Add placeholders chapter

Signed-off-by: trivernis <trivernis@protonmail.com>
main
trivernis 4 years ago
parent 1b203e0bad
commit c17153f50e
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -37,11 +37,14 @@ It currently supports two keys:
```toml
[metadata]
# language setting of the document
# Language setting of the document
language = 'en'
# author of the document
# Author of the document
author = 'author'
# Title of the document
title = 'title'
```

@ -48,4 +48,9 @@ You can force Snekdown to use the long form for an entry by writing
```
~~SHORT
~~HTML
~~HTML
The list of glossary entries can be inserted with the `[[GLS]]` placeholder.
[[GLS]]

@ -0,0 +1,30 @@
# Placeholders
Placeholders are used to insert additional content or variables in the document.
The syntax for placeholders is:
```
[[PLACEHOLDER]]
# Example
[[date]]
```
The most commonly used placeholders are:
| Placeholder | Meaning |
| ----------------------------- | ----------------------------------------------------- |
| `[[TOC]][ordered=true/false]` | Inserts the table of contents at the current position |
| `[[BIB]]` | Inserts the bibliography list at the current position |
| `[[GLS]]` | Inserts the glossary list at the current position |
| `[[date]]` | Inserts the current date |
| `[[time]]` | Inserts the current time |
| `[[datetime]]` | Inserts the current date and time |
| `[[author]]` | Inserts the author of the document |
| `[[title]]` | Inserts the title of the document |
&nbsp;
Additionally all entries defined in the `custom_attributes` section of the configuration
can be inserted as placeholders.

@ -7,7 +7,7 @@
- - -
##[toc-hidden] Table of Contents
[[TOC]]
[[TOC]][ordered]
- - -
@ -53,4 +53,7 @@
<[chapters/configuration.md]
- - -
- - -
<[chapters/placeholders.md]

Loading…
Cancel
Save