Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer wraps goldmark for Markdown→HTML conversion.
func NewRenderer ¶
func NewRenderer(cfg *config.MarkupConfig) *Renderer
NewRenderer creates a goldmark-based Markdown renderer from config. Heading IDs (anchor links) are enabled by default to match Hugo's behavior. Fenced code blocks are syntax-highlighted using chroma (matching Hugo's output).
func (*Renderer) Render ¶
Render converts Markdown source to HTML. After goldmark rendering, post-processors:
- rewrite heading IDs to match Hugo's behavior (preserving CJK characters instead of falling back to "heading")
- normalize HTML entities in inline-code to numeric form (fenced code blocks already use chroma which emits numeric entities natively)
Click to show internal directories.
Click to hide internal directories.