# README
goldmark-enclave
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
Embeded Objects
Supported Objects
- YouTube Video
- Bilibili Video
- X(formly Twitter)'s Tweet Oembed Widget
- TradingView Chart
- Quail List and Article
- Add options to images
- dify.ai Widget
Planned Objects
- Discord Server Widget
Usage
import (
enclave "github.com/quail-ink/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

Options
theme
: The theme of the TradingView chart, twitter tweet and quail widget. Default:light
- e.g.

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

- e.g.
Highlight Text
Usage
import (
enclaveMark "github.com/quail-ink/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>
Title to Links
Usage
import (
enclaveHref "github.com/quail-ink/goldmark-enclave/href"
"github.com/yuin/goldmark"
)
// ...
markdown := goldmark.New(
goldmark.WithExtensions(
enclaveHref.New(&enclaveHref.Config{
InternalLinkBase: "https://quail.ink",
}),
),
)
[Quail](/blog "Quail Blog")
will be rendered as:
<a href="https://quail.ink/blog" title="Quail Blog">Quail</a>
Demo
Installation
go get github.com/quail.ink/goldmark-enclave
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
# Type aliases
No description provided by the author