Git Product home page Git Product logo

jekyll-seed's Introduction

jekyll-seed

A basic starting point for jekyll web projects

Overview

Steps to follow as soon as you download this structure to start a project:

  • Update package.js with data about the project (name, repo, license...)
  • If the license is known update LICENSE
  • Update .circleci/config.yml with correct repo and other needed information.
  • On _config.yml and _includes/meta.html update the project title and check for other boostrap information that can be changed or removed.
  • Remove unneeded images from the graphics folder and replace the favicon with a project related one.
  • Update the modules to the most recent version.
  • Delete this README.md and rename _README.md. Fill in the needed data. This is the most important task. Others need to be able to know what the project is about and how to work with it. This can't be stressed enough.

It's better to do this straight away so no traces of project-seed are ever pushed to github and just looks more professional. The values that are not immediately know should be left blank and filled ASAP.

Gulp for building

The gulpfile is based on the project-seed. The build system currently supports:

  • Image optimization
  • Sass compilation
  • Watchify for JS bundling
  • Minification/uglification where appropriate
  • Serving and live reloading of pages

There are two commands, both run via yarn.

  • yarn build - clean & build everything and put it into dist folder
  • yarn serve - serve the pages and utilize live reload on changes to styles, fonts, images, scripts and HTML.

Assets Structure

app/assets/
|
+- scripts/: The user scripts
|  |
|  +- config/: configuration files (see configuration section)
|
+- styles/: The sass styles
|
+- vendor/: Any third-party script that can't be required()
|
+- graphics/: Images for the site divided in:
|  |
|  +- layout/: Images for layout elements (Ex: background images)
|  +- meta/: Images for the meta tags (Mostly icons and facebook images)
|  +- content/: Content image
|

Jekyll configurations and environment variables

There are 3 files to configure jekyll that get loaded according to the environment the app is being built for:

  • _config.yml - production settings
  • _config-stage.yml - overrides the production settings for staging server
  • _config-dev.yml - local (development) overrides. This file is gitignored, so you can safely change it without polluting the repo.

Javascript configurations and environment variables

At times, it may be necessary to include options/variables specific to production, staging or local in the code. To handle this, there is a master config.js file. This file should not be modified. Instead, modify one of:

  • config/production.js - production settings
  • config/staging.js - overrides the production settings for staging server (basically Travis not on the DEPLOY branch)
  • config/local.js - local (development) overrides. This file is gitignored, so you can safely change it without polluting the repo.

When developing locally with yarn run serve, the default will be to use production.js (with overrides from local.js). However, if you need to run with the staging settings, use: yarn run stage (this will not start a server)

How scripts are built

The script build, which uses browserify, outputs two js files: bundle.js and vendor.js:

  • bundle.js, created by the javascript task in deployment and by watchify during development, contains all the app-specific code: app/scripts/main.js and all the scripts it requires that are local to this app.
  • vendor.js, created by the vendorBundle task, contains all the external dependencies of the app: namely, all the packages you install using yarn add ....

Circle CI for testing and deployment

The .circleci/config.yml file enables the usage of Circle CI as a test and deployment system. In this particular case, Travis will be looking for any changes to the repo and when a change is made to the master branch, Travis will build the project and deploy it to the gh-pages branch.

semistandard for linting

We're using semistandard for linting.

  • yarn lint - will run linter and warn of any errors.

There are linting plugins for popular editors listed in the semistandard repo.

jekyll-seed's People

Contributors

danielfdsilva avatar drewbo avatar kamicut 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.