article

package
v0.0.0-...-d675d5b Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ARTICLE = "article"
	DIR     = "dir"
)
View Source
const (
	START = iota
	NO_META
	META_BEGIN
	META_END
)
View Source
const (
	TIME_LAYOUT = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	Meta
	Content    []byte
	Parse      string
	SubArticle Articles
}

func NewArticle

func NewArticle(path, articleType, fatherURL string) (*Article, error)

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 Meta

type Meta struct {
	Title         string `meta:"title"`
	Description   string `meta:"description"`
	Author        string `meta:"author"`
	CreateTime    string `meta:"create_time"`
	Category      string `meta:"category"`
	Id            string `meta:"id"`
	URL           string `meta:"url"`
	TyporaRootURL string `meta:"typora-root-url"`
}

front-matter: https://jekyllrb.com/docs/front-matter/

Jump to

Keyboard shortcuts

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