diff --git a/commands/initfiles/src/blog/goodbye-markdown.md b/commands/initfiles/src/blog/goodbye-markdown.md index 6c83b06..f1c2c08 100644 --- a/commands/initfiles/src/blog/goodbye-markdown.md +++ b/commands/initfiles/src/blog/goodbye-markdown.md @@ -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? diff --git a/markup/templates.go b/markup/templates.go index d316669..09e1aa2 100644 --- a/markup/templates.go +++ b/markup/templates.go @@ -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,10 +170,14 @@ 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( - gm_highlight.WithStyle(hlTheme), - gm_highlight.WithFormatOptions(html.TabWidth(CODE_TABWIDTH)), - ))) + + options = append(options, goldmark.WithExtensions( + extension.GFM, + extension.Footnote, + gm_highlight.NewHighlighting( + gm_highlight.WithStyle(hlTheme), + gm_highlight.WithFormatOptions(html.TabWidth(CODE_TABWIDTH)), + ))) } md := goldmark.New(options...) if err := md.Convert(content, &buf); err != nil {