Red Hat Bugzilla – Bug 839975
RFE: scripts directory in brand
Last modified: 2014-10-19 19:01:09 EDT
Could we have a scripts directory in Common_Content for putting script files?
.woff web fonts are another resource that I'm bundling in my brand
This will also need support for the relative pathing for desktop and web output - in my Brand xsl customization i'm injecting the <script> tag. The relative path for the scripts will be different depending on whether the book is being built for the centralised web version of the brand, or the decentralised desktop version of the brand.
This worked in Publican 2, but stopped working in Publican 3.
I need this to get the Portal issue https://bugzilla.redhat.com/show_bug.cgi?id=845806 addressed, and I also need it for the MRG 2.3 release in February 2013.
This fix has been committed to the devel branch for inclusion in Publican 3.1.
Sample output assuming JS files are moved to en-US/scripts
$ rpm -qilp tmp/rpm/noarch/publican-redha* | grep -E 'scripts|css'
FYI the regression of non CSS files being dropped is also fixed, so if the JS files are left in the CSS directory they will be installed in to /var/www/html/docs/redhat-video/en-US/css/
Currently I have the following, for example, in html-single.xsl:
<div class="skynetBookID"><xsl:value-of select="//productname"/>/<xsl:value-of select="//title"/></div>
The script src value should be different for the web package (where the .js files are in the consolidated location path) and the desktop package (where the .js files are in the book directory).
So it seems like it needs a variable there to inject the correct path when it is being built.
(In reply to comment #10)
> different for the web and desktop builds.
You should already be able to do this. Checkout the logic in the 'template name="head.content"' in xhtml-common.xsl. You should have access to all the variables referenced in there.
So web path:
<xsl:when test="$embedtoc != 0">
<!-- web path -->
<!-- desktop path -->
Untested but you get the idea.
Verify version: publican-3.1.0-0.el6eng.noarch ->PASS
1. $publican create_brand --name=test --lang=en-US
2. $ cd publican-test/en-US
3. $ mkdir scripts, then copy test1.js and test1.css to this directory.
4. copy test2.js and test2.css to en-US/css/ directory.
5. $publican package --binary --lang=en-US
6. rpm -qilp tmp/rpm/noarch/publican-test* | grep -E 'scripts|css'
1. js files and css files in css directory still in that directory.
2. js files and css files in scripts directory still in that directory.