Documentation
¶
Index ¶
- Constants
- func Categories() []configs.Category
- func Footer() template.HTML
- func GetCategory(categoryId string) (configs.Category, bool)
- func Load()
- func Page404() template.HTML
- func PageNotAuthor() template.HTML
- func Render(c *fiber.Ctx, tpl string, data interface{}) error
- type HTMLPage
- type MetaData
- func ArticlesByCategoryPage(categoryId string, pageSize, pageNumber int) (total int, heads []MetaData)
- func ArticlesByPage(pageSize, pageNumber int) (total int, heads []MetaData)
- func ArticlesByTagPage(tag string, pageSize, pageNumber int) (total int, heads []MetaData)
- func FindMetaData(filename string) (MetaData, bool)
- func List() (articles []MetaData)
- type Tag
Constants ¶
View Source
const UncategorizedId = "uncategorized"
View Source
const UncategorizedName = "未分类"
Variables ¶
This section is empty.
Functions ¶
func Categories ¶
func PageNotAuthor ¶
Types ¶
type MetaData ¶
type MetaData struct {
// 文章标签
Tags []string `yaml:"Tags"`
// 文章更新时间
UpdateAt time.Time `yaml:"UpdateAt"`
// 文章副标题
Subtitle string `yaml:"Subtitle"`
// 文章标题
Title string `yaml:"Title"`
// 草稿标记
// 通过控制台qrcode得到预览草稿链接
IsDraft bool `yaml:"Draft"`
// 文件路径
Filename string `yaml:"-"`
// 除去yaml头的偏移量
Offset int `yaml:"-"`
// 概要,取文章前256个字符
Summary template.HTML `yaml:"-"`
// 内联标题
InlineTitle bool `yaml:"-"`
// 存在meta头
HasMetaHead bool `yaml:"-"`
// 分类ID
CategoryID string `yaml:"-"`
// 文件修改时间,用于检查修改变动
ModifyTime time.Time `yaml:"-"`
// contains filtered or unexported fields
}
func ArticlesByCategoryPage ¶
func ArticlesByPage ¶
func ArticlesByTagPage ¶
func FindMetaData ¶
func (MetaData) UpdateFromNow ¶ added in v1.0.2
Click to show internal directories.
Click to hide internal directories.