[Issue 15470] New: Unnecessary markup in ddoc's html generation
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Dec 22 18:07:29 PST 2015
https://issues.dlang.org/show_bug.cgi?id=15470
Issue ID: 15470
Summary: Unnecessary markup in ddoc's html generation
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: csmith.ku2013 at gmail.com
This issue expands on Issue #14473,
https://issues.dlang.org/show_bug.cgi?id=14473.
I've gone through and highlighted some issues with the generated markup.
Example source:
* view-source:http://dlang.org/spec/property.html
I went ahead and ran this page through an HTML
validator(https://validator.w3.org/nu/?doc=http%3A%2F%2Fdlang.org%2Fspec%2Fproperty.html),
and here's a brief summary:
* links need to be striped for anchor tags.
* center is obsolete, use CSS
* nesting code in an order list generates invalid html
Additional notes that pass the validator:
* Usage of the <b> tag instead of <strong>. This breaks the semantic layer html
is supposed to provide. See
http://www.w3.org/International/questions/qa-b-and-i-tags.
* Loading a stylesheet in the body, all stylesheets using rel should be in the
head.
http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-link-element:attr-link-rel-4
* Unnecessary span tags. Example: `<td><span class="d_inlinecode donthyphenate
notranslate">float.nan</span></td>` could be reduced to `<td
class="d_inlinecode donthyphenate notranslate">float.nan</td>`
* Tons of unnecessary whitespace, and at the same time, insufficient whitespace
for this to be readily editable after html generation.
Overall, all of these things can account for slower page loads, which can
impact page ranking in search engines.
--
More information about the Digitalmars-d-bugs
mailing list