Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoMetadataFound = errors.New("No metadata found!")
Functions ¶
func CategoryFromPath ¶
func IsMarkdown ¶
Types ¶
type ParsedFile ¶
type ParsedFile struct {
Author string
Title string
Slug string
Content template.HTML
Summary template.HTML
IsPage bool
Category string
Tags []string
Date time.Time
// contains filtered or unexported fields
}
ParsedFile holds the struct of a file after we parsed the metadata and its content.
func New ¶
func New(path string) (*ParsedFile, error)
New return a new ParsedFile after load it from disk.
func (ParsedFile) IsPublished ¶
func (f ParsedFile) IsPublished() bool
IsPublished will return true if the status is not draft TODO: I wonder if `draft: true` could be a better way of doing this.
Click to show internal directories.
Click to hide internal directories.