Closed a1dutch closed 10 years ago
Andrius Velykis » reflow-maven-skin #29 SUCCESS This pull request looks good (what's this?)
Hi, thanks for the contribution! However, I think you can achieve the same with existing functionality, as discussed in #24:
For CSS, you can utilise the decoration.head
configuration element. It allows adding arbitrary HTML and is preferred for adding any custom JavaScript or CSS to Maven site. Furthermore, it supports Velocity variables, so you could use $resourcePath
variable in there (at least it should work like that :)).
For JavaScript, Reflow 1.1.0 added the <endContent>
element that allows custom HTML to be placed at the end of the HTML page - see #23.
So to replicate your use case, you would have these in your site.xml:
<project>
...
<custom>
<reflowSkin>
...
<endContent>
<script src="$resourcePath/js/custom.js"></script>
</endContent>
...
</reflowSkin>
</custom>
<body>
...
<head>
<link href="$resourcePath/css/font-awesome.css" rel="stylesheet" />
<link href="$resourcePath/css/custom.css" rel="stylesheet" />
</head>
...
</body>
</project>
I think the current approach is a bit more flexible (e.g. you can add Google profile links to <head>
as well, etc.) even though slightly less user-friendly than your proposal.
Let me know if this works for you.
Closing as there is no reply - and I think the current implementation already supports the use case adequately.
allows custom css and js files to be added, these files should be placed in the css & js resource folders.