lists

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlogName

func GetBlogName(username string) string

func GetPostTitle

func GetPostTitle(post *db.Post) string

func NewConfigSite

func NewConfigSite() *shared.ConfigSite

func StartApiServer

func StartApiServer()

Types

type BlogPageData

type BlogPageData struct {
	Site      shared.SitePageData
	PageTitle string
	URL       template.URL
	RSSURL    template.URL
	Username  string
	Readme    *ReadmeTxt
	Header    *HeaderTxt
	Posts     []PostItemData
	HasFilter bool
}

type HeaderTxt

type HeaderTxt struct {
	Title    string
	Bio      string
	Nav      []*shared.ListItem
	Layout   string
	HasItems bool
}

type ListHooks

type ListHooks struct {
	Cfg *shared.ConfigSite
	Db  db.DB
}

func (*ListHooks) FileMeta

func (p *ListHooks) FileMeta(data *filehandlers.PostMetaData) error

func (*ListHooks) FileValidate

func (p *ListHooks) FileValidate(data *filehandlers.PostMetaData) (bool, error)

type PostItemData

type PostItemData struct {
	URL            template.URL
	BlogURL        template.URL
	Username       string
	Title          string
	Description    string
	PublishAtISO   string
	PublishAt      string
	UpdatedAtISO   string
	UpdatedTimeAgo string
	Padding        string
}

type PostPageData

type PostPageData struct {
	Site         shared.SitePageData
	PageTitle    string
	URL          template.URL
	BlogURL      template.URL
	Title        string
	Description  string
	Username     string
	BlogName     string
	ListType     string
	Items        []*shared.ListItem
	PublishAtISO string
	PublishAt    string
	Tags         []string
}

type ReadPageData

type ReadPageData struct {
	Site      shared.SitePageData
	NextPage  string
	PrevPage  string
	Posts     []PostItemData
	Tags      []string
	HasFilter bool
}

type ReadmeTxt

type ReadmeTxt struct {
	HasItems bool
	ListType string
	Items    []*shared.ListItem
}

type TransparencyPageData

type TransparencyPageData struct {
	Site      shared.SitePageData
	Analytics *db.Analytics
}

Jump to

Keyboard shortcuts

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