grunt-jquery-content
grunt-jquery-content copied to clipboard
API Sites: Space between signature and return in heading
The HTML code for typical API page headers like the following, uses inline elements without a space in between their markup.
<article id="jQuery-each1" class="entry method"><h2 class="section-title">
--
| <span class="name">jQuery.each( array, callback )</span><span class="returns">Returns: <a href="http://api.jquery.com/Types/#Object">Object</a></span>
| </h2>
Among other potential accessibility issues, I notice this makes for slightly suboptimal results in search engines, e.g. from Google:
I'm not quite sure how or where to fix this, but following the chain of XSL files from jquery/api.jquery.com via jquery/jquery-wp-content to jquery/grunt-jquery-content, I suspect this woul be best addressed in entries2html-base.xsl.
Either by adding a single-space <text> node as first part of the return-value template, or by checking its users and placing it there. It looks like we already use <xsl:text> </xsl:text> in a few places, so hopefully not too hard.
I can submit a PR for this, but not sure what would happen after that. What is the release process for patching grunt-jquery-content and making existing sites re-generate their content with the latest version?
@Krinkle I have publish rights here so you can ping me for a release; I can also review a PR.
As for updating the docs, grunt-jquery-content is an npm dependency of content sites. It's enough to update it & then tag a commit via npm version patch to have a new version get generated.