Giter Site home page Giter Site logo

jestersimpps / static-generator-for-front-end-devs Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 12 KB

This is a static page generator I once created for freelance work. It generates pages in multiple languages based on a google spreadsheet file. The generator works by downloading the contents of a Google spreadsheet file that contains a key column and multiple translation columns

License: MIT License

JavaScript 87.50% CSS 0.12% HTML 12.38%

static-generator-for-front-end-devs's Introduction

#Static page generator with internationalization

This is a static page generator I once created for freelance work. It generates pages in multiple languages based on a Google spreadsheet file. The generator works by downloading the contents of the spreadsheet file that contains a key column and multiple translation columns.

gif

##Using the template

###0. Clone the repo

git clone https://github.com/jestersimpps/static-generator-for-front-end-devs.git
rm -rf static-generator-for-front-end-devs/.git

###1. Install dependencies

Install all development dependencies and client side libraries:

npm install
bower install

###2. Set up Google Spreadsheet file

A detailed guide can be found on my blog.

###3. Add your data to the Gruntfile.js config file

config: {
	project_name       	: '',
	src                	: 'src',
	dist               	: 'dist',
	locales            	: 'locales',
	google_document_key	: '1gA-5lpURCmllQAuTkc5vDvAv6Y4eXJDyr8XS-QJntes',
	default_locale     	: 'en',
	language_column1    : 'en',
	language_column2    : 'fr',
	language_column3    : 'es',
	AWSbucket          	: '',
	AWSregion          	: 'eu-west-1',
	AWSAccessKeyId     	: '',
	AWSSecretKey       	: ''
},

###4. Development

Development is done in handlebars templates. They are assembled using Assemble.io.

Development with automatic page reload:

grunt serve

###5. Build for production

grunt Build

The generator features automatic uploads to Amazon s3 on build. To disable these, comment out the aws_s3 in the build task at the bottom of the Gruntfile.js:

grunt.registerTask('build', [
	'clean',
	'bower_concat',
	'copy:files',
	'copy:fonts',
	'imagemin',
	'sass',
	'concat:css',
	'cssmin',
	'concat:js',
	'assemble',
	'htmlmin',
	'uglify',
	'getlanguages',
	'i18n',
	'clean:tmp',
	// 'aws_s3'
]);

static-generator-for-front-end-devs's People

Contributors

jestersimpps avatar

Stargazers

2902jr20 avatar

Watchers

James Cloos avatar 2902jr20 avatar

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.