[go: up one dir, main page]

Page MenuHomePhabricator

Add schema.org license data to article pages
Open, Needs TriagePublic

Description

As we've done on file pages as part of T254039, we'll add a JSON-LD script to article pages with the license data that will soon be required by Google.

Sample script:

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "ImageObject",
  "contentUrl": "https://example.com/photos/1x1/black-labrador-puppy.jpg",
  "license": "https://example.com/license",
  "acquireLicensePage": "https://example.com/how-to-use-my-images"
}
</script>

We should also inspect the page size (see this task; if the article script only added 0.5 - 1KB I don't expect this script will be a problem)


Acceptance criteria:

  • A JSON-LD script is present in the source code of article pages containing license and acquireLicensePage attributes
  • license links to the actual license, or to a page with information about the public domain, whichever applies to that image
  • acquireLicensePage should link to the file page on Commons
  • Article pages on production are valid when tested with the structured data testing tool

COVID-19 Deployment Criteria

  • Can you roll back this change without lasting impact?
    1. A recovery plan is required as this will help identify our capacity for recovering from the failure
    2. THIS IS A KEY QUESTION, if you can’t answer it, you shouldn’t deploy
  • Is specialized knowledge required to support this change in production? If so, are there multiple people with this knowledge?
  • Is there a way to increase confidence about the correctness of this change?
    1. Reviews (Design, Code, etc)
    2. Testing coverage (unit tests, integration tests)
    3. Manual testing (e.g. Beta, vagrant, docker)

Event Timeline

Change 610179 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/CommonsMetadata@master] Add JSON-LD script with schema.org license info for article images

https://gerrit.wikimedia.org/r/610179

Change 610179 abandoned by Anne Tomasevich:
[mediawiki/extensions/CommonsMetadata@master] Add JSON-LD script with schema.org license info for article images

Reason:
Fetching metadata from wikitext isn't a viable solution on article pages at this time

https://gerrit.wikimedia.org/r/610179