commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [SITE] Prettify code rendering - alternate way to implement
Date Sun, 27 Feb 2011 14:59:36 GMT
On 27 February 2011 14:48, Simone Tripodi <simonetripodi@apache.org> wrote:
> agreed, but unfortunately I don't have any idea how to do it ATM

The following addition to site.xml gets added to the generated output,
and I assume should work at run-time (if not it could be adjusted):

<body>
...
<!-- N.B. header elements are inherited -->
<head>
    <link rel="stylesheet"
href="http://commons.apache.org/css/prettify.css" type="text/css"
media="all" />
    <script type="text/javascript"
src="http://commons.apache.org/js/prettify.js"></script>
    <script type="text/javascript">
        window.onload=function() {
            prettyPrint();
        }
    </script>
</head>
...
</body>

> to avoid it is included in every site, we could upload the
> prettify.(js|css) in the main site, then refer it always with an
> absolute link in projects, but to allow users choosing if having it or
> not, I don't know.

Components not wanting it could provide their own <head> section.

> What's wrong on having it always?
>
> http://people.apache.org/~simonetripodi/
> http://www.99soft.org/
>
>
>
> On Sun, Feb 27, 2011 at 3:04 PM, sebb <sebbaz@gmail.com> wrote:
>> The current skin snapshot template unconditionally includes the code
>> needed to implement the Google code prettifier.
>>
>> This means that all component sites get the code, whether they want it or not.
>>
>> Perhaps a simpler method would be to use the a <head> section in the
>> individual site.xml  ?
>>
>> This would also mean that the template was generic, so could be
>> dropped once the Maven version supports footers.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message