hugo

package
v0.0.0-...-1138a3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FMInvalidTypeError

type FMInvalidTypeError struct {
	Key      string
	WantType string
	Got      interface{}
}

FMInvalidTypeError is an error that means the front-matter type is invalid.

func NewFMInvalidTypeError

func NewFMInvalidTypeError(fmKey, wantType string, got interface{}) *FMInvalidTypeError

func (*FMInvalidTypeError) Error

func (e *FMInvalidTypeError) Error() string

type FMNotExistError

type FMNotExistError struct {
	Key string
}

FMNotExistError is an error that means the front-matter key/value is not exists in the content file.

func NewFMNotExistError

func NewFMNotExistError(fmKey string) *FMNotExistError

func (*FMNotExistError) Error

func (e *FMNotExistError) Error() string

type FrontMatter

type FrontMatter struct {
	Title    string
	Author   string
	Category string
	Tags     []string
	Date     time.Time
}

func ParseFrontMatter

func ParseFrontMatter(filename string) (*FrontMatter, error)

ParseFrontMatter parses the frontmatter of the specified Hugo content.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL