blog

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed templates/page.md
	BlogPage string
	//go:embed templates/index.md
	BlogIndex string
)

Page the page template

Functions

func New

func New() processor.Processor

New create a new plain processor

Types

type BlogEntry

type BlogEntry struct {
	Name    string    `yaml:"name"`
	Created time.Time `yaml:"created"`
}

BlogEntry an entry for the blog

type Processor

type Processor struct {
}

Processor the blog processor itself

func (*Processor) AddPage

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

AddPage adding the new blog page to the list of pages with the actual time. if already there the entry will be overwriten. After that, the _content.yaml will be sorted descending by time (created) and saved.

func (*Processor) CanRenderPage

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

CanRenderPage all pages of the processor should be rendered

func (*Processor) CreateBody

func (p *Processor) CreateBody(content []byte, pg 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