goldsmith-components: github.com/FooSoft/goldsmith-components/plugins/frontmatter Index | Files

package frontmatter

import "github.com/FooSoft/goldsmith-components/plugins/frontmatter"

Package frontmatter extracts the metadata stored in your files. This metadata can include any information you want, but typically contains the page title, creation date, tags, layout template, and more. There are no requirements about what fields must be present; this is entirely up to you.

+++ Title = "My homepage" Tags = ["best", "page", "ever"] +++

Metadata in YAML format is enclosed by three minus (-) characters:

--- Title: "My homepage" Tags:

- "best"
- "page"
- "ever"

---

Metadata in JSON format is enclosed by brace characters ({ and }):

{

"Title": "My homepage",
"Tags": ["best", "page", "ever"]

}

Normal page content immediately follows the metadata section. The metadata section is stripped after processed by this plugin.

Index

Package Files

frontmatter.go

type FrontMatter Uses

type FrontMatter struct{}

Frontmatter chainable plugin context.

func New Uses

func New() *FrontMatter

New creates a new instance of the Frontmatter plugin.

func (*FrontMatter) Initialize Uses

func (*FrontMatter) Initialize(context *goldsmith.Context) (goldsmith.Filter, error)

func (*FrontMatter) Name Uses

func (*FrontMatter) Name() string

func (*FrontMatter) Process Uses

func (*FrontMatter) Process(context *goldsmith.Context, inputFile *goldsmith.File) error

Package frontmatter imports 10 packages (graph). Updated 2019-04-08. Refresh now. Tools for package owners.