Documentation
¶
Index ¶
- Constants
- type Post
- type PostList
- type PostWithID
- type PostWithIDList
- type Site
- func (s *Site) FooterMarkdown() string
- func (s *Site) PostByID(id string) (Post, bool)
- func (s *Site) PostBySlug(slug string) PostWithID
- func (s *Site) PostsAndPages(onlyPublished bool) PostWithIDList
- func (s *Site) PublishedPages() []Post
- func (s *Site) PublishedPosts() []Post
- func (s *Site) PublishedPostsWithID() PostWithIDList
- func (s *Site) SiteSubtitle() string
- func (s *Site) SiteTitle() string
- func (s *Site) SiteURL() string
- func (s *Site) Tags(onlyPublished bool) TagList
- func (s *Site) UpdatePost(id string, post *Post)
- type Tag
- type TagList
Constants ¶
DefaultFooter is the default Footer.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Post ¶
type Post struct { Title string `json:"title"` URL string `json:"url"` Alias string `json:"alias"` Canonical string `json:"canonical"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Timestamp time.Time `json:"timestamp"` Content string `json:"content"` Published bool `json:"published"` Page bool `json:"page"` Tags TagList `json:"tags"` }
Post -
type PostWithIDList ¶
type PostWithIDList []PostWithID
PostWithIDList -
func (PostWithIDList) Len ¶
func (t PostWithIDList) Len() int
func (PostWithIDList) Less ¶
func (t PostWithIDList) Less(i, j int) bool
func (PostWithIDList) Swap ¶
func (t PostWithIDList) Swap(i, j int)
type Site ¶
type Site struct { Title string `json:"title"` Subtitle string `json:"subtitle"` Author string `json:"author"` Favicon string `json:"favicon"` Description string `json:"description"` Scheme string `json:"scheme"` URL string `json:"url"` HomeURL string `json:"homeurl"` LoginURL string `json:"loginurl"` GoogleAnalyticsID string `json:"googleanalytics"` DisqusID string `json:"disqus"` CactusSiteName string `json:"cactus"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Content string `json:"content"` // Home content. Styles string `json:"styles"` StylesAppend bool `json:"stylesappend"` StackEdit bool `json:"stackedit"` Prism bool `json:"prism"` ISODate bool `json:"isodate"` Posts map[string]Post `json:"posts"` // contains filtered or unexported fields }
Site -
func (*Site) FooterMarkdown ¶
FooterMarkdown returns the markdown content of the footer.
func (*Site) PostsAndPages ¶
func (s *Site) PostsAndPages(onlyPublished bool) PostWithIDList
PostsAndPages -
func (*Site) PublishedPostsWithID ¶
func (s *Site) PublishedPostsWithID() PostWithIDList
PublishedPostsWithID - for RSS, purposely ignore Page
func (*Site) UpdatePost ¶
UpdatePost - use nil to delete the post, otherwise add/update it.
Click to show internal directories.
Click to hide internal directories.