You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Graham Leggett <mi...@sharp.fm> on 2018/05/01 21:50:32 UTC

Re: maven-site-plugin: Generating (X)HTML5 instead of XHTML - how?

On 15 Apr 2018, at 1:29 AM, Hervé BOUTEMY <he...@free.fr> wrote:

> yes, this will require a xhtml5 Doxia sink
> 
> since each skin defines a site template as direct html source (without Doxia 
> interaction), the maven-site-plugin switch from xhtml to xhtml5 would have to 
> be done on configuration from the skin: looks like a good addition to skin 
> model [1]

> [1] https://maven.apache.org/doxia/doxia-sitetools/doxia-skin-model/

Having looked at this in some detail, this is what I've found.

maven-doxia is reasonably straightforward. I’ve added an xhtml5 module, and so far this seems to work alongside the other modules.

The maven-site-plugin uses maven-doxia-sitetools to render output. Makes sense.

maven-doxia-sitetools is welded firmly to the xhtml module from maven-doxia - most specifically, org.apache.maven.doxia.siterenderer.sink.SiteRendererSink extends org.apache.maven.doxia.module.xhtml.XhtmlSink.

The approach I am looking at for this is as follows:

- Add an xhtml5 module to maven-doxia, implementing the stricter XML version of HTML5.

- Branch v2.0.x of maven-doxia-sitetools, and in this new branch, shift all code that extends org.apache.maven.doxia.module.xhtml.XhtmlSink to extend org.apache.maven.doxia.module.xhtml5.Xhtml5Sink instead.

- By default, v2.0.x of maven-doxia-sitetools will produce (X)HTML5.

- Branch v4.0 of maven-site-plugin. This new branch will depend on maven-doxia-sitetools v2.0 by default, and will generate HTML5 by default, and skins will need to be tweaked accordingly.

- To upgrade from XHTML to (X)HTML5, upgrade your maven-site-plugin in your project.

I am in the process of patching the above to make all of this so, but I’d appreciate it if I could get confirmation that this approach is sane before I get too far into this. Can someone confirm?

Regards,
Graham
—