parser

package
v0.0.0-...-30b578c Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParsedPosts

type ParsedPosts struct {
	Posts      []model.Post
	Categories []model.Group
	Tags       []model.Group
}

ParsedPosts is the output from ParsePosts

type Parser

type Parser struct {
	Config  model.Config
	RootDir string
}

Parser is used to parse markdown files to get the posts, pages, categories and tags that used in the blog.

func (Parser) ParsePages

func (ps Parser) ParsePages() (pages []model.Page, err error)

ParsePages parse all pages inside the page directory

func (Parser) ParsePosts

func (ps Parser) ParsePosts() (output ParsedPosts, err error)

ParsePosts parse all posts inside the post directory. Returns all posts, also categories and tags that used in the posts.

Jump to

Keyboard shortcuts

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