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.
This commit is contained in:
parent
f449b1af64
commit
7335533ce9
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue