Help us shape the future of Go! Take the 2026 Go Developer Survey

hexoreader

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

README

hexo-content-reader

Hexo content reader for go

Usage

go get github.com/ma91n/hexoreader
	file, err := os.ReadFile(path)

	post, err := hexoreader.New(bytes.NewReader(file)).ReadAll()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrontMatter

type FrontMatter struct {
	Title      string   `yaml:"title"`
	Date       string   `yaml:"date"`
	Tags       []string `yaml:"tag"`
	Categories []string `yaml:"category"`
}

type HexoReader

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

func New

func New(r io.Reader) HexoReader

func (HexoReader) ReadAll

func (h HexoReader) ReadAll() (Post, error)

type Post

type Post struct {
	FrontMatter
	Content string
}

Jump to

Keyboard shortcuts

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