booklit: github.com/vito/booklit/render Index | Files | Directories

package render

import "github.com/vito/booklit/render"

Index

Package Files

common.go html.go text.go writer.go

type HTMLRenderingEngine Uses

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

func NewHTMLRenderingEngine Uses

func NewHTMLRenderingEngine() *HTMLRenderingEngine

func (*HTMLRenderingEngine) FileExtension Uses

func (engine *HTMLRenderingEngine) FileExtension() string

func (*HTMLRenderingEngine) LoadTemplates Uses

func (engine *HTMLRenderingEngine) LoadTemplates(templatesDir string) error

func (*HTMLRenderingEngine) RenderSection Uses

func (engine *HTMLRenderingEngine) RenderSection(out io.Writer, con *booklit.Section) error

func (*HTMLRenderingEngine) URL Uses

func (engine *HTMLRenderingEngine) URL(tag booklit.Tag) string

func (*HTMLRenderingEngine) VisitDefinitions Uses

func (engine *HTMLRenderingEngine) VisitDefinitions(con booklit.Definitions) error

func (*HTMLRenderingEngine) VisitImage Uses

func (engine *HTMLRenderingEngine) VisitImage(con booklit.Image) error
func (engine *HTMLRenderingEngine) VisitLink(con booklit.Link) error

func (*HTMLRenderingEngine) VisitList Uses

func (engine *HTMLRenderingEngine) VisitList(con booklit.List) error

func (*HTMLRenderingEngine) VisitParagraph Uses

func (engine *HTMLRenderingEngine) VisitParagraph(con booklit.Paragraph) error

func (*HTMLRenderingEngine) VisitPreformatted Uses

func (engine *HTMLRenderingEngine) VisitPreformatted(con booklit.Preformatted) error

func (*HTMLRenderingEngine) VisitReference Uses

func (engine *HTMLRenderingEngine) VisitReference(con *booklit.Reference) error

func (*HTMLRenderingEngine) VisitSection Uses

func (engine *HTMLRenderingEngine) VisitSection(con *booklit.Section) error

func (*HTMLRenderingEngine) VisitSequence Uses

func (engine *HTMLRenderingEngine) VisitSequence(con booklit.Sequence) error

func (*HTMLRenderingEngine) VisitString Uses

func (engine *HTMLRenderingEngine) VisitString(con booklit.String) error

func (*HTMLRenderingEngine) VisitStyled Uses

func (engine *HTMLRenderingEngine) VisitStyled(con booklit.Styled) error

func (*HTMLRenderingEngine) VisitTable Uses

func (engine *HTMLRenderingEngine) VisitTable(con booklit.Table) error

func (*HTMLRenderingEngine) VisitTableOfContents Uses

func (engine *HTMLRenderingEngine) VisitTableOfContents(con booklit.TableOfContents) error

func (*HTMLRenderingEngine) VisitTarget Uses

func (engine *HTMLRenderingEngine) VisitTarget(con booklit.Target) error

type RenderingEngine Uses

type RenderingEngine interface {
    booklit.Visitor

    FileExtension() string
    RenderSection(io.Writer, *booklit.Section) error
    URL(booklit.Tag) string
}

type SearchDocument Uses

type SearchDocument struct {
    Location   string `json:"location"`
    Title      string `json:"title"`
    Text       string `json:"text"`
    Depth      int    `json:"depth"`
    SectionTag string `json:"section_tag"`
}

type SearchIndex Uses

type SearchIndex map[string]SearchDocument

type TextRenderingEngine Uses

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

func NewTextRenderingEngine Uses

func NewTextRenderingEngine(fileExtension string) *TextRenderingEngine

func (*TextRenderingEngine) FileExtension Uses

func (engine *TextRenderingEngine) FileExtension() string

func (*TextRenderingEngine) LoadTemplates Uses

func (engine *TextRenderingEngine) LoadTemplates(templatesDir string) error

func (*TextRenderingEngine) RenderSection Uses

func (engine *TextRenderingEngine) RenderSection(out io.Writer, con *booklit.Section) error

func (*TextRenderingEngine) URL Uses

func (engine *TextRenderingEngine) URL(tag booklit.Tag) string

func (*TextRenderingEngine) VisitDefinitions Uses

func (engine *TextRenderingEngine) VisitDefinitions(con booklit.Definitions) error

func (*TextRenderingEngine) VisitImage Uses

func (engine *TextRenderingEngine) VisitImage(con booklit.Image) error
func (engine *TextRenderingEngine) VisitLink(con booklit.Link) error

func (*TextRenderingEngine) VisitList Uses

func (engine *TextRenderingEngine) VisitList(con booklit.List) error

func (*TextRenderingEngine) VisitParagraph Uses

func (engine *TextRenderingEngine) VisitParagraph(con booklit.Paragraph) error

func (*TextRenderingEngine) VisitPreformatted Uses

func (engine *TextRenderingEngine) VisitPreformatted(con booklit.Preformatted) error

func (*TextRenderingEngine) VisitReference Uses

func (engine *TextRenderingEngine) VisitReference(con *booklit.Reference) error

func (*TextRenderingEngine) VisitSection Uses

func (engine *TextRenderingEngine) VisitSection(con *booklit.Section) error

func (*TextRenderingEngine) VisitSequence Uses

func (engine *TextRenderingEngine) VisitSequence(con booklit.Sequence) error

func (*TextRenderingEngine) VisitString Uses

func (engine *TextRenderingEngine) VisitString(con booklit.String) error

func (*TextRenderingEngine) VisitStyled Uses

func (engine *TextRenderingEngine) VisitStyled(con booklit.Styled) error

func (*TextRenderingEngine) VisitTable Uses

func (engine *TextRenderingEngine) VisitTable(con booklit.Table) error

func (*TextRenderingEngine) VisitTableOfContents Uses

func (engine *TextRenderingEngine) VisitTableOfContents(con booklit.TableOfContents) error

func (*TextRenderingEngine) VisitTarget Uses

func (engine *TextRenderingEngine) VisitTarget(con booklit.Target) error

type WalkContext Uses

type WalkContext struct {
    Current *booklit.Section
    Section *booklit.Section
}

type Writer Uses

type Writer struct {
    Engine RenderingEngine

    Destination string
}

func (Writer) WriteSearchIndex Uses

func (writer Writer) WriteSearchIndex(section *booklit.Section, path string) error

func (Writer) WriteSection Uses

func (writer Writer) WriteSection(section *booklit.Section) error

Directories

PathSynopsis
htmlCode generated for package html by go-bindata DO NOT EDIT.
textCode generated for package text by go-bindata DO NOT EDIT.

Package render imports 16 packages (graph) and is imported by 2 packages. Updated 2020-07-04. Refresh now. Tools for package owners.