mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -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 {
|
switch mark {
|
||||||
case '-':
|
case '-':
|
||||||
return &frontmatterType{[]byte(YAMLDelim), []byte(YAMLDelim), HandleYAMLMetaData, false}
|
return &frontmatterType{[]byte(YAMLDelim), []byte(YAMLDelim), HandleYAMLMetaData, false}
|
||||||
|
|
|
@ -90,7 +90,7 @@ func (p *page) Metadata() (meta interface{}, err error) {
|
||||||
frontmatter := p.FrontMatter()
|
frontmatter := p.FrontMatter()
|
||||||
|
|
||||||
if len(frontmatter) != 0 {
|
if len(frontmatter) != 0 {
|
||||||
fm := detectFrontMatter(rune(frontmatter[0]))
|
fm := DetectFrontMatter(rune(frontmatter[0]))
|
||||||
meta, err = fm.Parse(frontmatter)
|
meta, err = fm.Parse(frontmatter)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue