Documentation ¶
Overview ¶
Package mdfront adds support for rendering frontmatter to markdown for goldmark.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Kind = ast.NewNodeKind("Frontmatter")
Kind is the kind of hashtag AST nodes.
Functions ¶
func NewTransformer ¶
func NewTransformer() parser.ASTTransformer
NewTransformer adds a blank frontmatter node for filling with data during markdown rendering.
Types ¶
type Extender ¶
type Extender struct{}
Extender extends a goldmark Markdown object with support for setting up a frontmatter placeholder for later rendering.
Install it on your Markdown object upon creation.
goldmark.New( goldmark.WithExtensions( // ... &mdfront.Extender{}, ), // ... )
type Node ¶
type Node struct { ast.BaseInline // Frontmatter is a struct with yaml tags for rendering. Frontmatter any }
Node is a hashtag node in a Goldmark Markdown document.
type NoopRenderer ¶
type NoopRenderer struct{}
NoopRenderer renders nothing for a frontmatter block, for if the AST is rendered without the mdrender.Renderer
func (*NoopRenderer) RegisterFuncs ¶
func (r *NoopRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
Click to show internal directories.
Click to hide internal directories.