msg

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(configPath, outputDir string) error

Run runs msg according to the config file at configPath and saves the output in outputDir

func Version

func Version() string

Version returns the version of msg, which will either be "dev" or "vn.n.n"

Types

type Config

type Config struct {
	Version      string     `yaml:"msg_version"`
	Root         string     `yaml:"root"`
	Templates    []string   `yaml:"templates"`
	Pages        []string   `yaml:"pages"`
	Ignore       []string   `yaml:"ignore"`
	FileRewrites []*Rewrite `yaml:"file_rewrites"`
	URLRewrites  []*Rewrite `yaml:"url_rewrites"`
	Defaults     Metadata   `yaml:"defaults"`
	Metadata     Metadata   `yaml:"metadata"`
	// contains filtered or unexported fields
}

Config represents a parsed config file

type Metadata

type Metadata map[string]interface{}

Metadata represents the YAML "Front Matter" of a page

type Page

type Page struct {
	Metadata   Metadata
	Rendered   string
	Source     string
	SourcePath string
	OutputPath string
	Path       string
}

Page represents a single page

type Rewrite

type Rewrite struct {
	From string `yaml:"from"`
	To   string `yaml:"to"`
	// contains filtered or unexported fields
}

Rewrite represents a rewrite config

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

A Tree represents the parsed contents of the input directory

Jump to

Keyboard shortcuts

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