frontmatter

package
Version: v0.0.0-...-d05bfab Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrontMatter

type FrontMatter struct{}

Frontmatter chainable plugin context.

func New

func New() *FrontMatter

New creates a new instance of the Frontmatter plugin.

func (*FrontMatter) Initialize

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

func (*FrontMatter) Name

func (*FrontMatter) Name() string

func (*FrontMatter) Process

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

Source Files

Jump to

Keyboard shortcuts

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