Closed lazukars closed 12 years ago
hi @lazukars, please see commits here testing out this issue.
I'm a little bit confused about what your problem is, can you tell us which version of ant are you using, also is the build script sync with master?
As far as I could test, it is working for me. See the article/
folder with the relative links. The generated files in publish/
have the according relative paths.
I've tested it with both file.pages.default.include = index.html, article/**/*.html
and file.pages.default.include = index.html, article/stuff/index.html, article/stuff-bis/index.html
. Both are generating the same results on this basic test case.
The same happens to me. Using boilerplate version 2 officially available on the site.
Original:
<link rel="stylesheet" href="/css/style.css"/>
<link rel="stylesheet" href="/css/date-input.css"/>
<link rel="stylesheet" href="/css/tooltip.css"/>
Result:
<link rel='stylesheet' href='css/331dad093dddc005b864db969f14ee028f7c6bf0.css'>
Btw, the same problem happens to js concatenation file, the protocol agnostic prefix "/" gets missing:
<script defer src='js/32175f8b50eba40b5921328bbb29473c9eaf40bb.js'></script>
... while the source was:
<!-- scripts concatenated and minified via ant build script-->
<script defer="defer" src="/js/plugins.js"></script>
<script defer="defer" src="/js/script.js"></script>
<script defer="defer" src="/js/libs/jstree/jquery.jstree.js"></script>
<!-- end scripts-->
Ok, confirmed with download archive.
Can you guys test it with latest build.xml from master?
Seems like #686 and #685 are related. The script have evolved quite a bit since the v2 tag (compare).
@darktable did an amazing job on this, maybe it's already fixed. I'm assuming here the issue is similar.
Is it safe to switch to non-announced revision from master branch for commercial project?
@meglio @lazukars just pinging to find out if there were any updates to @mklabs question available :)
I just copied over the latest version of the build directory into my project and it fixed this issue for me. (I'm using site relative URLs, e.g. /css/style.css)
This happens when you have a file in a a sub folder example/index.html that has relative links pointing up one directory.
Say my file example/index.html has the following code:
The ant script will strip those ../ relative links out, and it will look something like this:
There is a Stackoverflow question about this ( below ), but the answer does not solve the problem. If you do what the answer states, the build script still strips out the ../ relative links.
http://stackoverflow.com/questions/7554309/html5-boilerplate-build-script-html-in-subfolders-and-relative-links-to-css-js