ai2html
ai2html copied to clipboard
Script/CSS to external files
Hi, I'm curious about this: have there been any efforts to write scripts/css to files rather than inlined? Seems pretty doable within generateOutputHtml
but wondering if there's any obvious gotchas before going down this road.
Hi Brian, it is certainly possible and it would be nice to have the option upstream.
I have done something like this in generateOutputHtml
:
saveTextFile(htmlFileDestinationFolder + 'style.css', css);
And then don't forget to add a comment block referencing your stylesheet:
commentBlock += '\t<link rel="stylesheet" href="style.css" />\r';
Thanks. Along those lines worked. I'm importing the css/js files elsewhere so I dont want to add the reference to the files directly in the comment block.
What was also important: removing