hugocontent

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 6 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

simple-hugo-content-parse

go codecov go-report

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFileContentMismatch on specified filepath
	ErrFileContentMismatch = failure.StringCode("file content mismatch")
)

Functions

This section is empty.

Types

type FrontMatter

type FrontMatter map[string]interface{}

FrontMatter is metadata for MarkdownContent

func (FrontMatter) GetInt

func (f FrontMatter) GetInt(fieldname string) int

func (FrontMatter) GetString

func (f FrontMatter) GetString(fieldname string) string

func (FrontMatter) GetStrings

func (f FrontMatter) GetStrings(fieldname string) []string

type MarkdownContent

type MarkdownContent struct {
	// FrontMatter is metadata for this content
	FrontMatter FrontMatter
	// Body for this content
	Body string
}

MarkdownContent for hugo https://gohugo.io/content-management/formats/

func ParseMarkdownWithYaml

func ParseMarkdownWithYaml(r io.Reader) (*MarkdownContent, error)

ParseMarkdownWithYaml from any reader to make MarkdownContent struct

func (*MarkdownContent) Dump

func (m *MarkdownContent) Dump() (string, error)

Dump to string from this content

Jump to

Keyboard shortcuts

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