mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
c5723a8931
commit
16b71bbbb4
2 changed files with 2 additions and 2 deletions
|
@ -149,7 +149,7 @@ func FormatSanitize(kind string) string {
|
|||
}
|
||||
}
|
||||
|
||||
func detectFrontMatter(mark rune) (f *frontmatterType) {
|
||||
func DetectFrontMatter(mark rune) (f *frontmatterType) {
|
||||
switch mark {
|
||||
case '-':
|
||||
return &frontmatterType{[]byte(YAMLDelim), []byte(YAMLDelim), HandleYAMLMetaData, false}
|
||||
|
|
|
@ -90,7 +90,7 @@ func (p *page) Metadata() (meta interface{}, err error) {
|
|||
frontmatter := p.FrontMatter()
|
||||
|
||||
if len(frontmatter) != 0 {
|
||||
fm := detectFrontMatter(rune(frontmatter[0]))
|
||||
fm := DetectFrontMatter(rune(frontmatter[0]))
|
||||
meta, err = fm.Parse(frontmatter)
|
||||
if err != nil {
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue