Documentation ¶
Index ¶
- Constants
- Variables
- func CheckPostSlugConflict(posts []*object.Post, slug string, ct int64) bool
- func Cleanup(s *object.Source, outputDir string) (int, error)
- func Compile(s *object.Source, cfg *object.Config, th *theme.Theme, outputDir string) error
- func Copy(s *object.Source, outputDir string) (int, int, error)
- func Parse(s *object.Source, withDraft bool) error
- func QueryPage(pages []*object.Page, slug string, ct int64) *object.Page
- func QueryPost(posts []*object.Post, slug string, ct int64) *object.Post
- func Read(postDir, pageDir, langDir string) (*object.Source, error)
- func WritePage(p *object.Page) error
- func WritePost(p *object.Post) error
Constants ¶
View Source
const ( // TimeLayoutShort use date to print time TimeLayoutShort = "2006-01-02" // TimeLayoutCommon use date and daytime to print time TimeLayoutCommon = "2006-01-02 15:04" // TimeLayoutLong use date and daytime with seconds to print time TimeLayoutLong = "2006-01-02 15:04:05" )
Variables ¶
View Source
var ( // ErrorPageSectionsInvalid means post cant not seperate to current sections for parsing ErrorPageSectionsInvalid = errors.New("page sections are invalid") // ErrorPageMetaUnknownType means post metadata cant be unmarshaled with proper type ErrorPageMetaUnknownType = errors.New("page metadata is unknown type") )
View Source
var ( // ErrorPostSectionsInvalid means post cant not seperate to current sections for parsing ErrorPostSectionsInvalid = errors.New("post sections are invalid") // ErrorPostMetaUnknownType means post metadata cant be unmarshaled with proper type ErrorPostMetaUnknownType = errors.New("post metadata is unknown type") )
View Source
var ( // ErrorTimeParseEmpty means parsing empty string ErrorTimeParseEmpty = errors.New("parse empty time string") // ErrorTimeUnknownLayout means time string layout is not supported ErrorTimeUnknownLayout = errors.New("parse time but unknown layout") // ErrorTimeCreatedOverUpdated means create time is newer than updated time ErrorTimeCreatedOverUpdated = errors.New("created time is over updated time") )
Functions ¶
func CheckPostSlugConflict ¶
CheckPostSlugConflict check post-slug is conflict with other post
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.