Categorygithub.com/quail-ink/goldmark-enclave
modulepackage
0.1.3
Repository: https://github.com/quail-ink/goldmark-enclave.git
Documentation: pkg.go.dev

# 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

Planned Objects

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:

![](https://youtu.be/dQw4w9WgXcQ?si=0kalBBLQpIXT1Wcd)

Bilibili Video:

![](https://www.bilibili.com/video/BV1uT4y1P7CX)

Twitter Tweet:

![](https://twitter.com/NASA/status/1704954156149084293)

TradingView Chart:

![](https://www.tradingview.com/chart/AA0aBB8c/?symbol=BITFINEX%3ABTCUSD)

Quail List and Post

![](https://quail.ink/blog)

![](https://quail.ink/blog/p/extended-markdown-syntax?theme=dark)

Image with caption and giving it a width:

![](https://your-image.com/image.png?w=100px "This is a caption")

Dify Widget

![](https://udify.app/chatbot/1NaVTsaJ1t54UrNE)

Options

  • theme: The theme of the TradingView chart, twitter tweet and quail widget. Default: light
    • e.g. ![](https://twitter.com/NASA/status/1704954156149084293?theme=dark)
  • width / w and height / h: The width and height of images. Default: auto
    • e.g. ![](https://your-image.com/image.png?w=100px)

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

Live Demo

Installation

go get github.com/quail.ink/goldmark-enclave

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# 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