Compare commits

...

1 Commits

Author SHA1 Message Date
Adam 7335533ce9
fix invalid json-ld image object alt property
JSON-LD ImageObject alt property is not recongized as a valid property. Therefore, logically replace the alt property with description without breaking other metadata and then delete it.
2024-06-18 19:42:36 -06:00
1 changed files with 9 additions and 0 deletions

View File

@ -59,6 +59,15 @@ module Jekyll
hash = page_drop.image.to_h
hash["url"] = hash.delete("path")
hash["@type"] = "imageObject"
if hash["alt"] && !hash["description"]
hash["description"] = hash["alt"]
end
if hash["alt"]
hash.delete("alt")
end
hash
end