我有数份超文本文件,存放在不同地点(共同根基),例如:
index.html
moduleA/list.html
moduleA/add.html
moduleB/list.html
moduleB/add.html
...
Additionally I have one file called -template.html, that contains HTML code and a placeholder #CONTENT#
.
What I need:
- Copy all HTML files to public/ directory
- Each HTML file in public/ directory should also have code from -template.html wrapped around the original content.
I use ANT to copy the files, but I cannot figure out how to wrap the template-code around the code... My ANT script looks like this:
<project default="build">
<target name="build">
<copy todir="${dir.intermediate}/temp">
<fileset dir="${dir.source}" includes="**/*.html"/>
</copy>
</target>
</project>
Example:
指数.html
<div>This is the index-page</div>
-template.html
<html>
<head><title>Page-Title</title></head>
<body>
#CONTENT#
</body>
</html>
如果产生产出档案:
<html>
<head><title>Page-Title</title></head>
<body>
<div>This is the index-page</div>
</body>
</html>