diff --git a/README.md b/README.md index a5c2945..e428629 100644 --- a/README.md +++ b/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 | ) ``` diff --git a/specification/daletl.md b/specification/daletl.md index e6d0eba..86a0f22 100644 --- a/specification/daletl.md +++ b/specification/daletl.md @@ -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 diff --git a/specification/tags.md b/specification/tags.md index b705885..988db28 100644 --- a/specification/tags.md +++ b/specification/tags.md @@ -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 +```