post: add emoji rendering support
Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
parent
4d79025154
commit
6adbcf0421
3 changed files with 5 additions and 0 deletions
2
post.go
2
post.go
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue