post

package
v0.0.0-...-7741d2d Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	Title       string
	Author      string
	Description string
	Date        date
	Tag         []string
}

Meta structure contain basic metadata for blog post

type Post

type Post struct {
	*Meta
	Slug    string
	Content template.HTML
}

Post structure combine the metadata and content

func GetPosts

func GetPosts(postDir string) []*Post

GetPosts take path to directory for the post

func New

func New(fn string) (*Post, error)

New generate Post from fn fn must be valid filepath

Jump to

Keyboard shortcuts

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