This goldmark extension extend commonmark syntax:
- uses Markdown's image syntax
![]()
to support other objects. - add highlight syntax for inline text.
- add title to links
- YouTube Video
- Bilibili Video
- X(formly Twitter)'s Tweet Oembed Widget
- TradingView Chart
- Quaily List and Article
- Add options to images
- dify.ai Widget
- Spotify Embed
- html5 audio
- Discord Server Widget
import (
enclave "github.com/quailyquaily/goldmark-enclave"
"github.com/yuin/goldmark"
)
// ...
markdown := goldmark.New(
goldmark.WithExtensions(
enclave.New(),
),
)
And then you can use it like this:
Youtube Video:

Bilibili Video:

Twitter Tweet:

TradingView Chart:

Quail List and Post


Image with caption and giving it a width:

Dify Widget

Spotify Embed

HTML5 Audio

Some objects support options:
theme
: The theme of the TradingView chart, twitter tweet and quaily widget. Default:light
- e.g.

- e.g.
width
/w
andheight
/h
: The width and height of images. Default:auto
- e.g.

- e.g.
import (
enclaveMark "github.com/quailyquaily/goldmark-enclave/mark"
"github.com/yuin/goldmark"
)
// ...
markdown := goldmark.New(
goldmark.WithExtensions(
enclaveMark.New(),
),
)
This is a ==highlighted text==.
will be rendered as:
<p>This is a <mark>highlighted text</mark>.</p>
import (
enclaveHref "github.com/quailyquaily/goldmark-enclave/href"
"github.com/yuin/goldmark"
)
// ...
markdown := goldmark.New(
goldmark.WithExtensions(
enclaveHref.New(&enclaveHref.Config{}),
),
)
[Quail](/blog "Quail Blog")
will be rendered as:
<a href="https://quaily.com/blog" title="Quail Blog">Quail</a>
go get github.com/quailyquaily/goldmark-enclave