A markup language for narratives
To create a narrative, add a name in front of a sentence, split with a colon and a space : .
Socrates: All men are mortal
You can add a slash / in front of the name, representing that the narrator is subjective.
/Plato: Socrates is a man
You can add a back slash \ in front of the name, representing that the narrator is objective.
\Socrates: Therefore, Socrates is mortal
Without a name, the sentence represents that it is directive.
Socrates died by drinking poison hemlock.
You can represent a media by wrapping link text in brackets [ ],
[https://picsum.photos/200]
You can represent a media in a narrative.
Plato: [https://picsum.photos/200]
You can add a YAML front matter block, which must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines.
---
title: Syllogismus
description: An example featuring Socrates and Plato
---
In a header, you can assign avatars and other properties in narrators collection with each name as a key.
---
narrators:
- name: Socrates
type: 2
avatar: [https://picsum.photos/200]
---
Type number represents whether the narrator is subjective, objective or descriptive.
If you represent a type explicitly in a line with / or \, types assigned to narrators in a header are overwritten.
A parsed result is consisted of header and contents.
contents is a collection of content.
A header contains properties which is declared in a YAML front matter block.
Each content in contents has properties as below:
| property | type |
|---|---|
| name | string |
| type | number |
| avatar | string |
| message | string |
| media | string |
This project is licensed under the terms of the MIT license.