Documentation
¶
Overview ¶
Package posts defines struct types, constants, and helper functions related to our blog posts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frontmatter ¶
type Frontmatter struct {
// Title is the blog post's title.
Title string `toml:"title"`
// Summary is a short summary of the blog post.
Summary string `toml:"summary"`
// Tags is the list of tags categorizing the blog post.
Tags []string `toml:"tags"`
// Date is the date of the post. It looks like TOML will
// accept time.DateOnly as a value, so let's try it.
Date time.Time `toml:"date"`
}
Frontmatter is used for unmarshalling blog post frontmatter.
func (Frontmatter) Genre ¶
func (f Frontmatter) Genre() string
func (Frontmatter) GetDate ¶
func (f Frontmatter) GetDate() time.Time
func (Frontmatter) GetTitle ¶
func (f Frontmatter) GetTitle() string
Click to show internal directories.
Click to hide internal directories.