post

package
v0.0.0-...-b1f8816 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAll

func GetAll(dir string) ([]string, error)

search the current directory for posts (files ending with .md)

func ParseHeader

func ParseHeader(h []byte) map[string]string

parse header bytes into a map

func Scan

func Scan(r io.Reader) ([]byte, []byte, error)

scan file and seperate header from content

Types

type Post

type Post struct {
	Title   string
	Date    time.Time
	Slug    string
	Content []byte
}

func New

func New() Post

func (*Post) Parse

func (post *Post) Parse(p string) error

Jump to

Keyboard shortcuts

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