ampproject / ampproject/amp-toolbox

schema.org @type = 'NewsArticle' not detected

Open
#397 0 comments 0 reactions 1 assignee Claimed by @ithinkihaveacat View on GitHub
bug toolbox-linter
Dominant language
HTML
Stars
459
Forks
242
PR merge metrics
No merged PRs in 30d

Description

Expected: the markup below passes the "schemametadataisnews" test--@type is NewsArticle.

Actual: the linter thinks the markup below does not have @type Article, NewsArticle or ReportageNewsArticle (and reports an error).

```html
[{"@context":"http:\/\/schema.org","@type":"Organization","name":"Le Figaro","url":"http:\/\/www.lefigaro.fr\/","logo":{"@type":"ImageObject","url":"http:\/\/a.f1g.fr\/assets-img\/i\/f\/m150.png"}},{"@context":"http:\/\/schema.org","@type":"WebPage","name":"\u00c9pisode 2 - Et l'Homme marcha sur la Lune","description":null,"breadcrumb":{"@context":"http:\/\/schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"http:\/\/www.lefigaro.fr\/","name":"Accueil"}}]}},{"@context":"http:\/\/schema.org","@type":"NewsArticle","articleSection":null,"isAccessibleForFree":true,"dateModified":"2019-07-15T09:18:44.000Z","datePublished":"2019-07-15T09:18:44.000Z","description":null,"headline":"\u00c9pisode 2 - Et l'Homme marcha sur la Lune","mainEntityOfPage":{"@type":"WebPage","@id":"http:\/\/www.lefigaro.fr\/story\/episode-2---et-lhomme-marcha-sur-la-lune-12547"},"publisher":{"@context":"http:\/\/schema.org","@type":"Organization","name":"Le Figaro","url":"http:\/\/www.lefigaro.fr\/","logo":{"@type":"ImageObject","url":"http:\/\/a.f1g.fr\/assets-img\/i\/f\/m150.png"}},"url":"https:\/\/amp.lefigaro.fr\/story\/episode-2---et-lhomme-marcha-sur-la-lune-12547","author":[{"@type":"Person","name":"Le Figaro"}],"image":"https:\/\/i.f1g.fr\/media\/_uploaded\/orig\/mobile\/stories\/gazette\/2019\/07\/02\/main_image_1562085841388.png"}]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.