tut icon indicating copy to clipboard operation
tut copied to clipboard

Scala interpolation

Open jedesah opened this issue 9 years ago • 4 comments

I would like to have String interpolation in tut template files. I am aware that this is somewhat of a separate concern, and would like to open up the discussion to alternate solutions.

I have though about providing an alternative plugin that can integrate with sbt-site to interpolate files with scala code. Then, however, one would have to modify sbt-site to be able to chain text transformation plugins, since I have a use case where I both want to have tut examples and String interpolation within the same file. This seems reasonable and would be a modular design although there might be some concerns around clashing between plugins and ordering.

In the meantime it might be reasonable to implement the feature directly in tut itself.

Thoughts?

jedesah avatar Mar 26 '15 21:03 jedesah

Yeah, I have thought about this. Could get complex pretty quickly but I'll think about it some more ;-)

tpolecat avatar Mar 26 '15 21:03 tpolecat

+1 for this feature.

In my case I'm wanting to embed HTML output from Scala directly into the Markdown, since I'm trying to produce documentation like the following (except mine's a Scala wrapper to Vega-Lite). https://rud.is/projects/vegalite01.html

aishfenton avatar Apr 18 '16 04:04 aishfenton

Any news on this?

magicknot avatar Jul 12 '16 18:07 magicknot

@magicknot I will probably do something like #104 for the next release ... soonish, but no promises.

tpolecat avatar Jul 12 '16 18:07 tpolecat