Documentation
¶
Overview ¶
Package content renders Markdown at build time: CommonMark plus the GFM extensions, stable heading ids and anchor links, and the GFM disallowed raw HTML filter (REQ-CNT-01). Only repository files are rendered (SI-12).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeCSS ¶
func CodeCSS() string
CodeCSS returns the light and dark stylesheet of the highlighted code blocks (REQ-CNT-04).
func RenderCode ¶
RenderCode renders one highlighted code block (REQ-CNT-04).
Types ¶
type CodeOptions ¶
CodeOptions are the per-block options of a highlighted code block (REQ-CNT-04).
func ParseCodeInfo ¶
func ParseCodeInfo(lang, info string) CodeOptions
ParseCodeInfo parses the fence info string (REQ-CNT-04).
type Options ¶
type Options struct {
// GFM enables tables, task lists, strikethrough and autolinks, and the
// GFM disallowed raw HTML filter (REQ-CNT-01).
GFM bool
// Footnotes enables the footnote extension (REQ-CNT-01).
Footnotes bool
// Anchors adds a stable id and an anchor link to every heading
// (REQ-CNT-01).
Anchors bool
// XHTML renders void elements in the XHTML form the CommonMark spec
// uses (<hr />). Content pages use the HTML5 form.
XHTML bool
// Highlight renders fenced code blocks as highlighted frames
// (REQ-CNT-04).
Highlight bool
}
Options configure one render.