Browse Source

Add alternative way to add image alt text

master
Jan-Lukas Else 9 months ago
parent
commit
491ce51bd4
  1. 5
      entry.go

5
entry.go

@ -240,6 +240,11 @@ func computeExtraSettings(entry *Entry) error {
for _, image := range strings.Split(strings.TrimPrefix(text, "images: "), ",") {
entry.images = append(entry.images, Image{url: image})
}
} else if strings.HasPrefix(text, "image-alts: ") {
// Image alt
for i, alt := range strings.Split(strings.TrimPrefix(text, "image-alts: "), ",") {
entry.images[i].alt = alt
}
} else if strings.HasPrefix(text, "audio: ") {
// Audio
entry.audio = strings.TrimPrefix(text, "audio: ")

Loading…
Cancel
Save