templates

package
v0.0.0-...-a6da5b0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(wr io.Writer, name string, fm template.FuncMap, lctx *LayoutContext, cctx *ContentContext) error

func GetTimestamps

func GetTimestamps(name string, withEmbed bool) ([]time.Time, error)

func SetConfig

func SetConfig(cfg *config.Config)

Types

type AtomContentEntry

type AtomContentEntry struct {
	Updated time.Time
}

type ContentContext

type ContentContext struct {
	Title       string
	Description string
	URL         string
	Entry       *ContentEntry
	Entries     []*ContentEntry
	Atom        *AtomContentEntry
	Series      *SeriesContentEntry
	Pagination  *ContentPagination
	Extra       map[string]interface{}
}

type ContentEntry

type ContentEntry struct {
	File    string
	URL     string
	Title   string
	Body    string
	Post    *PostContentEntry
	Project *ProjectContentEntry
	Extra   map[string]interface{}
}

type ContentPagination

type ContentPagination struct {
	Enabled   bool
	BaseURL   string
	AtomURL   string
	Current   int
	Total     int
	LinkFirst string
	LinkLast  string
}

type LayoutContext

type LayoutContext struct {
	WithSidebar bool
}

type PostContentEntry

type PostContentEntry struct {
	Author struct {
		Name  string
		Email string
	}
	Date time.Time
}

type ProjectContentEntry

type ProjectContentEntry struct {
	Owner       string
	Repo        string
	URL         string
	Description string
	Stars       int
	Watching    int
	Forks       int
	License     struct {
		SPDX string
		URL  string
	}
	LatestRelease *ProjectContentLatestRelease
	Date          time.Time
}

type ProjectContentLatestRelease

type ProjectContentLatestRelease struct {
	Name  string
	Tag   string
	Body  string
	URL   string
	Files []*ProjectContentLatestReleaseFile
}

type ProjectContentLatestReleaseFile

type ProjectContentLatestReleaseFile struct {
	File string
	URL  string
}

type SeriesContentEntry

type SeriesContentEntry struct {
	Status string
}

Jump to

Keyboard shortcuts

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