main | How to make a website (with google docs) |
Share doc 2 web - Make a google doc
- File > share > publish 2 web
- Pros: easy, fast, hosted for you
- Cons: no format control, annoying google headers
|
Export html from doc - Make a google doc
- File > download > html
- Upload to hosting (ie github pages) (Where to put a website)
- Pros: easy, fast, can edit resulting html
- Cons: messy output code, need to sort hosting, no pages
|
Export html from doc with custom script - Make a copy of this doc
- Make it your own
- Create links between tabs
- A link’s text should match the name of a tab exactly
- Highlight the linked text and press CMD+K to insert link
- Choose headers and tabs at the bottom
- Choose desired tab to link to
- Under menu option Tab Export - Export Tabs - will export html files to the same folder your doc is contained in.
- Upload to hosting service
- Pros: make a hyperlinked website from tabbed document
- Cons: requires a custom script, need to host it yourself
|
Publish a google docs/sheets web app - In a google doc or sheet, menu item Extensions > Apps Script
- Press the “+” button and add a new HTML file called “Index”
- You can insert your website code here - for example the code you generated from downloading/exporting your google doc
- Save the file
- In the pre-existing “Code” file, add this function:
- function doGet(){
- return HtmlService.createHtmlOutputFromFile('Index');
- }
- In the upper right, click deploy > new deployment
- Select the gear > web app
- Execute as yourself
- Who has access > anyone
- Click “Deploy”
- Follow the url to your site
- Pros: can publish interactive content, hosting is covered
- Cons: kinda technical setup, can’t have multiple pages easily, url is cumbersome
|