Documentation ¶
Index ¶
- Constants
- Variables
- func CopyDirectory(source, dest string) error
- func CopyFile(source, dest string)
- func CreateNewMarkdownFile(title string, path string)
- type BlogMetadata
- type BlogOption
- type BlogPost
- type BlogRenderCache
- type ExternalPostsMetadata
- type IndexTemplateArgs
- type LinkMetadata
- type PostTemplateArgs
- type ProfileMetadata
- type TemplateRenderer
Constants ¶
View Source
const BASE_TEMPLATE = "/templates/base.tmpl"
View Source
const BLOG_BASE_PATH = "blog"
View Source
const BLOG_TEMPLATE = "/templates/blog.tmpl"
View Source
const INDEX_TEMPLATE = "/templates/index.tmpl"
Variables ¶
View Source
var LINKS_PATH = "config/links.yml"
Functions ¶
func CopyDirectory ¶
func CreateNewMarkdownFile ¶
Types ¶
type BlogMetadata ¶
type BlogOption ¶
type BlogOption func(*BlogRenderCache)
func RenderUnpublished ¶
func RenderUnpublished() BlogOption
type BlogPost ¶
type BlogPost struct { Slug string Path string Body string Metadata BlogMetadata }
func (*BlogPost) FormatDate ¶
type BlogRenderCache ¶
type BlogRenderCache struct { Prefix string OutputPath string Items []BlogPost ShouldListUnpublished bool Links LinkMetadata // contains filtered or unexported fields }
func NewBlogRenderCache ¶
func NewBlogRenderCache(prefix string, opts ...BlogOption) *BlogRenderCache
func (*BlogRenderCache) Render ¶
func (b *BlogRenderCache) Render()
type ExternalPostsMetadata ¶
type ExternalPostsMetadata struct { Title string `yaml:"title"` Link string `yaml:"link"` Date time.Time `yaml:"date"` }
func (ExternalPostsMetadata) FormatDate ¶
func (epm ExternalPostsMetadata) FormatDate() string
type IndexTemplateArgs ¶
type IndexTemplateArgs struct { Title string Body string BlogItems []BlogPost Links LinkMetadata }
type LinkMetadata ¶
type LinkMetadata struct { Profiles []ProfileMetadata `yaml:"profiles"` External []ExternalPostsMetadata `yaml:"external_posts"` }
func NewLinks ¶
func NewLinks() LinkMetadata
type PostTemplateArgs ¶
type PostTemplateArgs struct { Title string Body string Links LinkMetadata }
type ProfileMetadata ¶
func (ProfileMetadata) SVGSource ¶
func (pm ProfileMetadata) SVGSource() string
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
func NewTemplateRenderer ¶
func NewTemplateRenderer(base string) *TemplateRenderer
func (*TemplateRenderer) AddTemplate ¶
func (t *TemplateRenderer) AddTemplate(paths ...string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.