flydown

package
v0.0.0-...-f39ce3e Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertMdStrToHTML

func ConvertMdStrToHTML(mdStr string) string

ConvertMdStrToHTML simply convert markdown string to html string

func MainHandleFunc

func MainHandleFunc(w http.ResponseWriter, r *http.Request)

MainHandleFunc handler to host the main page with summary on the left side and markdown on the right

func RenderMdHandleFunc

func RenderMdHandleFunc(w http.ResponseWriter, r *http.Request)

RenderMdHandleFunc handler to host markdown as html page on the fly

func SearchHandleFunc

func SearchHandleFunc(w http.ResponseWriter, r *http.Request)

SearchHandleFunc handler for searching request

Types

type Generator

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

Generator is a struct that keeps common settings for markdown generator

var MdGenerator Generator

MdGenerator is a main markdown generator structure

func (*Generator) EnableVerbose

func (generator *Generator) EnableVerbose()

EnableVerbose enables verbose mode for generator

func (*Generator) FindReadme

func (generator *Generator) FindReadme() error

FindReadme finds and stores readme filename

func (*Generator) FindSummary

func (generator *Generator) FindSummary() error

FindSummary finds and stores summary filename

func (*Generator) Init

func (generator *Generator) Init(flydownDataFolder string, rootMdFolder string, bookName string) error

Init initialize new generator

func (*Generator) NewMarkdownFromFile

func (generator *Generator) NewMarkdownFromFile(filename string) (result *Markdown, err error)

NewMarkdownFromFile create Markdown struct from file

type Markdown

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

Markdown is a base structure

func NewMarkdown

func NewMarkdown(mdByteArray []byte) (result Markdown)

NewMarkdown create the new Markdown structure

Jump to

Keyboard shortcuts

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