mirror of
https://github.com/TxtDot/dalet.git
synced 2024-12-24 03:33:47 +03:00
doc: update daleth concept
This commit is contained in:
parent
94dc040a3d
commit
b3261ef4c8
3 changed files with 61 additions and 29 deletions
65
README.md
65
README.md
|
@ -19,24 +19,39 @@ Markup language ecosystem сombining small file size, big number of possibilitie
|
|||
This is Daleth (high level language that compiles to Daletl).
|
||||
|
||||
```yaml
|
||||
# tag: body
|
||||
# each line is a new tag (if not {}, () is used)
|
||||
# tag syntax
|
||||
#
|
||||
# tag: text body
|
||||
# tag (multiline text body)
|
||||
# body text always trimmed
|
||||
#
|
||||
# tag { multiple tags body }
|
||||
#
|
||||
# Arguments
|
||||
# tag[argument]
|
||||
#
|
||||
# Tags without body and argument also supported
|
||||
|
||||
meta[title]: Daleth syntax concept
|
||||
meta[description]: This document describes Daleth syntax and some tags
|
||||
|
||||
h[1]: TxtDot revolution
|
||||
p: TxtDot is a cool project
|
||||
|
||||
# If no tag is specified, then the 'element' tag, the most primitive tag, is placed
|
||||
# If no tag is specified, then the 'paragraph' tag is placed
|
||||
# () for block of text
|
||||
(
|
||||
Check Dalet too
|
||||
This is one paragraph
|
||||
)
|
||||
|
||||
This is another paragraph
|
||||
br
|
||||
|
||||
# [ ] for argument
|
||||
row[center]: {
|
||||
row[center] {
|
||||
link[https://github.com/txtdot/txtdot]: Homepage
|
||||
btn[https://example.com/donate]: {
|
||||
btn[https://example.com/donate] {
|
||||
# tag without body
|
||||
img[https://example.com/donate.png]
|
||||
Donate
|
||||
|
@ -44,11 +59,11 @@ row[center]: {
|
|||
}
|
||||
|
||||
# {} for multiple objects
|
||||
row: {
|
||||
row {
|
||||
{
|
||||
h[2]: Features
|
||||
|
||||
ul: {
|
||||
ul {
|
||||
Server-side page simplification
|
||||
Media proxy
|
||||
Image compression with Sharp
|
||||
|
@ -69,24 +84,24 @@ row: {
|
|||
h[3]: Dev
|
||||
|
||||
# () for multiline strings, indent is automatically trimmed
|
||||
code: (
|
||||
code (
|
||||
npm install
|
||||
npm run dev
|
||||
)
|
||||
|
||||
# (~n Text) n is number of minimum spaces
|
||||
code[markdown]: (~4
|
||||
code[markdown] (~4
|
||||
this is codeblock
|
||||
)
|
||||
|
||||
# (# Text) Text after "(# " not modified
|
||||
code[markdown]: (# this is codeblock)
|
||||
code[markdown] (# this is codeblock)
|
||||
}
|
||||
|
||||
{
|
||||
h[3]: Production
|
||||
|
||||
code: (
|
||||
code (
|
||||
npm install
|
||||
npm run build
|
||||
npm run start
|
||||
|
@ -103,22 +118,22 @@ row: {
|
|||
}
|
||||
|
||||
# Table has custom format if text used
|
||||
# +< cells > - primary column
|
||||
# < cells > - secondary column
|
||||
# < Element | Description > - converts to
|
||||
# tcol: {
|
||||
# +| cells | - primary column
|
||||
# | cells | - secondary column
|
||||
# | Element | Description | - converts to
|
||||
# tcol {
|
||||
# Element
|
||||
# Description
|
||||
# }
|
||||
table: (
|
||||
+< Element | Description >
|
||||
< h | Heading >
|
||||
< p | Paragraph >
|
||||
< img | Image >
|
||||
< link | Link >
|
||||
< btn | Button >
|
||||
< ul | Unordered list >
|
||||
< br | Line break >
|
||||
+< quantity | 7 >
|
||||
table (
|
||||
+| Element | Description |
|
||||
| h | Heading |
|
||||
| p | Paragraph |
|
||||
| img | Image |
|
||||
| link | Link |
|
||||
| btn | Button |
|
||||
| ul | Unordered list |
|
||||
| br | Line break |
|
||||
+| quantity | 7 |
|
||||
)
|
||||
```
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Daletl
|
||||
|
||||
Daletl is data representation of serialized/deserialized [DaletPack](./daletpack.md).
|
||||
Daletl is data representation of deserialized [DaletPack](./daletpack.md).
|
||||
|
||||
### Page
|
||||
|
||||
|
|
|
@ -481,7 +481,7 @@ disc[Click to expand]: I am Disclosure
|
|||
|
||||
| Property | Description |
|
||||
| -------- | ----------------------------- |
|
||||
| name | bl |
|
||||
| name | block |
|
||||
| id | 26 |
|
||||
| body | text, tags |
|
||||
| argument | optional; start, center, end |
|
||||
|
@ -491,7 +491,7 @@ Creates block element. Can be used for aligning. By default aligned to center.
|
|||
**Daleth example**:
|
||||
|
||||
```yaml
|
||||
bl: I am Block
|
||||
block: I am Block
|
||||
```
|
||||
|
||||
Argument converts to numbers in daletl.
|
||||
|
@ -549,6 +549,23 @@ Creates pre formatted text block. Like code but without style and highlight.
|
|||
|
||||
**Daleth example**:
|
||||
|
||||
```txt
|
||||
```yaml
|
||||
pre: I am pre
|
||||
```
|
||||
|
||||
## 30. Metadata
|
||||
|
||||
| Property | Description |
|
||||
| -------- | -------------- |
|
||||
| name | meta |
|
||||
| id | 30 |
|
||||
| body | text |
|
||||
| argument | text |
|
||||
|
||||
Not displayed. Specifies metadata such as title, description. Must be before all tags if specified.
|
||||
|
||||
**Daleth example**:
|
||||
|
||||
```yaml
|
||||
meta[description]: I am description
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue