Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AboutStore ¶
type AboutStore struct {
About map[string]interface{}
}
func NewAboutStore ¶
func NewAboutStore(cfg *config.Config) (*AboutStore, error)
type Article ¶
type Article struct { Slug string `db:"slug"` Title string `db:"title"` Content template.HTML `db:"content"` Preview template.HTML `db:"preview"` Categories string `db:"categories"` Tags string `db:"tags"` Pinned bool `db:"pinned"` Draft bool `db:"draft"` PublishedAt time.Time `db:"published_at"` }
func NewArticle ¶
NewArticle creates a Article instance with provided repo path `base`, article `path` and article `entry`.
func (*Article) ShortPublicationDate ¶
type ArticleStore ¶
type ArticleStore struct {
// contains filtered or unexported fields
}
func NewArticleStore ¶
func (*ArticleStore) ReadArticle ¶
func (s *ArticleStore) ReadArticle(slug string) (*Article, error)
func (*ArticleStore) ReadArticleCount ¶
func (s *ArticleStore) ReadArticleCount() (int, error)
func (*ArticleStore) ReadArticles ¶
func (s *ArticleStore) ReadArticles(limit int, offset int) ([]*Article, error)
func (*ArticleStore) ScanArticles ¶
func (s *ArticleStore) ScanArticles() error
ScanArticles walks the artile file tree of the repo and parses them concurrently.
Click to show internal directories.
Click to hide internal directories.