html

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CSSWriter io.Writer
}

type Option

type Option func(*Config)

func WithCSSWriter

func WithCSSWriter(w io.Writer) Option

WithCSSWriter registers a writer for CSS stylesheet.

type Renderer

type Renderer struct {
	render.CellWrapper
	// contains filtered or unexported fields
}

Renderer renders the notebook as HTML. It supports "markdown", "code", and "raw" cells with different mime-types of the their data.

func NewRenderer

func NewRenderer(opts ...Option) *Renderer

NewRenderer configures a new HTML renderer and embeds a *Wrapper to implement render.CellWrapper.

func (*Renderer) RegisterFuncs

func (r *Renderer) RegisterFuncs(reg render.RenderCellFuncRegistry)

type Wrapper

type Wrapper struct {
	Config
}

Wrapper wraps cells in the HTML produced by the original Jupyter's nbconvert.

func (*Wrapper) Wrap

func (wr *Wrapper) Wrap(w io.Writer, cell schema.Cell, render render.RenderCellFunc) error

func (*Wrapper) WrapAll added in v0.3.0

func (wr *Wrapper) WrapAll(w io.Writer, render func(io.Writer) error) error

func (*Wrapper) WrapInput

func (wr *Wrapper) WrapInput(w io.Writer, cell schema.Cell, render render.RenderCellFunc) error

func (*Wrapper) WrapOutput

func (wr *Wrapper) WrapOutput(w io.Writer, cell schema.Outputter, render render.RenderCellFunc) error

Jump to

Keyboard shortcuts

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