2024-08-08 12:25:12 +03:00
|
|
|
# multilines
|
|
|
|
#
|
|
|
|
# {text} - input is trimmed with indent
|
|
|
|
#
|
|
|
|
# {~n text} - n is number of minimum spaces to add after trimming with indent
|
|
|
|
# for each line
|
|
|
|
#
|
2024-08-09 18:24:42 +03:00
|
|
|
# {#text} - input not modified
|
|
|
|
#
|
2024-08-08 12:25:12 +03:00
|
|
|
#
|
|
|
|
# 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
|
2024-08-09 18:24:42 +03:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# custom no tag syntax
|
|
|
|
#
|
|
|
|
# {-text} - paragraph, text indent is trimmed
|
|
|
|
# [[tags]] - element tag with body of multiple tags
|
|
|
|
# text - element tag with text body
|
2024-08-08 12:25:12 +03:00
|
|
|
|
|
|
|
meta "title": Daleth syntax concept
|
|
|
|
meta "description": This document describes Daleth syntax and some tags
|
|
|
|
|
|
|
|
h1: TxtDot revolution
|
|
|
|
p: TxtDot is a cool project
|
|
|
|
|
2024-08-14 10:02:39 +03:00
|
|
|
# If no tag is specified, but "- text" present, then the 'el' tag is placed
|
2024-08-09 18:24:42 +03:00
|
|
|
|
2024-08-14 10:02:39 +03:00
|
|
|
- This is element
|
2024-08-08 12:25:12 +03:00
|
|
|
br
|
|
|
|
|
2024-08-09 18:24:42 +03:00
|
|
|
# if no tag is specified but a '{- text}' is present, then the 'p' tag is placed
|
2024-08-11 16:26:34 +03:00
|
|
|
# '\n' is replaced with ' ' in this format.
|
2024-08-09 18:24:42 +03:00
|
|
|
{-
|
2024-08-11 16:32:23 +03:00
|
|
|
Check Dalet too
|
|
|
|
This is one paragraph
|
2024-08-08 12:25:12 +03:00
|
|
|
}
|
|
|
|
|
2024-08-11 16:26:34 +03:00
|
|
|
{-
|
2024-08-11 16:32:23 +03:00
|
|
|
This is another paragraph ({- text\})
|
2024-08-11 16:26:34 +03:00
|
|
|
}
|
2024-08-08 12:25:12 +03:00
|
|
|
|
|
|
|
row "center" [
|
2024-08-11 16:32:23 +03:00
|
|
|
link "https://github.com/txtdot/txtdot": Homepage
|
|
|
|
btn "https://example.com/donate" [
|
|
|
|
# tag without body
|
|
|
|
img "https://example.com/donate.png"
|
2024-08-14 10:02:39 +03:00
|
|
|
- Donate
|
2024-08-11 16:32:23 +03:00
|
|
|
]
|
2024-08-08 12:25:12 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
# [] for multiple tags
|
|
|
|
row [
|
2024-08-11 16:32:23 +03:00
|
|
|
# if no tag is specified but a '[[]]' is present, then the 'el' tag
|
|
|
|
# with multiple tags body placed
|
2024-08-14 17:17:31 +03:00
|
|
|
|
2024-08-09 18:24:42 +03:00
|
|
|
[[
|
2024-08-11 16:32:23 +03:00
|
|
|
h2: Features
|
|
|
|
|
|
|
|
ul [
|
2024-08-14 10:02:39 +03:00
|
|
|
- Server-side page simplification
|
|
|
|
- Media proxy
|
|
|
|
- Image compression with Sharp
|
|
|
|
- Rendering client-side apps `Vanilla, React, Vue, etc` with webder
|
|
|
|
- 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-11 16:32:23 +03:00
|
|
|
]
|
2024-08-09 18:24:42 +03:00
|
|
|
]]
|
2024-08-08 12:25:12 +03:00
|
|
|
|
2024-08-09 18:24:42 +03:00
|
|
|
[[
|
2024-08-11 16:32:23 +03:00
|
|
|
h2: Running
|
|
|
|
|
|
|
|
[[
|
|
|
|
h3: Dev
|
|
|
|
|
|
|
|
# {} for multiline strings, indent is automatically trimmed
|
2024-08-14 17:17:31 +03:00
|
|
|
code "bash" {
|
2024-08-11 16:32:23 +03:00
|
|
|
npm install
|
|
|
|
npm run dev
|
|
|
|
}
|
|
|
|
|
2024-08-12 13:20:46 +03:00
|
|
|
# {# Text} Text after "{#" not modified
|
|
|
|
code "markdown" {# this is codeblock}
|
2024-08-11 16:32:23 +03:00
|
|
|
]]
|
|
|
|
|
|
|
|
[[
|
|
|
|
h3: Production
|
2024-08-14 17:17:31 +03:00
|
|
|
code "bash" {
|
2024-08-11 16:32:23 +03:00
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
npm run start
|
|
|
|
}
|
|
|
|
]]
|
|
|
|
|
|
|
|
[[
|
|
|
|
h3: Docker
|
2024-08-14 17:17:31 +03:00
|
|
|
code "bash": docker compose up -d
|
2024-08-11 16:32:23 +03:00
|
|
|
]]
|
2024-08-08 12:25:12 +03:00
|
|
|
|
2024-08-09 18:24:42 +03:00
|
|
|
]]
|
2024-08-08 12:25:12 +03:00
|
|
|
]
|
|
|
|
|
2024-08-12 20:21:19 +03:00
|
|
|
# Table has custom format
|
2024-08-08 12:25:12 +03:00
|
|
|
# +| cells | - primary column
|
|
|
|
# | cells | - secondary column
|
|
|
|
# | Element | Description | - converts to
|
2024-08-12 20:30:46 +03:00
|
|
|
# trow [
|
2024-08-08 12:25:12 +03:00
|
|
|
# Element
|
|
|
|
# Description
|
|
|
|
# ]
|
2024-08-12 20:21:19 +03:00
|
|
|
{> table
|
|
|
|
[[ Tag | Description ]]
|
|
|
|
[ h | Heading ]
|
|
|
|
[ p | Paragraph ]
|
|
|
|
[ img | Image ]
|
|
|
|
[ link | Link ]
|
|
|
|
[ btn | Button ]
|
|
|
|
[ ul | Unordered list ]
|
|
|
|
[ br | Line break ]
|
|
|
|
[[ quantity | 7 ]]
|
2024-08-12 20:30:46 +03:00
|
|
|
}
|