Add alternative way to add image alt text
parent
7cbaf6ad31
commit
491ce51bd4
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…
Reference in New Issue