package hugocontext

import "github.com/gohugoio/hugo/markup/goldmark/hugocontext"

Index

Functions

func New

func New(logger loggers.Logger) goldmark.Extender

func Wrap

func Wrap(b []byte, pid uint64) string

Wrap wraps the given byte slice in a Hugo context that used to determine the correct Page in .RenderShortcodes.

Types

type HugoContext

type HugoContext struct {
	ast.BaseInline

	Closing bool

	// Internal page ID. Not persisted.
	Pid uint64
}

HugoContext is a node that represents a Hugo context.

func (*HugoContext) Dump

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

Dump implements Node.Dump.

func (*HugoContext) Kind

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

Source Files

hugocontext.go

Version
v0.144.2 (latest)
Published
Feb 19, 2025
Platform
linux/amd64
Imports
15 packages
Last checked
13 hours ago

Tools for package owners.