
On Thu, Feb 29, 2024 at 03:58:14PM +0100, Peter Krempa wrote:
While checking API docs after recent migration to gitlab-pages I've noticed that the footer is not properly rendered.
A deeper dig showed that the issue is that empty <div> elements, while formatted by the XML output version of XSLT conversion is turned into the non-pair empty variant. This contradicts the HTML standard which we declare to use for our pages and thus is mis-parsed into dom, where every empty div is treated as a start of a div, thus nesting everything.
This series fixes the above and also many other errors pointed out by the HTML validator at:
Compare:
https://libvirt.org/html/libvirt-libvirt-domain.html
vs
https://pipo.sk.gitlab.io/-/libvirt/-/jobs/6288946946/artifacts/website/html...
and the validation:
https://validator.w3.org/nu/?doc=https%3A%2F%2Flibvirt.org%2Fhtml%2Flibvirt-...
vs
https://validator.w3.org/nu/?doc=https%3A%2F%2Fpipo.sk.gitlab.io%2F-%2Flibvi...
Also non-API pages validation:
https://validator.w3.org/nu/?doc=https%3A%2F%2Flibvirt.org%2Fdocs.html
vs
https://validator.w3.org/nu/?doc=https%3A%2F%2Fpipo.sk.gitlab.io%2F-%2Flibvi...
Peter Krempa (9): docs: site: Don't generate '<?xml' header for HTML documents docs: page: Add 'lang="en"' for all HTML output documents docs: page: Fix declaration of main javascript source docs: index: Fix import of blog planet javascript docs: newapi: Don't generate empty <div> in template for ACL permissions docs: newapi: Avoid empty <div>s when there is no description docs: newapi: Avoid table where every row has an cell with 'colspan' docs: newapi: Properly skip ACL entries if empty docs: newapi: Fix generation of type definition tables
docs/index.rst | 2 +- docs/newapi.xsl | 158 ++++++++++++++++++++++++++---------------------- docs/page.xsl | 7 ++- docs/site.xsl | 5 +- 4 files changed, 93 insertions(+), 79 deletions(-)
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>