lib/bolognese/writers/schema_org_writer.rb in bolognese-0.9.14 vs lib/bolognese/writers/schema_org_writer.rb in bolognese-0.9.15
- old
+ new
@@ -9,11 +9,11 @@
"url" => url,
"additionalType" => additional_type,
"name" => name,
"alternateName" => alternate_name,
"author" => to_schema_org(author),
- "editor" => editor,
+ "editor" => to_schema_org(editor),
"description" => Array.wrap(description).map { |d| d["text"] }.compact.unwrap,
"license" => Array.wrap(license).map { |l| l["id"] }.compact.unwrap,
"version" => version,
"keywords" => keywords,
"inLanguage" => language,
@@ -22,10 +22,10 @@
"datePublished" => date_published,
"dateModified" => date_modified,
"pagination" => pagination,
"spatialCoverage" => spatial_coverage,
"sameAs" => same_as,
- "isPartOf" => is_part_of.present? ? is_part_of.merge("name" => is_part_of["title"]) : nil,
+ "isPartOf" => is_part_of.present? ? to_schema_org(is_part_of) : nil,
"hasPart" => has_part,
"predecessor_of" => is_previous_version_of,
"successor_of" => is_new_version_of,
"citation" => Array.wrap(references).map { |r| r.except("relationType").merge("@type" => "CreativeWork") }.unwrap,
"@reverse" => reverse.presence,