@@ -79,25 +79,25 @@ type ToMarkdown struct {
79
79
}
80
80
81
81
type FrontMatter struct {
82
- //Image interface{} `yaml:",flow"`
83
- Title interface {} `yaml:",flow"`
84
- Status interface {} `yaml:",flow"`
85
- Position interface {} `yaml:",flow"`
86
- Categories []interface {} `yaml:",flow"`
87
- Tags []interface {} `yaml:",flow"`
88
- Keywords []interface {} `yaml:",flow"`
89
- CreateAt interface {} `yaml:",flow"`
90
- Author interface {} `yaml:",flow"`
91
- IsTranslated interface {} `yaml:",flow"`
92
- Lastmod interface {} `yaml:",flow"`
93
- Description interface {} `yaml:",flow"`
94
- Draft interface {} `yaml:",flow"`
95
- ExpiryDate interface {} `yaml:",flow"`
96
- PublishDate interface {} `yaml:",flow"`
97
- Show_comments interface {} `yaml:",flow"`
82
+ Title interface {} `yaml:",flow"`
83
+ Status interface {} `yaml:",flow"`
84
+ Position interface {} `yaml:",flow"`
85
+ Categories []interface {} `yaml:",flow"`
86
+ Tags []interface {} `yaml:",flow"`
87
+ Keywords []interface {} `yaml:",flow"`
88
+ CreateAt interface {} `yaml:",flow"`
89
+ Author interface {} `yaml:",flow"`
90
+ IsTranslated interface {} `yaml:",flow"`
91
+ Lastmod interface {} `yaml:",flow"`
92
+ Description interface {} `yaml:",flow"`
93
+ Draft interface {} `yaml:",flow"`
94
+ ExpiryDate interface {} `yaml:",flow"`
95
+ //PublishDate interface{} `yaml:",flow"`
96
+ Show_comments interface {} `yaml:",flow"`
98
97
//Calculate Chinese word count accurately. Default is true
99
98
IsCJKLanguage interface {} `yaml:",flow"`
100
99
Slug interface {} `yaml:",flow"`
100
+ Image interface {} `yaml:",flow"`
101
101
}
102
102
103
103
func New () * ToMarkdown {
@@ -771,7 +771,6 @@ func emphFormat(a *notion.Annotations) (s string) {
771
771
772
772
func textColor (a * notion.Annotations , text string ) (s string ) {
773
773
s = text
774
- var color = ""
775
774
if a .Color == "default" {
776
775
return
777
776
}
@@ -780,7 +779,7 @@ func textColor(a *notion.Annotations, text string) (s string) {
780
779
if strings .Contains (string (a .Color ), "_background" ) {
781
780
cssKey = "background-color"
782
781
}
783
- s = fmt .Sprintf (`<span style="%s: %s;">%s</span>` , cssKey , ColorMap [color ], text )
782
+ s = fmt .Sprintf (`<span style="%s: %s;">%s</span>` , cssKey , ColorMap [string ( a . Color ) ], text )
784
783
return
785
784
}
786
785
0 commit comments