Documentation ¶
Index ¶
- type ByCountDesc
- type ByDateDesc
- type Generator
- type IndexData
- type IndexWriter
- type ListingConfig
- type ListingData
- type ListingGenerator
- type Meta
- type Post
- type PostConfig
- type PostGenerator
- type RSSConfig
- type RSSGenerator
- type SiteConfig
- type SiteGenerator
- type SitemapConfig
- type SitemapGenerator
- type StaticsConfig
- type StaticsGenerator
- type Tag
- type TagsConfig
- type TagsGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByCountDesc ¶
type ByCountDesc []*Tag
ByCountDesc sorts the tags
func (ByCountDesc) Len ¶
func (t ByCountDesc) Len() int
func (ByCountDesc) Less ¶
func (t ByCountDesc) Less(i, j int) bool
func (ByCountDesc) Swap ¶
func (t ByCountDesc) Swap(i, j int)
type ByDateDesc ¶
type ByDateDesc []*Post
ByDateDesc is the sorting object for posts
func (ByDateDesc) Len ¶
func (p ByDateDesc) Len() int
func (ByDateDesc) Less ¶
func (p ByDateDesc) Less(i, j int) bool
func (ByDateDesc) Swap ¶
func (p ByDateDesc) Swap(i, j int)
type IndexData ¶
type IndexData struct { HTMLTitle string PageTitle string Content template.HTML Year int Name string CanonicalLink string MetaDescription string HighlightCSS template.CSS }
IndexData is a data container for the landing page
type IndexWriter ¶
type IndexWriter struct { BlogTitle string BlogDescription string BlogAuthor string BlogURL string }
IndexWriter writer index.html files
func (*IndexWriter) WriteIndexHTML ¶
func (i *IndexWriter) WriteIndexHTML(path, pageTitle, metaDescription string, content template.HTML, t *template.Template) error
WriteIndexHTML writes an index.html file
type ListingConfig ¶
type ListingConfig struct { Posts []*Post Template *template.Template Destination, PageTitle string IsIndex bool Writer *IndexWriter }
ListingConfig holds the configuration for the listing page
type ListingData ¶
type ListingData struct { Title string Date string Short string Link string TimeToRead string Tags []*Tag }
ListingData holds the data for the listing page
type ListingGenerator ¶
type ListingGenerator struct {
Config *ListingConfig
}
ListingGenerator Object
func (*ListingGenerator) Generate ¶
func (g *ListingGenerator) Generate() error
Generate starts the listing generation
type PostConfig ¶
type PostConfig struct { Post *Post Destination string Template *template.Template Writer *IndexWriter }
PostConfig holds the post's configuration
type RSSConfig ¶
type RSSConfig struct { Posts []*Post Destination string DateFormat string Language string BlogURL string BlogDescription string BlogTitle string }
RSSConfig holds the configuration for an RSS feed
type RSSGenerator ¶
type RSSGenerator struct {
Config *RSSConfig
}
RSSGenerator object
func (*RSSGenerator) Generate ¶
func (g *RSSGenerator) Generate() error
Generate creates an RSS feed
type SiteConfig ¶
SiteConfig holds the sources and destination folder
type SiteGenerator ¶
type SiteGenerator struct {
Config *SiteConfig
}
SiteGenerator object
func (*SiteGenerator) Generate ¶
func (g *SiteGenerator) Generate() error
Generate starts the static blog generation
type SitemapConfig ¶
type SitemapConfig struct { Posts []*Post TagPostsMap map[string][]*Post Destination string BlogURL string Statics []string }
SitemapConfig holds the config for the sitemap
type SitemapGenerator ¶
type SitemapGenerator struct {
Config *SitemapConfig
}
SitemapGenerator object
func (*SitemapGenerator) Generate ¶
func (g *SitemapGenerator) Generate() error
Generate creates the sitemap
type StaticsConfig ¶
type StaticsConfig struct { FileToDestination map[string]string TemplateToFile map[string]string Template *template.Template Writer *IndexWriter }
StaticsConfig holds the data for the static sites
type StaticsGenerator ¶
type StaticsGenerator struct {
Config *StaticsConfig
}
StaticsGenerator object
func (*StaticsGenerator) Generate ¶
func (g *StaticsGenerator) Generate() error
Generate creates the static pages
type TagsConfig ¶
type TagsConfig struct { TagPostsMap map[string][]*Post Template *template.Template Destination string Writer *IndexWriter }
TagsConfig holds the tag's config
type TagsGenerator ¶
type TagsGenerator struct {
Config *TagsConfig
}
TagsGenerator object
func (*TagsGenerator) Generate ¶
func (g *TagsGenerator) Generate() error
Generate creates the tags page