markdown

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package markdown is the expander for markdown to html

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrLayoutFileNotFound is retunred when layout file is not found in list
	ErrLayoutFileNotFound = errors.New("No such layout file is found")
)

Functions

This section is empty.

Types

type Markdown

type Markdown struct {
	LayoutKey  string
	HTMLKey    string
	ContentKey string
	List       gen.List
}

Markdown satisfies gen.Expander

func New

func New(layoutKey, htmlKey, contentKey string, list gen.List) *Markdown

New returns new instance of Markdown. layoutKey is ident of layout file in markdown file. htmlKey is Variables key of content for html loader. contentKey is content ident in html file for markdown content.

func (*Markdown) Expand

func (m *Markdown) Expand(p []byte, v gen.Variables) ([]byte, error)

Expand implements gen.Expander

func (*Markdown) Ext

func (_ *Markdown) Ext() (string, string)

Ext implements gen.Expander

Jump to

Keyboard shortcuts

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