library

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONFIG_SPLIT = "---"
	MORE_SPLIT   = "<!--more-->"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	Year     int
	Articles []Article
}

type Archives

type Archives []Archive

func (Archives) Len

func (a Archives) Len() int

func (Archives) Less

func (a Archives) Less(i, j int) bool

func (Archives) Swap

func (a Archives) Swap(i, j int)

type Article

type Article struct {
	ConfigArticle
	// AuthorConfig
	Date    time.Time
	Update  time.Time
	Preview template.HTML
	Content template.HTML
	Link    string
}

func NewArticle

func NewArticle() *Article

func (*Article) ParseArticle

func (a *Article) ParseArticle(path string) error

func (*Article) ParseDate

func (a *Article) ParseDate(date, update string) error

func (*Article) ParseMarkdown

func (a *Article) ParseMarkdown(contentStr string)

type Articles

type Articles []Article

func (Articles) Len

func (a Articles) Len() int

func (Articles) Less

func (a Articles) Less(i, j int) bool

func (Articles) Swap

func (a Articles) Swap(i, j int)

type ConfigArticle

type ConfigArticle struct {
	Title  string   `yaml:"title"`
	Date   string   `yaml:"date"`
	Update string   `yaml:"update"`
	Tags   []string `yaml:"tags"`
	Author string   `yaml:"author"`
}

Jump to

Keyboard shortcuts

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