Skip to content

Instantly share code, notes, and snippets.

@demoive
Created March 3, 2020 00:01
Show Gist options
  • Save demoive/f402a11ea33ff7087c111486a799f801 to your computer and use it in GitHub Desktop.
Save demoive/f402a11ea33ff7087c111486a799f801 to your computer and use it in GitHub Desktop.
Google Apps Script Helper - HTML Service
/**
* Facilitates adding includes into HTML documents.
* <?!= include('path/to/filename'); ?>
*
* https://developers.google.com/apps-script/guides/html/best-practices#separate_html_css_and_javascript
*/
function include(filename) {
return HtmlService.createHtmlOutputFromFile(filename).getContent();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment