blog

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Zlib Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Post

type Post struct {
	Title      string        `json:"title"`
	Link       string        `json:"link"`
	Summary    string        `json:"summary,omitifempty"`
	Body       string        `json:"-"`
	BodyHTML   template.HTML `json:"body"`
	Series     string        `json:"series"`
	Tags       []string      `json:"tags"`
	SlidesLink string        `json:"slides_link"`
	ImageURL   string        `json:"image_url"`
	ThumbURL   string        `json:"thumb_url"`
	Date       time.Time
	DateString string `json:"date"`
}

Post is a single blogpost.

type Posts

type Posts []Post

Posts implements sort.Interface for a slice of Post objects.

func LoadPosts

func LoadPosts(path string, prepend string) (Posts, error)

LoadPosts loads posts for a given directory.

func (Posts) Len

func (p Posts) Len() int

func (Posts) Less

func (p Posts) Less(i, j int) bool

func (Posts) Series

func (p Posts) Series() []string

func (Posts) Swap

func (p Posts) Swap(i, j int)

Jump to

Keyboard shortcuts

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