An open API service indexing awesome lists of open source software.

https://github.com/jevko/jevkoml

(EXPERIMENTAL) A Jevko format for markup translatable to HTML or XML.
https://github.com/jevko/jevkoml

convert deno format html jevko jevkoml markup minimal syntax text translate xml

Last synced: 13 days ago
JSON representation

(EXPERIMENTAL) A Jevko format for markup translatable to HTML or XML.

Awesome Lists containing this project

README

          

NOTE: experimental

# jevkoml

Codename .jevkoml.

A [Jevko](https://jevko.org) format for markup that translates to HTML/XML.

Compared to HTML or XML, .jevkoml is delightful to write, edit, or generate -- by hand or otherwise.

.jevkoml can make authoring and maintaining HTML documents, XML configurations, SVG graphics, and countless other XML-based formats much more pleasant.

Gives you the full power of XML by supporting its data model and XML literals.

On top of that you get a much simpler and leaner syntax with:

* here documents (heredocs) -- like CDATA, but with user-defined end-marker, so no issues with being unable to escape the `]]>` token
* ability to disable (comment out) an entire subtree by prefixing it with `-` -- much more convenient and powerful than HTML/XML comments

.jevkoml is best used in combination with the [Jevko CLI](https://github.com/jevko/jevko-cli) -- which gives you additional features, such as:

* self-contained .jevkoml documents that know how to convert themselves to specific HTML/XML files
* ability to wrap the HTML/XML result in a root tag or a sequence of nested tags with top-level attributes applied to the root
* ability to make .jevkoml documents executable thanks to Jevko CLI support for shebangs -- you can convert a document simply by executing it!

## Example

For example, a .jevkoml document like:

![screenshot](screenshot.png)

converts into something like this:

```HTML


This is a title



Hello world!


HTML

A link to Wikipedia!


Oh well, c'est la vie, as they say in France.



```

See [jevkoml.md](jevkoml.md) for details.

Also see the [.jevkoml syntax highlighting extension for Visual Studio Code](https://github.com/jevko/jevkoml-basic-highlighting-vscode) which was used to produce the screenshot above.

# HTML/XML literals

You can enter literal HTML/XML which will not be escaped in the output via `` `'xml' `` or `` `'html' `` heredocs. For example:

```
`'html'

'html'

p [hello]

`'html'

'html'
```

will produce something like:

```html

hello

```