0

Trying to build a personal website using Google App Script - have set up a main html page, a css page and a js page.

On the main page I have a menu and a main div area where I inject content upon clicking on the links in the menu (so clicking on a link to a YouTube video embed the video in the main div area)

So far so good

Some of the content is text block - a cv, a bio etc - I want to have them in a separate document (so i can edit the easily) and load them into the div area whenever needed. I managed to do this making a google doc but when using the embed code i get a frame and other stuff (like "Published by Google Drive–Report Abuse") that I don't want...

So I thought I can create another html file for each text document (where I can format using html tags etc) and load that html into the div area but I am not sure how to do it...

Cooper
  • 59,616
  • 6
  • 23
  • 54
  • So far from what I've read I'm thinking it would be a lot easier for you to consider using tthe new google sites. It's very easy to use for a variety of media types. Here's a [link](https://stackoverflow.com/a/55770563/7215091) to an answer of mine that provides the ability to use multiple pages in a webapp. – Cooper Dec 10 '20 at 18:50
  • thanks - i wanted to use script app partly because of design (require css and javascript) and partly as a was of learning code... I have already built a similar webpage few years ago - that relied on a jave script library that has not been updated - its this site michelmoalem.com (you can see the functionality i require by throwing different content into the main div) so now I am trying to tanslate this design to my new site... dont think I can do this on google sites alone... – user2048695 Dec 10 '20 at 19:17
  • Ok. No problem. Hope my link to building multi page web apps will help. One of the problems with using webapps for websites is the number of simultaneous users and also you may have to deploy it as execute as you and allow anyone which may be difficult to maintain without exceeding your periodic script limit. – Cooper Dec 10 '20 at 19:27
  • 1
    Does this answer your question? https://stackoverflow.com/questions/63653100/ – TheMaster Dec 10 '20 at 21:41
  • thanks all - figured out how to extract the text from the google doc using getText - not the cleanest solution as it I still have to add all the html code as text in the google doc which makes editing the page a messy affair. My bigger problem with this solution is that for some reason there is noticabble letancy reading the text from the doc and rendering inside the webpage... not sure why but will raise a separate question about that... – user2048695 Dec 11 '20 at 23:05

0 Answers0