dalet/README.md

152 lines
3 KiB
Markdown
Raw Normal View History

2024-07-22 19:43:20 +03:00
<div align="center">
2024-07-23 19:00:02 +03:00
![Dalet](https://github.com/TxtDot/.github/blob/main/imgs/dalet.png?raw=true)
2024-07-22 19:43:20 +03:00
# Dalet
2024-07-22 19:43:20 +03:00
</div>
Markup language ecosystem сombining small file size, big number of possibilities for describing the interface and readability.
2024-07-22 20:58:07 +03:00
[Specification](./specification/main.md).
2024-08-02 19:49:33 +03:00
[Rust implementation](https://github.com/TxtDot/dalet-rs)
2024-07-22 20:58:07 +03:00
2024-07-23 12:45:41 +03:00
> [!WARNING]
2024-07-27 17:44:34 +03:00
> Specification is not complete and very unstable.
2024-07-23 12:45:41 +03:00
2024-07-22 20:58:07 +03:00
## Concept
2024-07-23 19:00:02 +03:00
This is Daleth (high level language that compiles to Daletl).
2024-07-22 20:58:07 +03:00
```yaml
# multilines
#
2024-08-08 09:16:16 +03:00
# `text` - input is trimmed with indent
#
2024-08-08 09:16:16 +03:00
# `~n text` - n is number of minimum spaces to add after trimming with indent
# for each line
#
2024-08-08 09:16:16 +03:00
# `# text` - input not modified
#
2024-08-07 15:54:57 +03:00
# tag syntax
#
# tag: text body
2024-08-08 09:16:16 +03:00
# tag { multiline text body }
2024-07-23 17:39:24 +03:00
# body text always trimmed
2024-08-07 15:54:57 +03:00
#
2024-08-08 09:16:16 +03:00
# tag [ multiple tags body ]
2024-08-07 15:54:57 +03:00
#
# Arguments
2024-08-08 09:16:16 +03:00
# tag(argument)
2024-08-07 15:54:57 +03:00
#
# Tags without body and argument also supported
2024-08-08 09:16:16 +03:00
meta(title): Daleth syntax concept
meta(description): This document describes Daleth syntax and some tags
2024-08-07 15:54:57 +03:00
2024-08-08 09:16:16 +03:00
h(1): TxtDot revolution
2024-07-22 20:58:07 +03:00
p: TxtDot is a cool project
# If no tag is specified, then the 'el' tag is placed
This is element
br
2024-08-08 09:16:16 +03:00
# if no tag is specified but a '{}' is present, then the 'p' tag is placed
# '\n' is deleted only in this format. If a break line is needed in a paragraph, use ' \n'.
2024-08-08 09:16:16 +03:00
{
Check Dalet too
This is one paragraph
2024-08-08 09:16:16 +03:00
}
2024-08-08 09:16:16 +03:00
{ This is another paragraph }
2024-08-08 09:16:16 +03:00
# ( ) for argument
row(center) [
link(https://github.com/txtdot/txtdot): Homepage
btn(https://example.com/donate) [
# tag without body
2024-08-08 09:16:16 +03:00
img(https://example.com/donate.png)
Donate
2024-08-08 09:16:16 +03:00
]
]
2024-08-08 09:16:16 +03:00
# [] for multiple tags
row [
[
h(2): Features
2024-07-22 20:58:07 +03:00
2024-08-08 09:16:16 +03:00
ul [
2024-07-22 20:58:07 +03:00
Server-side page simplification
Media proxy
Image compression with Sharp
2024-08-08 09:16:16 +03:00
Rendering client-side apps `Vanilla, React, Vue, etc` with webder
2024-07-22 20:58:07 +03:00
Search with SearXNG
Handy API endpoints
No client JavaScript
Some kind of Material Design 3
Customization with plugins, see @txtdot/sdk and @txtdot/plugins
2024-08-08 09:16:16 +03:00
]
2024-07-22 20:58:07 +03:00
2024-08-08 09:16:16 +03:00
]
2024-07-22 20:58:07 +03:00
2024-08-08 09:16:16 +03:00
[
h(2): Running
2024-07-22 20:58:07 +03:00
2024-08-08 09:16:16 +03:00
[
h(3): Dev
2024-07-22 20:58:07 +03:00
2024-08-08 09:16:16 +03:00
# {} for multiline strings, indent is automatically trimmed
code {
2024-07-22 20:58:07 +03:00
npm install
npm run dev
2024-08-08 09:16:16 +03:00
}
2024-08-08 09:16:16 +03:00
# {~n Text} n is number of minimum spaces
code[markdown] {~4
this is codeblock
2024-08-08 09:16:16 +03:00
}
2024-08-08 09:16:16 +03:00
# {# Text} Text after "`# " not modified
code[markdown] {# this is codeblock}
]
2024-07-22 20:58:07 +03:00
2024-08-08 09:16:16 +03:00
[
h(3): Production
2024-07-22 20:58:07 +03:00
2024-08-08 09:16:16 +03:00
code {
2024-07-22 20:58:07 +03:00
npm install
npm run build
npm run start
2024-08-08 09:16:16 +03:00
}
]
2024-07-22 20:58:07 +03:00
2024-08-08 09:16:16 +03:00
[
h(3): Docker
2024-07-22 20:58:07 +03:00
code: docker compose up -d
2024-08-08 09:16:16 +03:00
]
2024-07-22 20:58:07 +03:00
2024-08-08 09:16:16 +03:00
]
]
2024-07-23 17:39:24 +03:00
# Table has custom format if text used
2024-08-07 15:54:57 +03:00
# +| cells | - primary column
# | cells | - secondary column
# | Element | Description | - converts to
2024-08-08 09:16:16 +03:00
# tcol [
# Element
# Description
2024-08-08 09:16:16 +03:00
# ]
table {
+| Tag | Description |
2024-08-07 15:54:57 +03:00
| h | Heading |
| p | Paragraph |
| img | Image |
| link | Link |
| btn | Button |
| ul | Unordered list |
| br | Line break |
+| quantity | 7 |
2024-08-08 09:16:16 +03:00
}
2024-07-22 20:58:07 +03:00
```