sbt-site icon indicating copy to clipboard operation
sbt-site copied to clipboard

Feature Suggestion: Generating template.properties for Pamflet

Open joescii opened this issue 10 years ago • 3 comments

I have an idea for a feature that I could take a stab at, but I'd like to bounce the ideas off you guys first. I'd like to be able to inject my application version as specified in sbt into my template.properties file consumed by Pamflet. Based on what I see in PamfletSupport.scala, it only reads the source directory today. From there, Pamflet picks up the template.properties in produce.scala.

From my cursory glance, I believe I will need to enhance both Pamflet and sbt-site to be able to specify a different location for my template.properties which I could generate as an sbt task. Maybe by copying the entirety of the src/pamflet directory to another location where I could also drop off the template.properties file would be an option if we only update sbt-site to accept an optional parameter of where to pick it up.

That's what I've come up with thus far. Do any of you see another better approach?

Thanks, Joe

joescii avatar Mar 12 '15 22:03 joescii

+1 from me. @eed3si9n ?

jsuereth avatar Mar 20 '15 15:03 jsuereth

I don't exactly remember where Pamflet finds the template file, my preference would be to change Pamflet so we can keep in-memory Property as a setting (modify it if we need to), and pass that in. Also, I am thinking about using sbt-pamflet from sbt-site when the next version of Pamflet comes out to take advantage of compilable documentation.

eed3si9n avatar Mar 20 '15 16:03 eed3si9n

Cool, I'll take a look back at Pamflet to see how we can pass in a property file. My recollection is that it simply picks it up in the root directory by name.

joescii avatar Mar 20 '15 21:03 joescii