Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schema.org data via the new component #905

Merged
merged 1 commit into from
May 17, 2018

Conversation

tijmenb
Copy link
Contributor

@tijmenb tijmenb commented May 16, 2018

This makes the app use the new "Machine readable metadata" component built in alphagov/govuk_publishing_components#318. This means more news articles will have schema.org structured data, as the component will output the data even if there's no image or author present (something that Google requires, but isn't actually required).

See the validation for News articles (they had it before)

It also adds the schemas to more formats:

These formats were chosen before they appear in the top 500 of mainstream content. The agency that helps us with SEO has taken a snapshot of these to see if the schemas have an influence on the Google Answer Boxes.

I'm assuming that more formats will follow.

https://trello.com/c/RLQI1IUV

@tijmenb tijmenb temporarily deployed to government-frontend-pr-905 May 16, 2018 11:50 Inactive
@tijmenb tijmenb force-pushed the use-component-structured-data branch from a51d61c to b2572cf Compare May 17, 2018 11:37
@tijmenb tijmenb changed the title [WIP] Add schema.org data via the new component Add schema.org data via the new component May 17, 2018
@tijmenb tijmenb temporarily deployed to government-frontend-pr-905 May 17, 2018 11:37 Inactive
<%= render 'govuk_publishing_components/components/machine_readable_metadata',
schema: :article,
content_item: @content_item.content_item,
canonical_url: @content_item.canonical_url %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need canonical_url for answers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - removed.

@tijmenb tijmenb merged commit dd34445 into master May 17, 2018
@tijmenb tijmenb deleted the use-component-structured-data branch May 17, 2018 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants