Documentation ¶
Index ¶
- type Layout
- type List
- type ListType
- type Page
- type Post
- type Renderer
- func (rd Renderer) RenderFrontPage(dst io.Writer) error
- func (rd Renderer) RenderList(listType ListType, groupName string, pageNumber int, dst io.Writer) (int, error)
- func (rd Renderer) RenderPage(page model.Page, dst io.Writer) error
- func (rd Renderer) RenderPost(post, olderPost, newerPost model.Post, dst io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
type Layout struct { WebsiteTitle string WebsiteOwner string ContentTitle string ContentDesc string ContentAuthor string Pages []model.Page }
Layout is the base layout of the website
type List ¶
type List struct { Layout Type ListType Path string Posts []model.Post Tags []model.Group Categories []model.Group CurrentPage int MaxPage int }
List is layout that used in list template. Might be used in frontpage template as well.
type Post ¶
type Post struct { Layout CreatedAt string UpdatedAt string Category model.Group Tags []model.Group Thumbnail string HTML template.HTML Older model.Post Newer model.Post }
Post is layout that used in post
type Renderer ¶
type Renderer struct { Config model.Config Pages []model.Page Posts []model.Post Tags []model.Group Categories []model.Group Minimize bool RootDir string }
Renderer is used to render static HTML file
func (Renderer) RenderFrontPage ¶
RenderFrontPage renders front page of the site. If exists, it will use the front page template. If not, it will fallback to using list template.
func (Renderer) RenderList ¶
func (rd Renderer) RenderList(listType ListType, groupName string, pageNumber int, dst io.Writer) (int, error)
RenderList renders list template.
func (Renderer) RenderPage ¶
RenderPage renders page template.
Click to show internal directories.
Click to hide internal directories.