Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

umono-cms/umono-lang

Repository files navigation

⚠️ 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.

UmonoLang

A domain-specific language to provide Umono's users to create page contents.

Go Report Card MIT license

Features

  • 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>
}

About

A domain-specific language for Umono

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages