Documentation ¶
Index ¶
Constants ¶
const ConfigFileName = "nykya.yaml"
Configuration file name
const DefaultOrganization = `{{ .Kind }}s/{{ .Date.Format "2006" }}`
DefaultOrganization shows where to put files if organization is unset
const HTML = "html"
HTML signifies a webpage
const HTMLBegin = "<!--"
HTMLBegin is what HTML frontmatter uses to begin
const HTMLSeparator = "-->"
HTMLSeparator is what HTML frontmatter uses to end
const JPEG = "jpeg"
JPEG are images
const Markdown = "markdown"
Markdown signifies markdown
const MarkdownSeparator = "\n---\n"
MarkdownSeparator separates YAML documents
const Raw = "raw"
RAW are raw files
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Root string Title string Subtitle string Description string SyncCommand string In string Out string Theme string IncludeDrafts bool Organization map[string]string }
Config is site configuration
func ConfigFromRoot ¶
ConfigFromRoot returns the sites configuration
type FrontMatter ¶
type FrontMatter struct { // Kind is what kind of post this is. See ValidKinds (required) Kind string // Draft is if the page is a draft (do not publish) Draft bool // Date is when was the content posted Date YAMLTime `yaml:"date"` // Title is a title of this post. (optional) Title string `yaml:",omitempty"` // Description is a short description of the post. (optional) Description string `yaml:",omitempty"` // Origin is where the post content originated from Origin string `yaml:",omitempty"` }
FrontMatter is metadata about an item saved to disk
type RenderInput ¶
type RenderInput struct { FrontMatter FrontMatter // Inline is inline content Inline string // ContentPath is relative path to content (not the sidecar) ContentPath string // Format is the format of the content Format string }
RenderInput is ephemeral metadata for a post to be rendered
type YAMLTime ¶
YAMLTime is time serializable to frontmatter
func NewYAMLTime ¶
NewYAMLTime returns a populated YAMLTime object
func (*YAMLTime) MarshalYAML ¶
MarshalYAML marshals time into RFC 1123
func (*YAMLTime) UnmarshalYAML ¶
UnmarshalYAML unmarshals RFC1123 or Y-M-D timestamps to time.Time