⚠️ This project is no longer actively maintained.A complete rewrite of this language is being developed based on Goldmark, using an AST-based architecture. The new version is called Compono and is available at: https://github.com/umono-cms/compono
UmonoLang will no longer be used in Umono CMS.
A domain-specific language to provide Umono's users to create page contents.
- CommonMark compatibility
- HTML output
- Components able to nested for reusability
package main
import (
ul "github.com/umono-cms/umono-lang"
"github.com/umono-cms/umono-lang/converters"
)
func main() {
umonoLang := ul.New(converters.NewHTML())
umonoLang.SetGlobalComponent("HEADER", "This is a *global* component example.")
input := `HEADER
CONTENT
{{ LINK text="click me!" url="https://github.com/umono-cms/umono" new-tab=true }}
~ CONTENT
This is a **local** component example.`
output := umonoLang.Convert(input)
// <p>This is a <em>global</em> component example.</p><p>This is a <strong>local</strong> component example.</p><p><a href="https://github.com/umono-cms/umono" target="_blank" rel="noopener noreferrer">click me!</a></p>
}