https://github.com/adam-elmi/sommark
SomMark is a simple and extensible markup language designed for writing documentation and structured content.
https://github.com/adam-elmi/sommark
docs documentation dsl html json json-langugae langauge mapper mapping markdown markup markup-language mdx parser transpiler
Last synced: 3 months ago
JSON representation
SomMark is a simple and extensible markup language designed for writing documentation and structured content.
- Host: GitHub
- URL: https://github.com/adam-elmi/sommark
- Owner: Adam-Elmi
- License: mit
- Created: 2025-10-02T20:46:52.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2026-02-17T20:29:40.000Z (4 months ago)
- Last Synced: 2026-02-18T01:26:53.022Z (4 months ago)
- Topics: docs, documentation, dsl, html, json, json-langugae, langauge, mapper, mapping, markdown, markup, markup-language, mdx, parser, transpiler
- Language: JavaScript
- Homepage:
- Size: 2.8 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

SomMark v3 is a simple, flexible markup language for structured content.

----
## Try SomMark Playground
Test SomMark live in your browser:
[https://adam-elmi.github.io/SomMark-Playground/](https://adam-elmi.github.io/SomMark-Playground/)
----
# What's new in v3?
SomMark v3 is faster, more powerful, and easier to extend.
- **HTML Support**: Full HTML5 Support
- **Markdown Support**: Full Markdown Support
- **JSON Support**: Full JSON Support
- **MDX Support**: Full MDX Support
- **Plugin System**: Add new features without changing the core code.
- **Modular Support**: Easily import files and use variables.
- **Type-Safe Rules**: Set requirements for tags and attributes.
- **Clean Syntax**: Simplified block, atblock & inline rules and better error handling.
# Installation
```bash
npm install -g sommark
```
# Usage
## v3 Syntax Example
SomMark is designed to be readable and clear.
```ini
# Html
[h1]Welcome to SomMark v3[end]
[section = class: "hero", id: "main"]
[a = href: "https://sommark.org"]Visit Website[end]
[end]
# Markdown
[quote]
SomMark is simple and powerful.
[end]
[bold]Check out our syntax guide![end]
# Json
[Json= object]
[Object = "user"]
(name)->(string: "Adam Elmi")
(age)->(number: 25)
(is_active_user)->(bool: true)
[end]
[end]
```
## Using in JavaScript
```javascript
import SomMark from "sommark";
const smark = new SomMark({
src: '[h1]Hello World[end]',
format: "html"
});
console.log(await smark.transpile());
```
# Documentation
Read our detailed guides in the `docs/` folder:
- **[Syntax Guide](docs/03.syntax.md)**: How to write SomMark (Blocks, Inline, At-Blocks).
- **[Plugin System](docs/19.plugin-system.md)**: How to create your own plugins.
- **[Built-in Plugins](docs/20.built-in-plugins.md)**: Guide to standard plugins.
- **[Core API](docs/09.core.md)**: How to use SomMark in your code.
- **[Mapper API](docs/13.mapper.md)**: How to create new output formats.
- **[CLI Reference](docs/11.cli.md)**: Terminal commands and flags.
- **[API Quick Reference](docs/api)**: Fast lookup for all functions.
# Editor Support
### Editor Support
High-quality syntax highlighting and diagnostics are provided via **LSP Semantic Tokens**. This ensures perfect coloring in any editor that supports the Language Server Protocol (e.g., VS Code, Neovim, CoC).
Information for integration can be found in the [SomMark-LSP](https://github.com/Adam-Elmi/SomMark-LSP) project.