Documentation
¶
Index ¶
- func AddDateTimeLayout(layout string)
- func AnyStubsInStubs(src, tgt PageStubs) (found bool)
- func ParseDateTime(value string) (t time.Time, err error)
- func ParseJson(content string) (m context.Context, err error)
- func ParseToml(content string) (m context.Context, err error)
- func ParseYaml(content string) (m context.Context, err error)
- type FrontMatterType
- type PageMatter
- type PageStub
- type PageStubs
- type ValueStubPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDateTimeLayout ¶
func AddDateTimeLayout(layout string)
func AnyStubsInStubs ¶
Types ¶
type FrontMatterType ¶
type FrontMatterType string
const ( TomlMatter FrontMatterType = "toml" JsonMatter FrontMatterType = "json" YamlMatter FrontMatterType = "yaml" NoneMatter FrontMatterType = "none" )
func ParseFrontMatterContent ¶
func ParseFrontMatterContent(raw string) (matter, content string, matterType FrontMatterType)
type PageMatter ¶
type PageMatter struct { Path string Shasum string Body string Matter beContext.Context Locale language.Tag Created time.Time Updated time.Time FrontMatter string FrontMatterType FrontMatterType Stub *PageStub }
func ParsePageMatter ¶
func (*PageMatter) Bytes ¶
func (pm *PageMatter) Bytes() (data []byte, err error)
Bytes rebuilds the page matter's file data, overriding FrontMatter with the Matter content, in the FrontMatterType format
type PageStub ¶
type ValueStubPair ¶
type ValueStubPair struct { Value interface{} Stub *PageStub }
Click to show internal directories.
Click to hide internal directories.