Browse Source

Add alternative way to add image alt text

master
Jan-Lukas Else 6 months ago
parent
commit
491ce51bd4
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      entry.go

+ 5
- 0
entry.go View File

@ -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