context

package
v0.0.0-...-7ffc71e Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2017 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 FileFunc

type FileFunc func(*os.File, string) error

FileFunc is the action for iterating through all files

type IterationError

type IterationError []error

IterationError represents the net error output from the eachFile function

func (IterationError) Error

func (i IterationError) Error() string

type Page

type Page struct {
	Path    string
	Content string
	Html    string
}

Page is represents a markdown file, parsed into an HTML string, with a Path

func CreatePage

func CreatePage(path string) (*Page, error)

CreatePage is a function that fetches a page or returns an error

func GetHTMLs

func GetHTMLs(sitePath string) ([]*Page, error)

GetHTMLs is a function for building the whole page state thingy

func NewPage

func NewPage(path string, content []byte) *Page

NewPage is a constructor for a page type

func (*Page) Hash

func (p *Page) Hash() string

Hash returns a unique identefier for this page

func (*Page) Refresh

func (p *Page) Refresh() error

Refresh will fetch the updated content for this file

func (*Page) String

func (p *Page) String() string

Jump to

Keyboard shortcuts

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