Documentation ¶
Overview ¶
Package article includes common types and functions for the articles app and command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { // Id is the article identifier, used by the template // function reverse_article. Id string // Titles includes the current title and then all the previous ones. // The previous ones are kept for redirecting old URLs to the // new one. Titles []string // Slugs contains the current slug and all the previous ones (for // redirecting all URLs). If no slugs are present, the current title Slugs []string // is slugified. // The article synopsys shown in the articles list. Might be empty. Synopsis string // A list of times when the article was created. Updated []time.Time // The priority to sort articles in the index. Articles with the same // priority are sorted by title. Priority int // Text contains the article text, with any properties stripped. Text []byte // Properties contains unknown properties, to allow forward // compatibility. It might be nil. Properties map[string][]string // Filename indicates the base filename where this article was loaded // from, always using UNIX style directory separators. Note that it might be empty. Filename string }
Article represents a loaded article.
func (*Article) AllSlugs ¶
AllSlugs returns the current and all the previous article slugs, used for redirects.
func (*Article) Created ¶
Created returns the article creation time, or the zero time.Time if there are no recorded updates to the article.
func (*Article) LastUpdate ¶
LastUpdate returns the most recent update time, or the zero time.Time if there are no recorded updates to the article.
Click to show internal directories.
Click to hide internal directories.