Documentation ¶
Overview ¶
posts parses blog posts and generates the static output of the blog.
To generate the output call BuildPosts()
Index ¶
Constants ¶
const RSSDateFormat = "Mon, 02 Jan 2006 15:04:05 MST"
RSSDateFormat is the format used to output dates in the RSS feed
Variables ¶
This section is empty.
Functions ¶
func BuildPosts ¶
func BuildPosts(inputDir, outputDir string)
BuildPosts finds all the posts in a directory and builds them. The provided directories are converted to an absolute directory before use.
inputDir is the directory where the content of the posts can be found and outputDir is where to output the static content of the blog.
Types ¶
type ChannelXML ¶
type ChannelXML struct { XMLName xml.Name `xml:"channel"` Title string `xml:"title"` Link string `xml:"link"` Description string `xml:"description"` LastBuildDate string `xml:"lastBuildDate"` PubDate string `xml:"pubDate"` TTL int `xml:"ttl"` Items []*ItemXML `xml:"item"` }
ChannelXML describes the structure or the XML for the channel of the RSS feed. A channel in the RSS feed corresponds to the whole blog. See the RSS specification for more information.
type ItemXML ¶
type ItemXML struct { XMLName xml.Name `xml:"item"` Title string `xml:"title"` Link string `xml:"link"` Description string `xml:"description"` Guid string `xml:"guid"` PubDate string `xml:pubDate` }
ItemXML describes the structure if the XML for a single item in the RSS feed. An item in the RSS feed corresponds to a single blog post. See the RSS specification for more information.
type Post ¶
type Post struct {
// contains filtered or unexported fields
}
Post is a structure that contains all teh information about a single post.
type PostMetadata ¶
type PostMetadata struct {
// contains filtered or unexported fields
}
PostMetadata stores the metadata about a post.