@@ -23,10 +23,11 @@ const (
23
23
)
24
24
25
25
type Properties struct {
26
- Title string `yaml:"title"`
27
- Style StyleConfig `yaml:"style"`
28
- Transition transitions.Transition `yaml:"transition"`
29
- Notes string `yaml:"notes"`
26
+ Title string `yaml:"title"`
27
+ Style StyleConfig `yaml:"style"`
28
+ Transition transitions.Transition `yaml:"transition"`
29
+ Notes string `yaml:"notes"`
30
+ ImageBackend string `yaml:"image_backend"`
30
31
}
31
32
32
33
type SlideStyle struct {
@@ -214,11 +215,12 @@ func getLayoutPosition(p string) (lipgloss.Position, error) {
214
215
215
216
func (p * Properties ) UnmarshalYAML (bytes []byte ) error {
216
217
aux := struct {
217
- Title string `yaml:"title"`
218
- Style StyleConfig `yaml:"style"`
219
- Transition string `yaml:"transition"`
220
- Preset string `yaml:"preset"`
221
- Notes string `yaml:"notes"`
218
+ Title string `yaml:"title"`
219
+ Style StyleConfig `yaml:"style"`
220
+ Transition string `yaml:"transition"`
221
+ Preset string `yaml:"preset"`
222
+ Notes string `yaml:"notes"`
223
+ ImageBackend string `yaml:"image_backend"`
222
224
}{}
223
225
224
226
if err := yaml .Unmarshal (bytes , & aux ); err != nil {
@@ -227,6 +229,7 @@ func (p *Properties) UnmarshalYAML(bytes []byte) error {
227
229
228
230
p .Title = aux .Title
229
231
p .Notes = aux .Notes
232
+ p .ImageBackend = aux .ImageBackend
230
233
231
234
if aux .Preset != "" {
232
235
preset , ok := GlobalConfig .Presets [aux .Preset ]
@@ -256,6 +259,9 @@ func (p *Properties) UnmarshalYAML(bytes []byte) error {
256
259
if p .Transition == nil {
257
260
p .Transition = GlobalConfig .Global .Transition
258
261
}
262
+ if p .ImageBackend == "" {
263
+ p .ImageBackend = "chafa"
264
+ }
259
265
260
266
return nil
261
267
}
0 commit comments