[wp-meta] [Making WordPress.org] #4695: Add FAQPage schema markup to plugin pages
Making WordPress.org
noreply at wordpress.org
Tue Aug 20 09:58:16 UTC 2019
#4695: Add FAQPage schema markup to plugin pages
------------------------------+--------------------
Reporter: jonoaldersonwp | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone:
Component: Plugin Directory | Keywords: seo
------------------------------+--------------------
Plugin pages, like https://wordpress.org/plugins/autoptimize/, often
contain FAQ content.
When this is the case, we should output FAQ schema markup, with an aim to
encourage Google to show FAQ questions+answers in the search results
(therefore achieving extra visibility and clickthrough-rates).
== Approach
- Add an additional node to the existing schema markup on plugin pages,
for `"@type": "FAQPage"`.
- Add a `mainEntity` property to house the questions.
- Loop through each question/answer, and construct a `Question` node
with an `acceptedAnswer` property.
= Example output
{{{
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "What does the plugin do to help speed up my site?",
"acceptedAnswer": {
"@type": "Answer",
"text": "It concatenates all scripts and styles, minifies and
compresses them, adds expires headers, caches them, and moves styles to
the page head, and scripts (optionally) to the footer. It also minifies
the HTML code itself, making your page really lightweight."
}
}, {
"@type": "Question",
"name": "But I’m on HTTP/2, so I don’t need Autoptimize?",
"acceptedAnswer": {
"@type": "Answer",
"text": "HTTP/2 is a great step forward for sure, reducing the
impact of multiple requests from the same server significantly by using
the same connection to perform several concurrent requests. That being
said, <a href="http://engineering.khanacademy.org/posts/js-packaging-
http2.htm">concatenation of CSS/ JS can still make a lot of sense</a>, as
described in <a href="https://css-tricks.com/http2-real-world-performance-
test-analysis/">this css-tricks.com article</a> and this <a
href="http://calendar.perfplanet.com/2015/packaging-for-
performance/">blogpost from one of the Ebay engineers</a>. The conclusion;
configure, test, reconfigure, retest, tweak and look what works best in
your context. Maybe it’s just HTTP/2, maybe it’s HTTP/2 + aggregation and
minification, maybe it’s HTTP/2 + minification (which AO can do as well,
simply untick the “aggregate JS-files” and/ or “aggregate CSS-files”
options). And Autoptimize can do a lot more then “just” optimizing your JS
& CSS off course 😉"
}
}, {
"@type": "Question",
"name": "Will this work with my blog?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Although Autoptimize comes without any warranties, it will
in general work flawlessly if you configure it correctly. See
“Troubleshooting” below for info on how to configure in case of problems."
}
},
{...}
]
}
}}}
== Sanitization concerns
All HTML tags should be stripped from fields, with the exception of the
`text` property of an `acceptedAnswer`, which should:
- Accept `<a>`, `<strong>` and `<em>` tags.
- Disallow/remove any values/properties/attributes of these tags (other
than the `href` attribute on `<a>` tags).
- Remove invalid markup (e.g., an `<a>` without a closing `</a>`).
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/4695>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list