mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 16:14:59 +00:00
1 parent
c5723a8931
commit
16b71bbbb4
2 files changed
+2
-2
No files matched your search
@@ -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}
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user