mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 04:43:03 +03:00
Fix validation error in publisher Structured Data.
This commit is contained in:
parent
7b8aa4cb1a
commit
7e83160c73
@ -550,7 +550,7 @@ head currentPath metadata =
|
||||
{ title = meta.title
|
||||
, description = meta.description
|
||||
, author = meta.author.name
|
||||
, publisher = "elm-pages blog"
|
||||
, publisher = StructuredData.person { name = "Dillon Kearns" }
|
||||
, url = canonicalSiteUrl ++ "/" ++ PagePath.toString currentPath
|
||||
, imageUrl = canonicalSiteUrl ++ "/" ++ ImagePath.toString meta.image
|
||||
, datePublished = Date.toIsoString meta.published
|
||||
|
@ -22,6 +22,16 @@ softwareSourceCode info =
|
||||
]
|
||||
|
||||
|
||||
{-| <https://schema.org/Person>
|
||||
-}
|
||||
person : { name : String } -> Encode.Value
|
||||
person info =
|
||||
Encode.object
|
||||
[ ( "@type", Encode.string "Person" )
|
||||
, ( "name", Encode.string info.name )
|
||||
]
|
||||
|
||||
|
||||
{-| <https://schema.org/ComputerLanguage>
|
||||
-}
|
||||
computerLanguage : { url : String, name : String, imageUrl : String, identifier : String } -> Encode.Value
|
||||
@ -51,7 +61,7 @@ article :
|
||||
{ title : String
|
||||
, description : String
|
||||
, author : String
|
||||
, publisher : String
|
||||
, publisher : Encode.Value
|
||||
, url : String
|
||||
, imageUrl : String
|
||||
, datePublished : String
|
||||
@ -66,7 +76,7 @@ article info =
|
||||
, ( "description", Encode.string info.description )
|
||||
, ( "image", Encode.string info.imageUrl )
|
||||
, ( "author", Encode.string info.author )
|
||||
, ( "publisher", Encode.string info.publisher )
|
||||
, ( "publisher", info.publisher )
|
||||
, ( "url", Encode.string info.url )
|
||||
, ( "datePublished", Encode.string info.datePublished )
|
||||
, ( "mainEntityOfPage", info.mainEntityOfPage )
|
||||
|
Loading…
Reference in New Issue
Block a user