Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FrontMatter ¶
type FrontMatter struct {
InternalFields `yaml:"-"` // 构建时生成的字段
Title string `yaml:"title"`
Summary string `yaml:"summary"`
Image string `yaml:"image"`
URL string `yaml:"url"` // 自定义文章 URI 或用于 ExternalPost 的链接
Date string `yaml:"date"` // 默认显示,用于排序
Updated string `yaml:"updated"` // 次要的更新时间
Author string `yaml:"author"`
AuthorLink string `yaml:"author_link"`
Category string `yaml:"category"`
Tags []string `yaml:"tags"`
Flags []string `yaml:"flags"`
HeadTags []template.HTML `yaml:"head_tags"`
}
func (*FrontMatter) CheckInfo ¶
func (fm *FrontMatter) CheckInfo()
func (*FrontMatter) ParseDates ¶
func (fm *FrontMatter) ParseDates(d fs.DirEntry)
func (*FrontMatter) ParseFlags ¶
func (fm *FrontMatter) ParseFlags()
type InternalFields ¶
type ParsedFlags ¶
type ParsedFlags struct {
HidePost bool `yaml:"hide_post"`
ShowInCategoryAndTag bool `yaml:"show_in_category_and_tag"`
ShowInRSSAndSitemap bool `yaml:"show_in_rss_and_sitemap"`
ExternalPost bool `yaml:"external_post"`
HideImageAtPostList bool `yaml:"hide_image_at_post_list"`
HideImageAtPostTop bool `yaml:"hide_image_at_post_top"`
EscapeHTML bool `yaml:"escape_html"` // This flag is for rss/atom
NoHeadingID bool `yaml:"no_heading_id"`
NoHeadingAnchor bool `yaml:"no_heading_anchor"`
NoCodeHighlight bool `yaml:"no_code_highlight"`
NoImagePreview bool `yaml:"no_image_preview"`
NoTrailingSlash bool `yaml:"no_trailing_slash"`
NoComment bool `yaml:"no_comment"`
}
func (*ParsedFlags) SetForRSS ¶
func (pf *ParsedFlags) SetForRSS() error
SetForRSS will always return nil, because a return value is required when calling it in the template.
Click to show internal directories.
Click to hide internal directories.