shortcode

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 12 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindShortCode = ast.NewNodeKind("ShortCode")
View Source
var KindShortCodeBlock = ast.NewNodeKind("ShortCodeBlock")

Functions

func RegisterShortCode added in v1.6.0

func RegisterShortCode(name string, shortcode ShortCode)

RegisterShortCode registers a new shortcode with the given name that can be used in markdown content via the {{name}} syntax.

Types

type ShortCode added in v0.26.0

type ShortCode struct {
	Render  func(xlog.Markdown) template.HTML
	Default string
}

type ShortCodeBlock added in v0.58.0

type ShortCodeBlock struct {
	ast.FencedCodeBlock
	// contains filtered or unexported fields
}

func (*ShortCodeBlock) Kind added in v0.58.0

func (s *ShortCodeBlock) Kind() ast.NodeKind

type ShortCodeEx added in v1.7.0

type ShortCodeEx struct{}

func (ShortCodeEx) Extend added in v1.7.10

func (s ShortCodeEx) Extend(md markdown.Markdown)

func (ShortCodeEx) Init added in v1.7.0

func (s ShortCodeEx) Init()

func (ShortCodeEx) Name added in v1.7.0

func (s ShortCodeEx) Name() string

type ShortCodeNode added in v0.50.0

type ShortCodeNode struct {
	ast.BaseBlock
	// contains filtered or unexported fields
}

func (*ShortCodeNode) Dump added in v0.50.0

func (s *ShortCodeNode) Dump(source []byte, level int)

func (*ShortCodeNode) Kind added in v0.50.0

func (h *ShortCodeNode) Kind() ast.NodeKind

Jump to

Keyboard shortcuts

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