Add imports chapter

Signed-off-by: trivernis <trivernis@protonmail.com>
main
trivernis 3 years ago
parent 87b2eec972
commit 1d5c0d8e02
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -0,0 +1,40 @@
# Imports
A key feature of Snekdown is splitting a document
into several files and importing those files in the main
document.
Additionally files that provide Glossary entries, Bibliography, Style and
Configurations can be imported with the same syntax.
```
<[path]
# import another snekdown document at the current position
<[document.md]
# import a stylesheet that will be embedded in the document
<[style.css][type=stylesheet]
# import a configuration file
<[Manifext.toml]
# import bibliography
<[MyBib.toml][type=bibliography]
# import a glossary
<[MyGls.toml][type=glossary]
```
The parser differentiates five different types of imported files.
- `document` - The default import which is just another Snekdown document
- `stylesheet` - CSS Stylesheets that are included when rendering
- `bibliography` - A file including bibliography
- `config/manifest` - A config file that contains metadata
- `glossary` - Glossary entries
Imports of Snekdown documents are parsed in a separate thread, so you
might see a performance improvement when splitting a large document into
several files.

@ -43,6 +43,10 @@
- - -
<[chapters/imports.md]
- - -
<[chapters/bibliography.md]
- - -

Loading…
Cancel
Save