Digital Kit & Google Sites Script

mirrorscript

Copy the script below:



function showFolderInSite() {

 var files = DocsList.getFolderById("Your Folder’s ID").getFiles();

 var page = SitesApp.getPageByUrl("https://sites.google.com/site/yoursite/yourpage");

 var attachments = page.getAttachments();

for(i in attachments){

attachments[i].deleteAttachment();

}

 for(i in files){

    page.addWebAttachment(files[i].getName(), '', files[i].getUrl());

 }

}


Now click on More > Manage Sites > Apps Scripts
Comments