head element in site.xml?

View: New views
4 Messages — Rating Filter:   Alert me  

head element in site.xml?

by Lukas Theussl-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I just noticed that the site descriptors for the doxia (and maven) site
contain a <head> element, apparently to include a javascript snippet in
all created site pages. I was not aware that this was possible, it's not
mentioned anywhere in the docs and google didn't help me either.

Problem is: 1st, it causes a bug that makes all maven generated pages
invalid XHTML [1], and 2nd I have already told a user that it's illegal
[also 1].

So question: should it be supported officially? If yes, whoever knows
more, please document! :)

-Lukas

[1] http://jira.codehaus.org/browse/MSITE-230

Re: head element in site.xml?

by brettporter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes :)

Though it's probably a bit dodgy as is. It really is XHTML specific -  
you probably want some more general way to include in there.

The JavaScript is for Google Analytics (which btw, seems to have  
broken with a recent site deploy... traffic halved suddenly 2 weeks ago)

- Brett

On 07/09/2007, at 5:25 PM, Lukas Theussl wrote:

> Hi,
>
> I just noticed that the site descriptors for the doxia (and maven)  
> site contain a <head> element, apparently to include a javascript  
> snippet in all created site pages. I was not aware that this was  
> possible, it's not mentioned anywhere in the docs and google didn't  
> help me either.
>
> Problem is: 1st, it causes a bug that makes all maven generated  
> pages invalid XHTML [1], and 2nd I have already told a user that  
> it's illegal [also 1].
>
> So question: should it be supported officially? If yes, whoever  
> knows more, please document! :)
>
> -Lukas
>
> [1] http://jira.codehaus.org/browse/MSITE-230

--
Brett Porter - brett@...
Blog: http://www.devzuz.org/blogs/bporter/

Re: head element in site.xml?

by Vincent Siveton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

2007/9/7, Lukas Theussl <ltheussl@...>:
> Hi,
>
> I just noticed that the site descriptors for the doxia (and maven) site
> contain a <head> element, apparently to include a javascript snippet in
> all created site pages. I was not aware that this was possible, it's not
> mentioned anywhere in the docs and google didn't help me either.

Exactly.
A small doc is in the description of the head field in decoration.mdo
(doxia-decoration-model).

> Problem is: 1st, it causes a bug that makes all maven generated pages
> invalid XHTML [1], and 2nd I have already told a user that it's illegal
> [also 1].
>
> So question: should it be supported officially? If yes, whoever knows
> more, please document! :)

We need it, as brett said.

For your first point, it due to a non-desired behaviour in p-u. Have a
glance to the comment in
org.codehaus.plexus.util.xml.Xpp3Dom#toString()
I will fix the default-site.vm with a small workaround.

Cheers,

Vincent

>
> -Lukas
>
> [1] http://jira.codehaus.org/browse/MSITE-230
>

Re: head element in site.xml?

by push :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

is there any othwer way to put site.xml other thn putting it inside src/site folder

Vincent Siveton wrote:
Hi,

2007/9/7, Lukas Theussl <ltheussl@apache.org>:
> Hi,
>
> I just noticed that the site descriptors for the doxia (and maven) site
> contain a <head> element, apparently to include a javascript snippet in
> all created site pages. I was not aware that this was possible, it's not
> mentioned anywhere in the docs and google didn't help me either.

Exactly.
A small doc is in the description of the head field in decoration.mdo
(doxia-decoration-model).

> Problem is: 1st, it causes a bug that makes all maven generated pages
> invalid XHTML [1], and 2nd I have already told a user that it's illegal
> [also 1].
>
> So question: should it be supported officially? If yes, whoever knows
> more, please document! :)

We need it, as brett said.

For your first point, it due to a non-desired behaviour in p-u. Have a
glance to the comment in
org.codehaus.plexus.util.xml.Xpp3Dom#toString()
I will fix the default-site.vm with a small workaround.

Cheers,

Vincent

>
> -Lukas
>
> [1] http://jira.codehaus.org/browse/MSITE-230
>