Both ornate and sbt-site use target/site, by default. Also, both ornate and sbt-site use src/site, by default.
Also, it would be more convenient if the ornate task returned the output directory.
Here is my code for sbt-site integration:
val ornateTarget = Def.setting(target.value / "ornate")
ornateSourceDir := Some(sourceDirectory.value / "ornate")
ornateTargetDir := Some(ornateTarget.value)
siteSubdirName in ornate := ""
addMappingsToSiteDir(mappings in ornate, siteSubdirName in ornate)
mappings in ornate := {
val _ = ornate.value
val output = ornateTarget.value
output ** AllPassFilter --- output pair relativeTo(output)
}
If ornate was not using the same source and target directory as sbt-site, by default, and if the ornate task was returning the output directory I could have just written the following:
siteSubdirName in ornate := ""
addMappingsToSiteDir(mappings in ornate, siteSubdirName in ornate)
mappings in ornate := {
val output = ornate.value
output ** AllPassFilter --- output pair relativeTo(output)
}
Since sbt-site is widely used, I think it would be worth trying to make its integration simpler.
Both ornate and sbt-site use
target/site
, by default. Also, both ornate and sbt-site usesrc/site
, by default.Also, it would be more convenient if the
ornate
task returned the output directory.Here is my code for sbt-site integration:
If ornate was not using the same source and target directory as sbt-site, by default, and if the
ornate
task was returning the output directory I could have just written the following:Since sbt-site is widely used, I think it would be worth trying to make its integration simpler.