Selecting specific Gist and GAS functions for publication

In publishing gists and publishing Google Apps Scripts I showed how to prettify and embed  snippets in web sites, blogs and so on. However, one last requirement is to be able to publish only particular functions. Although you can select particular modules and libraries for publication, this is probably not granular enough for small snippets. So here’s how to select particular functions from a module for publication.

For gists.
Here’s how to select just a couple of functions out of  a Gist Module


That gives us this

Here’s a GAS version – (in fact of the modules that process the func parameter requests)


You’ve probably figured out that functions can be selected by adding a func=x,y,z parameter to the URl for the container or the Google Apps Script link. That’s all there is to it. See the Excel liberation site for more detail.

Restrictions and coverage
For the moment, only javaScript (and GAS script functions) are selectable. At some later release I will update to include other languages. Although this post covers type=js, as used by the publisher container, this also work with type=json|jsonp|html.

About brucemcp 223 Articles
I am a Google Developer Expert and decided to investigate Google Apps Script in my spare time. The more I investigated the more content I created so this site is extremely rich. Now, in 2019, a lot of things have disappeared or don’t work anymore due to Google having retired some stuff. I am however leaving things as is and where I came across some deprecated stuff, I have indicated it. I decided to write a book about it and to also create videos to teach developers who want to learn Google Apps Script. If you find the material contained in this site useful, you can support me by buying my books and or videos.

Be the first to comment

Leave a Reply

Your email address will not be published.


14 + 14 =