aside

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTitles = map[string]string{
	"note":      "Note",
	"tip":       "Tip",
	"info":      "Info",
	"danger":    "Danger",
	"warning":   "Warning",
	"important": "Important",
	"caution":   "Caution",

	"gh-note":      "Note",
	"gh-tip":       "Tip",
	"gh-important": "Important",
	"gh-warning":   "Warning",
	"gh-caution":   "Caution",
}

DefaultTitles maps aside types to their default display titles.

View Source
var KindAsideBlock = gast.NewNodeKind("AsideBlock")

KindAsideBlock is the NodeKind for AsideBlock.

View Source
var ValidTypes = map[string]bool{
	"note":      true,
	"tip":       true,
	"info":      true,
	"danger":    true,
	"warning":   true,
	"important": true,
	"caution":   true,

	"gh-note":      true,
	"gh-tip":       true,
	"gh-important": true,
	"gh-warning":   true,
	"gh-caution":   true,
}

ValidTypes lists all valid aside types.

Functions

func NewParser

func NewParser() parser.BlockParser

NewParser returns a new aside block parser.

func NewRenderer

func NewRenderer(style string) renderer.NodeRenderer

NewRenderer returns a new aside renderer. style selects the icon set; "galaxy" swaps note/tip/danger, any other value is classic.

Types

type AsideBlock

type AsideBlock struct {
	gast.BaseBlock
	AsideType string // "note", "tip", etc.
	Title     string // Custom title or empty for default
	Icon      string // Explicit Lucide icon name (optional; overrides the type icon)
}

AsideBlock is an AST node representing an aside block.

func (*AsideBlock) Dump

func (n *AsideBlock) Dump(source []byte, level int)

Dump implements ast.Node.Dump.

func (*AsideBlock) GetDisplayTitle

func (n *AsideBlock) GetDisplayTitle() string

GetDisplayTitle returns the custom title or the default title for the type.

func (*AsideBlock) Kind

func (n *AsideBlock) Kind() gast.NodeKind

Kind implements ast.Node.Kind.

type Extension

type Extension struct {
	Style string
}

Extension is a goldmark extension that adds aside block support. Style selects the icon set: "galaxy" swaps note/tip/danger icons to match the galaxy aside style; any other value uses the classic icons.

func (*Extension) Extend

func (e *Extension) Extend(m goldmark.Markdown)

Extend implements goldmark.Extender.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL