post: add emoji rendering support

Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
Naman Sood 2022-08-06 17:23:20 -05:00
parent 4d79025154
commit 6adbcf0421
3 changed files with 5 additions and 0 deletions

View file

@ -12,6 +12,7 @@ import (
"github.com/aymerick/raymond"
"github.com/mitchellh/mapstructure"
"github.com/yuin/goldmark"
emoji "github.com/yuin/goldmark-emoji"
highlighting "github.com/yuin/goldmark-highlighting"
meta "github.com/yuin/goldmark-meta"
"github.com/yuin/goldmark/extension"
@ -49,6 +50,7 @@ func newPost(slug string) (*Post, error) {
extension.Footnote,
meta.Meta,
highlighting.Highlighting,
emoji.New(emoji.WithRenderingMethod(emoji.Unicode)),
),
goldmark.WithRendererOptions(
html.WithUnsafe(),