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/04/14 22:16:22 UTC
maven-site-plugin: Generating (X)HTML5 instead of XHTML - how?
Hi all,
According to the docs at https://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html "Note that Doxia also supports several output formats, the site plugin only creates XHTML”.
I would like the maven-site-plugin to have the option to output HTML5 (or XHTML5 to be more specific), and from what I can see, maven-site-plugin cannot do this today. (correct?)
To support this, I am understanding that the following needs to get done:
- Create an XHTML5 sink for Doxia.
- Teach the maven-site-plugin to optionally use the XHTML5 sink if specified in the skin. (or make in mandatory for maven-site-plugin v4.x?)
- (Possibly?) Extend Doxia to support new (X)HTML5 tags.
My question is - am I on the right track? Is there some other work to support HTML5 that I may have missed?
Regards,
Graham
—
Re: maven-site-plugin: Generating (X)HTML5 instead of XHTML - how?
Posted by Graham Leggett <mi...@sharp.fm>.
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]
>
> finally, adding tags seems mode complex: Doxia is about having a common API for
> every format. Perhaps propose an example and we'll see
Thank you for confirming I’m on the right track.
I got here as I was trying to develop a maven skin based on an HTML5 template, and I couldn’t find a clean way of getting HTML5 tags through the site plugin.
Let me see what I can come up with.
Regards,
Graham
—
Re: maven-site-plugin: Generating (X)HTML5 instead of XHTML - how?
Posted by Graham Leggett <mi...@sharp.fm>.
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
—
Re: maven-site-plugin: Generating (X)HTML5 instead of XHTML - how?
Posted by Hervé BOUTEMY <he...@free.fr>.
Hi,
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]
finally, adding tags seems mode complex: Doxia is about having a common API for
every format. Perhaps propose an example and we'll see
Regards,
Hervé
[1] https://maven.apache.org/doxia/doxia-sitetools/doxia-skin-model/
Le dimanche 15 avril 2018, 00:16:22 CEST Graham Leggett a écrit :
> Hi all,
>
> According to the docs at
> https://maven.apache.org/plugins/maven-site-plugin/examples/creating-conten
> t.html "Note that Doxia also supports several output formats, the site
> plugin only creates XHTML”.
>
> I would like the maven-site-plugin to have the option to output HTML5 (or
> XHTML5 to be more specific), and from what I can see, maven-site-plugin
> cannot do this today. (correct?)
>
> To support this, I am understanding that the following needs to get done:
>
> - Create an XHTML5 sink for Doxia.
> - Teach the maven-site-plugin to optionally use the XHTML5 sink if specified
> in the skin. (or make in mandatory for maven-site-plugin v4.x?) -
> (Possibly?) Extend Doxia to support new (X)HTML5 tags.
>
> My question is - am I on the right track? Is there some other work to
> support HTML5 that I may have missed?
>
> Regards,
> Graham
> —
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org