Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheControl ¶
CacheControl returns middleware that sets the Cache-Control header to the given policy.
func StaticByteHandler ¶
StaticByteHandler returns a handler that serves static bytes with ETag-based cache validation.
Types ¶
type ClickableHeadingRenderer ¶
type ClickableHeadingRenderer struct {
// contains filtered or unexported fields
}
Wraps all headings in a anchor tag, so that they are clickable for navigation purposes.
Only headings that already have an ID attribute will be wrapped. parser.WithAutoHeadingID can be used to automatically add the ID attributes.
If multiple headings have the same ID, to avoid collision each subsequent ID will be suffixed with a sequence number.
func NewClickableHeadingRenderer ¶
func NewClickableHeadingRenderer() *ClickableHeadingRenderer
func (*ClickableHeadingRenderer) RegisterFuncs ¶
func (r *ClickableHeadingRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
Click to show internal directories.
Click to hide internal directories.