forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brolin Empey <bro...@brolin.be>
Subject How to include user stylesheet when using “forrest run”?
Date Thu, 23 Apr 2009 00:10:55 GMT
Forresters,

I am writing to *dev* instead of *user* because I have upgraded from Forrest
v0.8 to v0.9-dev.

First of all, I know I should probably be using the Dispatcher instead of
continuing to kludge my hacked fork of the pelt skin.  However, my employer
wants some “quick” updates to our Web sites before I continue trying to
migrate to the Dispatcher.  I quoted “quick” because implementing the
requested changes is not as simple as those who do not have to implement the
changes think it is:  I have spent almost 1 month so far because I keep
getting sidetracked by technical and implementation problems and details.
Anyway, time to get to the point:

I maintain 3 Web sites with Forrest v0.9-dev (I used SVN to check out
Forrest less than 1 month ago): *techsol.ca*, *medallionsystem.com*, and *
zpointproducts.com*.  I need to copy the presentational/stylistic changes I
made to *techsol.ca* to *medallionsystem.com*.  This resulted in common CSS
rules in the *extra-css* section of both site’s *skinconf.xml* files.  I
cannot have this duplication because it is inevitable that I will forget to
copy a change to one site to the others.  This mistake has actually already
happened.

I run forrest.sh build to build the static site.  *forrest.sh* is my bash
wrapper script.  The *build* function runs my pre-build function, runs
forrest to build the static site, then runs my post-build function to hack
generated content in the static site build.  My post-build function prepends
an *@import* rule to build/site/skin/profile.css.  I have to prepend instead
of append because *@import* rules must come before all other rules in a
stylesheet. The *@import* rule imports my common stylesheet,
extra-css_common.css.  All 3 Web sites are kept in an SVN repository on *
Repository*, my employer’s Debian Linux file server.  I use a Ubuntu PC
named *cannon*.  On *cannon*, I check out working copies of the Web sites in
~/WEB/.  The *medallionsystem.com* site was created first, then the *
zpointproducts.com* and *techsol.ca* sites were forked from *
medallionsystem.com*.  Consequently, I ended up with some files that are
common to all sites but were stored in the *medallionsystem.com* site.  This
is one of the reasons I got sidetracked many times:  I moved these common
files from WEB/medallionsystem.com/ to WEB/common/.  I also needed to create
new directories for the trunk and branches, because I experienced a
situation where having only a trunk was not sufficient:  I finally needed to
create a branch for my work-in-progress.  Anyway, extra-css_common.css lives
in WEB/common/.
src/documentation/skins/pelt-brolin/css/extra-css_common.css is a symlink to
WEB/common/trunk/extra-css_common.css.  This means extra-css_common.css is
copied to build/site/skin/ when I build the static site, but not when
I use forrest
run. Yes, believe it or not, I have finally gotten to the point!  ;) How can
I make the the Forrest Web server use extra-css_common.css?  Is this even
possible, or is this Yet Another reason why I need to migrate to the
Dispatcher instead of continuing to kludge my hacked fork of the pelt skin?

Thanks,
Brolin

PS: I no longer have to use my user DTD (*document-v20-xi*) for XInclude
support because Forrest v0.9-dev has XInclude support! :)

PPS: I know the name extra-css_common.css is now inaccurate because it is no
longer part of the *extra-css* section.  I originally meant to include it in
the *extra-css* section, but then I learned that *@import* rules must come
before all other rules in a stylesheet.  It could be worse, though:  for
example, the last time I checked, the Linux kernel module for USB Palm OS
devices was still named *visor* even though it now supports many other
devices than Visors, including PalmOne/Palm devices.  (The Handspring Visor
was the first USB Palm OS device.)  Well, on the subject of historical Palm
OS names, the last time I checked, the entry point for a Palm OS application
was still called *PilotMain* even though the Pilot name was dropped after
the second-generation Palm PDAs.  Anyway, I am sure you get the point. ;)

-- 
Sometimes I forget how to do small talk: <http://xkcd.com/222/>

“What if there were no hypothetical questions?” — George Carlin

Mime
View raw message