blogposts

package
v0.0.0-...-06024ae Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UrlCreator

func UrlCreator(title string) string

Types

type Archive

type Archive struct {
	Posts []Post
	Tags  []string
}

func BlogArchive

func BlogArchive(posts []Post, tag string) Archive

type Metadata

type Metadata struct {
	Title       string
	Description string
	Date        time.Time
	Tags        map[string]struct{}
	Url         string
	ReadingTime int
}

type Post

type Post struct {
	Metadata Metadata
	Body     template.HTML
}

func FrontPage

func FrontPage(posts []Post) []Post

func NewPostsFromFS

func NewPostsFromFS(filesystem fs.FS) ([]Post, error)

Jump to

Keyboard shortcuts

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