I want to have multiple environments with a shared stylesheet.
So I set the [inherit] templates_dir = ... and put my site.html there.
But I'm still confused as to where to put my shared style.css
and how to specify its location in the site.html.
The example in [1] uses ${href.chrome('site/style.css')},
but this refers to the env-specific htdocs, which is not what I need.
Any tips?
Thanks.
[1] http://trac.edgewall.org/wiki/TracInterfaceCustomization#SiteAppearance
Itamar.
You can create the stylesheet in a shared location, then add a symlink
to that file in the htdocs directory of each environment. The stylesheet
can then be referenced with the "site/" prefix. Not very elegant, but it
works. Of course, this is somewhat more difficult to achieve on Windows.
-- Remy
I am on Windows.
How would I achieve this?
I assumed there would be some [inherit] htdocs_dir = ... that I missed.
You can create symbolic links in Windows, subject to a few limitations:
use NTFS and IIRC it only really works starting from Vista. See the
following page for more info:
http://en.wikipedia.org/wiki/NTFS_symbolic_link
> I assumed there would be some [inherit] htdocs_dir = ... that I missed.
That could be useful, yes. And is probably very easy to do, by returning
an additional 'site' entry in Chrome.get_htdocs_dirs().
-- Remy
The better answer is to not use Trac and just put the shared CSS file up on a webserver somewhere and just reference that single URL in the site.html
--Noah
Yes, that's a good idea, too ;-)
-- Remy
Pretty easy indeed.
I have devised a patch and created http://trac.edgewall.org/ticket/9462 for it.
>
> -- Remy
>
>