htmlprint

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(w io.Writer, el plugin.Content) error

Print is a helper function to print html content to a writer.

func PrintString

func PrintString(el plugin.Content) string

PrintString is a helper function to print html content to a string.

Types

type Data

type Data struct {
	Title       string
	Description string
	Content     template.HTML
	CSS         template.CSS
	JS          template.JS
	JSSources   []template.URL
	CSSSources  []template.URL
}

type Printer

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

Printer is the interface for printing html content.

func New

func New() Printer

New creates a new html printer.

func (Printer) Print

func (p Printer) Print(ctx context.Context, w io.Writer, el plugin.Content) (err error)

Jump to

Keyboard shortcuts

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