mdtohtml

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed templates/page.md
	PageMD string
)

Page the page template

Functions

func MdToHTML

func MdToHTML(md []byte) []byte

func New

func New() processor.Processor

New create a new markdown processor

Types

type Processor

type Processor struct {
}

Processor markdown processor for converting a markdown file to html

func (*Processor) AddPage

func (p *Processor) AddPage(folder, pagefile string) (m objx.Map, err error)

AddPage adding the new page

func (*Processor) CanRenderPage

func (p *Processor) CanRenderPage(_ model.Page) bool

CanRenderPage all pages of the processor should be rendered

func (*Processor) CreateBody

func (p *Processor) CreateBody(content []byte, _ model.Page) (*processor.Response, error)

CreateBody interface method to create a html body from a markdown file

func (*Processor) GetPageTemplate

func (p *Processor) GetPageTemplate(name string) string

GetPageTemplate getting the right template for the named page

func (*Processor) HTMLTemplateName

func (p *Processor) HTMLTemplateName() string

HTMLTemplateName returning the used html template

func (*Processor) Name

func (p *Processor) Name() string

Name returning the name of this processor

Jump to

Keyboard shortcuts

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