So what are we to do?
Well, I just wrote a small Ruby script that understands inline markers like ###inline=somefile.js in your HTML/OpenSocial/XML/Whatever file. Yes, I could have used ERB or something else, but I felt like writing my own ;-). You just put code like this into your file:
Then, assuming that your file is called “template.xml”, running it through inliner.rb like this…
ruby inliner.rb template.xml inlined_output.xml
Here’s the code:
Oh, and with this little snippet you can even inline binary images: