&.
nothing beautiful can last
Kami tries to be a machine-first human-also-first markup language. It is designed with the purpose of being strictly an intermediary between our text styling desires and HTML. It was made as a way to have more control over what the HTML output of a markup file will look like. I think things like Markdown and Textile are centered too much around human readability and don't care about being a tool for design. This is something that can be good in some contexts (for example, markdown is great if you're making a chat application) but too limiting in others. Kami tries to stand in the middle between what computers and people want. A pretty hard goal to achieve considering that it's designed for someone that has always been a person and has never been a computer.
Bold text is surrounded with single asterisks (*
) and italic text is surrounded with single underscores (_
). Like this:
*bold* _italic_
In visual browsers, bold and strong look the same. The same is the case for italic and emphasis, but screen readers care about this distinction, as bold and italic are merely aesthetic but strong and emphasis are not. In KAMI, they're the same as their aesthetic counterparts, but doubled. Like this:
**strong** __emphasis__
Hyperlinks use Markdown syntax, surrounding the visible text in square brackets ([]
) and the URL in parenthesis (()
). For exmaple:
[My website](https://ampersandia.net/)
Putting only the []
will make a link where the destination is the content of the []
.
Headers also use Markdown syntax, using an amount of #
to specify the heading level, like this:
## Second-level header
It is recommended that you put a space after the hash signs, but only mandatory if you're going to use kami with templ8.py.
Unordered lists are lines preceded by an asterisk and a space (*
). Ordered lists are lines preceded by a hash symbol, a period and a space (#.
), like this:
* Unordered list
#. Ordered list
Lists can be arbitrarily nested, that is to say, you can have lists within lists. Even things such as, for example, ordered lists within unordered lists.
Attribute sequences go inside curly brackets ({}
). An attribute sequence will give attributes to the element right before it. There must be no spaces between an element and its attribute sequence, (unless said element contains spaces, in which case the elements must keep their spaces). In an attribute sequence, the ID is preceded by a hashtag (#
) and the classes are preceded by a period (.
). Other attributes are written like you would do it in HTML, attr="value"
. Here are some examples:
*text*{#foo .bar}
is a bold text with foo
as ID and bar
as a class.[Me](https://ampersandia.net/){rel="me"}
is a hyperlink with a rel="me"
attribute.* {.foo}
is an unordered list element with foo
as a class.You can give attributes to the <ul>
and <ol>
tags that surround lists by putting an attribute sequence on the line before the list (or sublist) starts.
Escaping is done with backslashes. It is also possible to escape several characters in the same line by using \=
as a starting bracket and =
as a closing bracket.
Kami tables are, for the most part, simple to use. They work like how you'd expect a plaintext table format for tables to work. You surround each cell with vertical bars (|
). The following are all the modifiers that can be put on a kami table.
|*
. Any cell can be a header, not only the top row cells.cX
to the right of the opening bar. X can be any number. For rowspan, use rX
.|-
to indicate that it must be ignored. Kami won't add these cells to the output table, but they must be put there to make sure the tables look consistent in plaintext.<tr>
tag), put an attribute sequence after the row.Any of the cell modifiers can be on any order as long as they are all after the vertical bar. This gives the user the freedom to organize them in whichever way they find most intuitive.