Giter VIP home page Giter VIP logo

content's People

Contributors

gkpty avatar lucaskardo avatar

Watchers

 avatar  avatar

content's Issues

Automatically add robots.txt

When deploying a dev/test bucket, add a robots.txt to tell google to crawl none.

User-agent: *
Disallow: /

When deploying a production bucket change robots.txt to:

User-agent: *
Allow: /

Only add a robots.txt file if one doesnt already exist.

Add a in the upload method that will allow/disallow user agents depending if its prod/test

Bug: Possible error in upload method when path contain directories with the same name

UPDATE
Make the update method (in the content module) recieve the file in params instead of using fs to get the file. The user might wanna get the file from somewhere else e.g. a github repo..

This should be moved from deploy into the deployCommand in a function called upload all files.

another module called uploadChangedFIles
let ext = filePath.substring(filePath.lastIndexOf('.') + 1);
let content_type = '';
let keyPath = filePath;
//this split might cause an issue if a child dir has the same name as parent
if(dir) keyPath = keyPath.split(dir+'/', 2)[1];
if(ext =='svg') content_type = 'image/svg+xml'
else if(ext =='jpg' || ext =='jpeg') content_type = 'image/jpeg'

use substr(0,indexOf) instead of split

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.