Originally posted on script.gs
It all started when I came across Jonathon Broughton's technique to use Apps Script web apps within embeded ifames in Github Pages, which got my gears turning for I was jonesing to make use of an undocumented parameter within Apps Script's
doGet function -
pathInfo; which in the end, blew up on my face and I rolled back to using queryString instead.
window.open to have a new URL loaded on the same browser window (using
_top), based on the slug.
Midway through the development I get to know that Github Pages serves a 404 if it doesn't recognise the path or have a resource already allocated against it in the project repository and that's what led me to plug Rafael Pedicini's Single Page Apps for GitHub Pages - I doubt I'd have been able to host my service on Github Pages (for free), had it not been for this ingenious technique to deploy single page apps.
Access to the original resources can be found here -
- The entire folder on my Google Drive
- A Spreadsheet that acts as the datasource
- Finally, the script itself
Major learning from all of this was that in order to use
e.pathInfo, we'd need to append the script URL and in doing so, end up having Apps Script prompt user to login using their Google accounts (not particularly to allow script permissions but just because - we don't know yet).
Overall, it has been a humbling experience for having to publish a tool of my own 😊 - also available on Product Hunt.