Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Post ¶
Post is a representation of a post
func (Post) SanitisedTitle ¶
SanitisedTitle returns the title of the post with spaces replaced by dashes for pleasant URLs
type PostRenderer ¶
type PostRenderer struct {
// contains filtered or unexported fields
}
PostRenderer renders data into HTML
func NewPostRenderer ¶
func NewPostRenderer() (*PostRenderer, error)
NewPostRenderer creates a new PostRenderer
func (*PostRenderer) Render ¶
func (r *PostRenderer) Render(w io.Writer, p Post) error
Render renders post into HTML
func (*PostRenderer) RenderIndex ¶
func (r *PostRenderer) RenderIndex(w io.Writer, posts []Post) error
RenderIndex creates an HTML index page given a collection of posts
Click to show internal directories.
Click to hide internal directories.