You need to edit the build.xml script. Around line 630 a regex is used
to replace the js and css references to the concatenated versions but
it does not take account of subdirectories. I changed the lines there
to:
<echo message="Update the HTML to reference our concatenated
script file: ${scripts.js}"/> <!-- style.css replacement handled as
a replacetoken above --> <replaceregexp match="<!-- scripts
concatenated [\d\w\s\W]*?src="([\d\w\s\W]*?)js/[\d\w\s\W]*?!--
end ((scripts)|(concatenated and minified scripts))-->"
replace="<script defer src='\1${scripts.js}\'></script>"
flags="m"> <fileset dir="${dir.intermediate}" includes="${page-
files}"/> </replaceregexp> <!--[! use comments like this one to
avoid having them get minified --> <echo message="Updating the
HTML with the new css filename: ${style.css}"/> <replaceregexp
match="<!-- CSS concatenated [\d\w\s\W]*?href="([\d\w\s
\W]*?)css/[\d\w\s\W]*?!-- end CSS-->" replace="<link
rel='stylesheet' href='\1${style.css}'>" flags="m"> <fileset
dir="${dir.intermediate}" includes="${page-files}"/> </
replaceregexp>
I imagine the regex can be more efficient.
(I just posted this reply to the same question on stackoverflow and
there seem to be a few more people having the same problem if you have
a quick google.)
Simon
On Jan 2, 9:05 pm, rolfsf <rol...@gmail.com> wrote:
> When I run the build script, it's updating the css and js links with a
> path that assumes the .html file is in the root
> in other words:
> <link rel="stylesheet" href="/css/style.css">
> gets updated after build to
> <link rel=stylesheet href='css/4392blah.css'>
> which is fine for html files at the root, but not for files in a sub
> directory foo/foo.html
> How to I configure the script to maintain the correct path?