Skip to content

Adam-Elmi/SomMark

Repository files navigation

SomMark Cover

SomMark is a declarative, extensible markup language for structured content that can be converted to HTML, Markdown, MDX, JSON, and more.

SomMark Playground Badge


Try SomMark Playground

Test SomMark features live here: https://adam-elmi.github.io/SomMark-Playground/


SomMark v2

Warning

Old version(v1) is no longer supported.

SomMark lets you write structured content that can be converted to HTML, Markdown, JSON, or other formats. Unlike standard Markdown, it uses explicit syntax for blocks and elements, making content easier to process, customize, and transform.

Installation

To install the Command Line Interface (CLI) globally:

npm install -g sommark

Usage

Using the CLI

You can convert files using the terminal.

# Convert to HTML
sommark --html input.smark -o output

# Convert to Markdown
sommark --markdown input.smark -o output.md

Using in Code

You can use SomMark in your JavaScript or Node.js projects.

import SomMark from "sommark";

const source = `
[Block]
Hello World
[end]
`;

const smark = new SomMark({
	src: source,
	format: "html"
});

console.log(await smark.transpile());

Supported Languages

  • HTML
  • Markdown
  • MDX (Only ready components)
  • JSON

Documentation

Detailed guides and API references are available in the docs/ directory:

About

SomMark is a declarative, extensible markup language for structured content that can be converted to HTML, Markdown, MDX, JSON, and more.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages