Documentation
¶
Index ¶
- Constants
- func Run(cfg *Config) error
- type Categories
- type Config
- type Context
- type Page
- type Pages
- type Paginator
- type Post
- type Posts
- type Renderer
- func (r *Renderer) RenderFooter(w io.Writer, ast *blackfriday.Node)
- func (r *Renderer) RenderHeader(w io.Writer, ast *blackfriday.Node)
- func (r *Renderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus
- func (r *Renderer) RenderWithChroma(w io.Writer, text []byte, data blackfriday.CodeBlockData) error
- type Site
Constants ¶
const (
// DefaultConfigPath is the default path for the zen-garden config file.
DefaultConfigPath = "_garden.toml"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Categories ¶
Categories is a map of category names to the posts of that category.
type Config ¶
type Config struct {
Source string
Target string
BaseURL string
Permalink string
Paginate int
Style string
Excludes []string
Vars Context
}
Config is the configuration data for building the site.
func LoadConfig ¶
LoadConfig loads the configuration file at the given path, and adds any non-config variables to the Vars context.
type Context ¶
type Context map[string]interface{}
Context is a simple dictionary for use in text/template files.
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
Page is a single non-post page not in the _posts directory.
type Paginator ¶
type Paginator struct {
// contains filtered or unexported fields
}
Paginator handles paginating the posts into the correct pagination size, and generates the additional pagination pages.
type Post ¶
type Post struct {
// contains filtered or unexported fields
}
Post is a single post from the _posts directory.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer is a custom blackfriday HTML renderer that uses the chroma library to highlight code in fenced code blocks.
func (*Renderer) RenderFooter ¶
func (r *Renderer) RenderFooter(w io.Writer, ast *blackfriday.Node)
RenderFooter satisfies the Renderer interface
func (*Renderer) RenderHeader ¶
func (r *Renderer) RenderHeader(w io.Writer, ast *blackfriday.Node)
RenderHeader satisfies the Renderer interface
func (*Renderer) RenderNode ¶
func (r *Renderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus
RenderNode satisfies the Renderer interface
func (*Renderer) RenderWithChroma ¶
func (r *Renderer) RenderWithChroma(w io.Writer, text []byte, data blackfriday.CodeBlockData) error
RenderWithChroma renders the given text to the w io.Writer