markdown

package
v0.0.0-...-da8971d Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MarkdownDoc

type MarkdownDoc struct {
	Frontmatter Matter
	Body        []byte
}

func (*MarkdownDoc) Extract

func (md *MarkdownDoc) Extract(source []byte) error

type Matter

type Matter map[string]string

type Output

type Output struct {
	HTML []byte
	Meta Matter
}

func (*Output) RenderHTML

func (out *Output) RenderHTML(dst, tmplDir string, data interface{}) error

Renders out.HTML into dst html file, using the template specified in the frontmatter. data is the template struct.

func (*Output) RenderMarkdown

func (out *Output) RenderMarkdown(source []byte) error

Renders markdown to html, and fetches metadata.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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