Documentation ¶
Overview ¶
Package syntax generates syntax highlighting for preformatted code blocks using the "chroma" processor. All of the themes and styles from the processor are directly exposed through the plugin interface.
Index ¶
- type Placement
- type Syntax
- func (*Syntax) Initialize(context *goldsmith.Context) error
- func (self *Syntax) LineNumbers(numbers bool) *Syntax
- func (*Syntax) Name() string
- func (self *Syntax) Placement(placement Placement) *Syntax
- func (self *Syntax) Prefix(prefix string) *Syntax
- func (self *Syntax) Process(context *goldsmith.Context, inputFile *goldsmith.File) error
- func (self *Syntax) Style(style string) *Syntax
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Syntax ¶
type Syntax struct {
// contains filtered or unexported fields
}
Syntax chainable context.
func (*Syntax) LineNumbers ¶
LineNumbers sets the visibility of a line number gutter next to the code (default: false).
func (*Syntax) Placement ¶
Placement determines if code should replace the containing block or be placed inside of it (default: "PlaceInside").
func (*Syntax) Prefix ¶
Prefix sets the CSS class name prefix for code language identification (default: "language-").
Click to show internal directories.
Click to hide internal directories.