- a web building block for the desperate.teg files.
== This is a comment
== This is NOT a comment
All comments are skipped.
!exec_raw echo 'Hello, World!'
If the call exists, it will be executed, and the line replaced with the call's return.
Set variable to value!var variable=value
Declare the start of the webpage.!start
Run a command in your system's command interpreter and give its output to the Markdown processor!exec_raw command
Run a command and paste its output as a code block. Disables the Markdown processor for the contents of the code block!exec_fmt command
Execute a command and include its output as teg!exec_inc command
Include a file!inc file
Open an HTML tag on first call, remember the class, and close the tag on the second call for the same class!e element class options
!e div _ style="font-size: 90%;" -> <div style="font-size: 90%;">
Same as !e; just don't remember the class and don't close the element. Only use on self-closing tags!!eo element class options
{$variable$}{!call!}!var osname={!exec_raw . /etc/os-release&&echo $PRETTY_NAME||echo unknown!}
!start
My current distro is `{$osname$}`
Inline calls can be nested:
!var ls_args=-lF
!start
ls output: {!exec_fmt ls {$ls_args$}!}
... but please keep in mind that nesting can sometimes be very broken and cause unexpected issues.
hello {$who$} <- NO!
hello \{$who$} <- Yes!
File that is currently being processedfile
Page titletitle=file
Page description for OpenGraph embedsdescription
Page localelang=en-US
Return an HTTP status for use with CGIstatus
Content type for use with CGIctype=text/html
Browser style color (only for mobile)color_chrome
Add an OpenGraph image embedembed_img
Faviconicon
External CSS stylesheet to referencestyle
CSS stylesheet to include in HTMLstyle_inline
External JS to referencescript
Inline JS to include in HTMLscript_inline
Enable / disable debug loggingdebug=0
Abort processing and exit on errorexit_on_error=1
Ignore line breaks for the next N linesno_br=0
Halt processing for the next N linesno_proc=0
Current line, unprocessedcurr_line
Previous line, processedprev_line
Current element nesting levele_nest_lvl=0
Are we inside preformatted text?inside_pre=0
Are we inside a codeblock?inside_codeblock=0
code and some missing complex features like tables.
||[Click me]Boo!||
Line 1
Same line
Line 2
Line 4?
formats as
Line 1 Same line
Line 2
Line 4?
~~strikethrough!~~