render

package
v0.0.0-...-20de804 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BareImgRe    = regexp.MustCompile(`\[img \"(.*?)\"\]`)
	CaptionImgRe = regexp.MustCompile(`\[img \"(.*?)\" \"(.*?)\"\]`)
)

Functions

func Site

func Site(ctx context.Context, dc nykya.Config, unfiltered []*nykya.RenderInput) ([]string, error)

Site generates static output to the site output directory

Types

type RenderedItem

type RenderedItem struct {
	Input   *nykya.RenderInput
	OutPath string
	URL     string
	Thumbs  map[string]ThumbMeta

	Content   template.HTML
	SiteTitle string
	PageTitle string

	Previous    *nykya.RenderInput
	PreviousURL string

	Next    *nykya.RenderInput
	NextURL string
}

RenderedItem is a post along with any dynamically generated data we found

type Stream

type Stream struct {
	Rendered  []*RenderedItem
	SiteTitle string
	PageTitle string
	OutPath   string
	Timestamp time.Time
}

Stream is basically the entire blog.

type ThumbMeta

type ThumbMeta struct {
	X   int
	Y   int
	Src string
}

ThumbMeta describes a thumbnail

type ThumbOpts

type ThumbOpts struct {
	X       int
	Y       int
	Quality int
}

ThumbOpts are thumbnail soptions

Jump to

Keyboard shortcuts

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