squirrelscan
GitHub

Article schema: headline, author and datePublished checks

Article JSON-LD missing headline, author or datePublished, or carrying a date that is not ISO 8601. squirrel checks both on every page.

What Article schema is

Article is the schema.org type for a piece of written content, with NewsArticle and BlogPosting as its two common subtypes. It states the headline, the author, the publication date and the date of the last change as named properties, rather than leaving them to be inferred from the page layout.

The dates are typed as schema.org Date or DateTime, which means ISO 8601. 2026-03-14 and 2026-03-14T09:30:00Z are valid; a raw database timestamp such as 2026-03-14 09:30:00, an epoch number, or 14/03/2026 are not. Article markup belongs on the article itself, not on an index or a category listing.

What squirrel checks

The rule reads the page’s parsed JSON-LD nodes, which are already flattened out of any @graph wrapper, and keeps the last node whose @type is Article, NewsArticle or BlogPosting, or whose @type array contains one of them. It emits one to three checks:

  • article-schema: reports at info status with the message No Article schema found and the value Consider adding for blog/news content when no such node exists. No further checks run.
  • article-required: warns with the message Article schema missing required properties and lists the missing names as items. The required set is headline, author and datePublished. When all three are present it passes with Article schema has required properties.
  • article-recommended: emitted only when at least one of dateModified, image and publisher is absent, at info status, with the message Article schema could include recommended properties and the missing names as items.
  • article-date-format: emitted only when datePublished or dateModified is present but not valid ISO 8601. It warns with the message Article schema dates are not valid ISO 8601 and lists each offending property with its literal value.

The date check tests the shape and then the calendar. Month must be 01 to 12, day 01 to 31, hour 00 to 23, and the day must exist in that month and year, so 2026-02-31 and 2026-04-31 are both rejected. A time part is optional, and a UTC offset on a time part is optional too. Every property test is a truthiness test rather than a presence test, so an empty string, 0 or false counts as missing. That is why an empty datePublished is reported as missing rather than as malformed, and never appears in both checks at once.

How to fix it

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "How we cut our build time in half",
  "author": { "@type": "Person", "name": "Dana Reed" },
  "datePublished": "2026-03-14T09:30:00Z",
  "dateModified": "2026-04-02T11:00:00Z",
  "image": "https://example.com/build-time.png",
  "publisher": { "@type": "Organization", "name": "Acme" }
}
</script>

Put it in the <head> of the article page and emit the dates from a formatter that produces ISO 8601, not from string concatenation.

There is no common false positive here. When the rule reports a bad date it prints the value it read, so the fix is visible in the report.

Rule IDschema/article
CategoryStructured Data
ScopePer-page
Severitywarning
Weight5/10

Enable / disable

Disable this rule

[rules]
disable = ["schema/article"]

Disable all Structured Data rules

[rules]
disable = ["schema/*"]

Enable only this rule

[rules]
enable = ["schema/article"]

enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.

Structured data findings ship in every audit next to the core SEO, performance and agent experience rules. See Fix SEO issues with AI for how an agent works through a report.

References

Check your site

Run squirrel audit https://example.com and open the Structured Data section of the report. Each article page lists the properties it is missing. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.

Type to search…

↑↓ navigate↵ openesc close