hugo: github.com/gohugoio/hugo/tpl/transform Index | Files

package transform

import "github.com/gohugoio/hugo/tpl/transform"

Index

Package Files

init.go transform.go

type Namespace Uses

type Namespace struct {
    // contains filtered or unexported fields
}

Namespace provides template functions for the "transform" namespace.

func New Uses

func New(deps *deps.Deps) *Namespace

New returns a new instance of the transform-namespaced template functions.

func (*Namespace) Emojify Uses

func (ns *Namespace) Emojify(s interface{}) (template.HTML, error)

Emojify returns a copy of s with all emoji codes replaced with actual emojis.

See http://www.emoji-cheat-sheet.com/

func (*Namespace) HTMLEscape Uses

func (ns *Namespace) HTMLEscape(s interface{}) (string, error)

HTMLEscape returns a copy of s with reserved HTML characters escaped.

func (*Namespace) HTMLUnescape Uses

func (ns *Namespace) HTMLUnescape(s interface{}) (string, error)

HTMLUnescape returns a copy of with HTML escape requences converted to plain text.

func (*Namespace) Highlight Uses

func (ns *Namespace) Highlight(s interface{}, lang, opts string) (template.HTML, error)

Highlight returns a copy of s as an HTML string with syntax highlighting applied.

func (*Namespace) Markdownify Uses

func (ns *Namespace) Markdownify(s interface{}) (template.HTML, error)

Markdownify renders a given input from Markdown to HTML.

func (*Namespace) Plainify Uses

func (ns *Namespace) Plainify(s interface{}) (string, error)

Plainify returns a copy of s with all HTML tags removed.

Package transform imports 7 packages (graph) and is imported by 6 packages. Updated 2017-10-26. Refresh now. Tools for package owners.