sitegen

package
v0.0.0-...-aab7cf6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2015 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderMarkdown

func RenderMarkdown(input []byte) []byte

func SetMetadataProcessor

func SetMetadataProcessor(f MetadataProcessor)

func Start

func Start()

Types

type ContentItem

type ContentItem struct {
	Filename string
	FullPath string
	Url      string
	Type     ContentType
	Content  template.HTML
	Children []*ContentItem
	Metadata Metadata
	Extra    interface{}
}

func (*ContentItem) Parse

func (c *ContentItem) Parse(filename string)

func (*ContentItem) Process

func (c *ContentItem) Process()

func (*ContentItem) Write

func (c *ContentItem) Write(path string, queue *ContentQueue)

func (*ContentItem) WriteContent

func (c *ContentItem) WriteContent(path string) error

type ContentQueue

type ContentQueue struct {
	// contains filtered or unexported fields
}

func NewContentQueue

func NewContentQueue() *ContentQueue

func (*ContentQueue) Insert

func (c *ContentQueue) Insert(i *ContentItem) *ContentQueueItem

func (*ContentQueue) Wait

func (c *ContentQueue) Wait()

type ContentQueueItem

type ContentQueueItem struct {
	Result chan bool
	// contains filtered or unexported fields
}

type ContentType

type ContentType int
const (
	Content ContentType = iota
	Directory
	Asset
)

type Metadata

type Metadata struct {
	Title    string
	Template string
	Date     time.Time
}

func (*Metadata) UnmarshalYAML

func (m *Metadata) UnmarshalYAML(unmarshal func(interface{}) error) error

Time handling

type MetadataProcessor

type MetadataProcessor func(item *ContentItem) (interface{}, error)

Metadata processing

Jump to

Keyboard shortcuts

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