driveception
driveception copied to clipboard
Simple Blog hosted on Google Drive, with Google Apps Script backend and Articles wrote in Google Docs and published using the Publishing feature
driveception
Simple Blog hosted on Google App Engine, with Google Apps Script backend and Articles wrote in Google Docs published using the Publishing feature
##How to Install
###Backend:
- Create a new Google Apps Script project as a Blank Project
- Copy the content from backend.gs
- Paste the content into the Google Apps Script project
- Save
- Click on Resources\Advanced Google Services
- Scroll to Drive API and click on the
off
slider to turning iton
- Click on the Google Developers Console link at the bottom of the popup dialog
- Filter the API list for Drive
- Turn on Drive API (clicking on the
OFF
button) - Close the Google Developer Console tab
- Click OK on the Google Apps Script Advanced Service button
- Manage versions (File\Manage Versions...) to create a new one
- Give a name (ex.
Initial
) and hit Save New Version, then close the Dialog - Time to publish the script (
Publish\Deploy as a web app...
) - In the dialog select Execute the app as:
me
, Who has access to the app:Anyone,even anonymous
- Click Ok, Copy the link from the new popup
- Inside
app\scripts\app.js
use the link for theapp.backendUrl
varialble - Run the
testDoPost
function of the script to authorize access to Google Drive with your user from the script - You can now close the script
###Site Hosting:
You can host the site on any service that is able to serve HTML,JS and CSS (basically every service you can think) as no serverside code is needed.
One option is to host the site on Google Drive
But for best performance and awesomeness provided by Service Workers, the gulp task build:ae
build the site to be deployed on Google App Engine with ease.
###Configuring the application:
Before building the app and upload the dist
folder to the server, remember to configure the application parameters inside app\scripts\app.js
blogTitle
: set the title for your blog
folders
: array of objects with the following structure:
--folderId
: the Google Drive File Id of the Folder the articles will be
--title
: the title to show in the menu
aboutFileId
: Optional, the Id of the Google Doc used for the About menu link, if not set the About menu will not be shown
backendUrl
: the URL to the GAS script created before
socials
: array of objects with the following structure:
--name
: The label displayed in the menu
--url
: the url associated to the menu item
###Uploading/Publishing the site:
After downloading the source, run npm install && bower install
, this should install all the tools needed for the build.
To test the app run gulp serve
the site should be accessible at localhost:3000
To build the app run gulp
and the site will be available for publishing inside the dist
folder
For a build ready to be deployed on Google App Engine:
- edit
application
andversion
inapp.yaml
- run
gulp build:ae
- go to the
dist
folder and runappcfg.py update .