Giter Site home page Giter Site logo

smokybob / driveception Goto Github PK

View Code? Open in Web Editor NEW
14.0 6.0 7.0 629 KB

Simple Blog hosted on Google Drive, with Google Apps Script backend and Articles wrote in Google Docs and published using the Publishing feature

License: Apache License 2.0

JavaScript 37.12% HTML 62.88%

driveception's Introduction

Stories in Ready 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:

  1. Create a new Google Apps Script project as a Blank Project
  2. Copy the content from backend.gs
  3. Paste the content into the Google Apps Script project
  4. Save
  5. Click on Resources\Advanced Google Services
  6. Scroll to Drive API and click on the off slider to turning it on
  7. Click on the Google Developers Console link at the bottom of the popup dialog
  8. Filter the API list for Drive
  9. Turn on Drive API (clicking on the OFF button)
  10. Close the Google Developer Console tab
  11. Click OK on the Google Apps Script Advanced Service button
  12. Manage versions (File\Manage Versions...) to create a new one
  13. Give a name (ex. Initial) and hit Save New Version, then close the Dialog
  14. Time to publish the script (Publish\Deploy as a web app...)
  15. In the dialog select Execute the app as: me, Who has access to the app: Anyone,even anonymous
  16. Click Ok, Copy the link from the new popup
  17. Inside app\scripts\app.js use the link for the app.backendUrl varialble
  18. Run the testDoPost function of the script to authorize access to Google Drive with your user from the script
  19. 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 and version in app.yaml
  • run gulp build:ae
  • go to the dist folder and run appcfg.py update .

driveception's People

Contributors

smokybob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

driveception's Issues

avoid tap on scroll

During scroll on touch devices, on-tap on items is executed causing the opening of an Article

How to confgure script..

Hi..

This is an interesting project, I was attempting to give it a go, basically at the moment from a local server, to my drive folder/doc.

I can show the index doc, but when the script (which I loaded into script.google.com) is accessed, I get..

 XMLHttpRequest cannot load https://script.google.com/macros/s/AKfycbyIyJaxZnz6xZNefzrlwzlvHTw5IZuAWvW5dVxSxW-x-4pxquDq/exec. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access.
core-ajax.html:298 core-ajax caught an exception trying to parse response as JSON:
core-ajax.html:299

It worked on your configurations, and running the test function works.. How is the script configured to be able run cross-site?

my test configuration is..

  articlesFolders='[
                  {"folderId":"0B15mS1oaBzdQNlZnbUxBRWdIcDA",
                    "title":"Test Web Root"}
                ]'
                aboutFileId="14RazpgQ-J43pm-dFnTjpzmA4khIorWUmyVc0Jo1dAz0"
                GASbackendUrl="https://script.google.com/macros/s/AKfycbyIyJaxZnz6xZNefzrlwzlvHTw5IZuAWvW5dVxSxW-x-4pxquDq/exec"

Issue with visualization of articles

List of Articles and Articles are seen incorrectly, it seems there are overlapping blocks to others, I leave below a screenshot descriptive.
use firefox version 36.0.1
issue

Splash Screen

Add a splash screen displayed while waiting for the application to be ready

Rewrite to use Polymer 1.0

Rewrite the site starting from the Polymer Starter Kit that is using Polymer 1.0

Page JS enable to have an Article Page with the articles inside a separate element.

platinum-sw elements simplify the setup of offline mode with service workers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.