prose

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 36 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()

func StartSshServer added in v1.8.1

func StartSshServer()

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
	HasCSS    bool
	CssURL    template.URL
	HasFilter bool
}

type HeaderTxt

type HeaderTxt struct {
	Title     string
	Bio       string
	Nav       []shared.Link
	HasLinks  bool
	Layout    string
	Image     template.URL
	ImageCard string
	Favicon   template.URL
}

type MarkdownHooks

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

func (*MarkdownHooks) FileMeta

func (p *MarkdownHooks) FileMeta(s ssh.Session, data *filehandlers.PostMetaData) error

func (*MarkdownHooks) FileValidate

func (p *MarkdownHooks) FileValidate(s ssh.Session, data *filehandlers.PostMetaData) (bool, error)

type PageData

type PageData struct {
	Site shared.SitePageData
}

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
	Score          string
}

type PostPageData

type PostPageData struct {
	Site         shared.SitePageData
	PageTitle    string
	URL          template.URL
	BlogURL      template.URL
	BlogName     string
	Slug         string
	Title        string
	Description  string
	Username     string
	Contents     template.HTML
	PublishAtISO string
	PublishAt    string
	HasCSS       bool
	CssURL       template.URL
	Tags         []string
	Image        template.URL
	ImageCard    string
	Footer       template.HTML
	Favicon      template.URL
	Unlisted     bool
}

type ReadPageData

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

type ReadmeTxt

type ReadmeTxt struct {
	HasText  bool
	Contents template.HTML
}

type SSHServer added in v1.8.1

type SSHServer struct{}

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