mirror of
https://github.com/jackyzha0/hugo-obsidian.git
synced 2024-06-14 11:42:35 +03:00
fix unexpected panic
This commit is contained in:
parent
00ad08df2f
commit
15440a1f59
@ -37,4 +37,4 @@ jobs:
|
|||||||
output: data # output folder
|
output: data # output folder
|
||||||
index: true # whether to index content
|
index: true # whether to index content
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
3
main.go
3
main.go
@ -107,7 +107,8 @@ func walk(root, ext string, index bool) (res []Link, i ContentIndex) {
|
|||||||
|
|
||||||
frontmatter, body, err := m.Parse(strings.NewReader(text))
|
frontmatter, body, err := m.Parse(strings.NewReader(text))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
frontmatter = map[string]interface{}{}
|
||||||
|
body = text
|
||||||
}
|
}
|
||||||
|
|
||||||
var title string
|
var title string
|
||||||
|
Loading…
Reference in New Issue
Block a user