mirror of
https://github.com/facundoolano/jorge.git
synced 2024-11-16 07:47:40 +01:00
Enable markdown extensions (#46)
* add footnote to markdow example * add footnote markdown extension * add gfm extensions
This commit is contained in:
parent
2b683af346
commit
2f5b468f73
2 changed files with 19 additions and 4 deletions
|
@ -22,4 +22,14 @@ def hello():
|
|||
hello()
|
||||
```
|
||||
|
||||
Let's try some gfm extensions. This is ~~strikethrough~~.
|
||||
|
||||
| foo | bar |
|
||||
| --- | --- |
|
||||
| baz | bim |
|
||||
|
||||
Would it support footnotes[^1]?
|
||||
|
||||
[Next time](./hello-org), I'll talk about org-mode posts.
|
||||
|
||||
[^1]: apparently it would?
|
||||
|
|
|
@ -18,6 +18,7 @@ import (
|
|||
"github.com/osteele/liquid"
|
||||
"github.com/yuin/goldmark"
|
||||
gm_highlight "github.com/yuin/goldmark-highlighting/v2"
|
||||
"github.com/yuin/goldmark/extension"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
|
@ -169,7 +170,11 @@ func (templ Template) RenderWith(context map[string]interface{}, hlTheme string)
|
|||
|
||||
options := make([]goldmark.Option, 0)
|
||||
if hlTheme != NO_SYNTAX_HIGHLIGHTING {
|
||||
options = append(options, goldmark.WithExtensions(gm_highlight.NewHighlighting(
|
||||
|
||||
options = append(options, goldmark.WithExtensions(
|
||||
extension.GFM,
|
||||
extension.Footnote,
|
||||
gm_highlight.NewHighlighting(
|
||||
gm_highlight.WithStyle(hlTheme),
|
||||
gm_highlight.WithFormatOptions(html.TabWidth(CODE_TABWIDTH)),
|
||||
)))
|
||||
|
|
Loading…
Reference in a new issue