πŸ”† A flexible two-column Jekyll theme with React, Webpack Firebase and Netlify, hosted on GitHub, Netlify or your own server.
Clone or download
Pull request Compare This branch is 2572 commits ahead, 231 commits behind mmistakes:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
.vscode
_data
_i18n
_images
_includes
_layouts
_pages
_plugins
_sass
_src
admin
audio
build
config
photography
public
social-feeds
.editorconfig
.eslintignore
.eslintrc
.firebaserc
.gitattributes
.gitignore
.jscsrc
.stylelintignore
4.12.0
BingSiteAuth.xml
CHANGELOG.md
Gemfile
Gemfile.lock
LICENSE.txt
README.md
Rakefile
_config.yml
_headers
apple-touch-icon-precomposed.png
atom.xml
atom_feed.xml
calendar.data.html
cloudinary.yml
demo-secret-key.enc
email-config.js
eslintrc.js
eslintrc.json
favicon.png
feed.json
humans.txt
index.html
keybase.txt
manifest.json
manifest.webmanifest
netlify.toml
npmignore.txt
package-lock.json
package.json
posts.json
robots.txt
service-worker.js
serviceAccountKey..json
staticman.yml
stats.json
storage.rules
webpack-stats.json
webpack.config.js

README.md

Don Boulton version Of:

Deploy to Netlify

Known Vulnerabilities

Minimal Mistakes Jekyll Theme

LICENSE Jekyll Tip Me via PayPal

Adding a Jekyll boilerplate supercharged with React & Webpack to build modern performant websites (including Progressive Web Apps). Read more about how this boilerplate has been built: https://medium.com/learning-lab/5-how-i-learnt-webpack-3-and-created-a-jekyll-and-webpack-boilerplate-edd86645fd5e

Features

Improved workflow

  • Webpack working along with Jekyll
  • BrowserSync live reload

Optimized Style and SASS

  • SASS Style
  • PostCSS Auto Preffixer
  • CSS minified
  • Critical CSS Path added to the main template (using the command with optim)

ES6 & Optimization

  • ENV Babel
  • JS webpack minified and uglified
  • ES Lint

Images optimized

  • Webpack Imagemin, images optimizations

Write less code

  • Theme color in config
  • Favicon generated automatically
  • Google Analytics setup in config file (optional)
  • Doorbell setup in config file (optional)
  • Cookie consent setup in config file (optional)

SEO Ready

  • SEO Plugin Jekyll
  • Sitemap generated

Write better code

  • Internationalization plugin

Progressive Web Apps (optional)

  • Generation of the Manifest
  • Generation of Service worker

Easy to deploy

  • Easy deployment with Netlify

Prerequisites

The following tools should be installed before starting:

  • NodeJS, npm
  • Ruby, Gem, Bundler
  • Jekyll
  • React
  • Webpack
  • Sass

Quick start

  1. Make sure you have all the prerequisites above installed.
  2. Clone this repo using git clone https://github.com/sandoche/Jekyll-webpack-boilerplate.git
  3. Move to the appropriate directory: cd Jekyll-webpack-boilerplate.
  4. Run npm install and bundler install in order to install dependencies and clean the git repo.
  5. Run npm start to start the development server (or use npm start).

Quick deployment

Deploy to Netlify

Here is a demo of the Netlify build: https://dazzling-swartz-9738b5.netlify.com

Development

To start the development server just run npm start

Folder structure

.
β”œβ”€β”€ 404.html
β”œβ”€β”€ about.md
β”œβ”€β”€ blog.md
β”œβ”€β”€ config <--- This folder contains the different Webpack config files
β”‚   β”œβ”€β”€ optimization-fix <--- A fix for optimization, do not delete this folder
β”‚   β”œβ”€β”€ postcss.config.js <--- Post css config
β”‚   β”œβ”€β”€ sw.config.js <--- The service worker config file
β”‚   β”œβ”€β”€ webpack.common.js <--- The common Webpack config file for all the environment
β”‚   β”œβ”€β”€ webpack.dev.js <--- Dev Webpack environment config file
β”‚   β”œβ”€β”€ webpack.optim.js <--- This is used to add the css critical path in the default template
β”‚   β”œβ”€β”€ webpack.prod.js <--- Prod Webpack environment config file
β”‚   └── webpack.pwa.js <--- Please edit this file if you want a PWA
β”œβ”€β”€ _config.yml <--- The Jekyll config file that you need to set up
β”œβ”€β”€ Gemfile
β”œβ”€β”€ Gemfile.lock
β”œβ”€β”€ _i18n <--- Contains your posts and data in the language you need (check below how to remove it)
β”œβ”€β”€ _images <--- Put all your images here, you will access them with this path /assets/images/
β”‚   β”œβ”€β”€ icon.png <--- Replace this with your icon
β”‚   └── large-icon.png <--- Replace this with your Facebook Open Graph picture
β”œβ”€β”€ icon.png <--- Same with this one
β”œβ”€β”€ _includes
β”œβ”€β”€ index.md
β”œβ”€β”€ _layouts
β”‚   β”œβ”€β”€ amp.html <--- The layout for Accelerated mobile page
β”‚   β”œβ”€β”€ blog.html
β”‚   β”œβ”€β”€ home.html
β”‚   β”œβ”€β”€ page.html
β”‚   └── post.html
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package.json <--- Update this file with your information especially the name which is used for the meta tags
β”œβ”€β”€ README.md
β”œβ”€β”€ _scss <--- Put your partials here
β”‚   └── _default.scss
β”œβ”€β”€ _src <--- This folder contains your JS and SASS entry points
β”‚   β”œβ”€β”€ index.js
β”‚   β”œβ”€β”€ index.scss
β”‚   └── template
β”‚       └── default.html <--- Here is the main default template, feel free to edit it but do not delete it
β”œβ”€β”€ webpack.config.js
└── package-lock.json

You can see above the basic structure of the boilerplate and the main differences with the official Jekyll folder structure

Configurations

  • The required configurations are all in _config.yml
  • Also edit package.json the name is used in the meta tags
  • If you want a manifest.json file please edit config/webpack.pwa.js
  • Replace the different icon by yours in _images and in the root folder

Assets

  • SCSS partials should be located in _scss for better reading
  • Put all your images in _images the content of this folder will be moved to the _site/assets/images so you can access them with this path /assets/images/** in your templates, check the examples
  • Put all your Javascript files inside _src and import them from index.js or you can also add them as a new entry point in your webpack configuration file

Internationalization

  • All the posts should be there in inside _i18n folder inside its language, check the boilerplate examples
  • You can put your variables inside _i18n/en.yml (replace en with your language) and call them in your template with {% t variable_name.sub_variable %}
  • You can remove the plugin by removing gem 'jekyll-multiple-languages-plugin' from gemfile and jekyll-multiple-languages-plugin from plugins in _config.yml
  • We invite you to read the very good official documentation of the plugin Jekyll multiple language plugin

Build

Optimized website

To build the website run the following line

npm run build

# or if you want the critical css
npm run build:optim

The built website will be in _site folder.

You can also run a local server to test it with this command

npm run serve:dist

PWA

If you want to build a PWA (including the manifest.json and the service worker) run the following. Please ensure to have configured this file config/webpack.pwa.js The built website will be in _site folder.

npm run build:pwa

# or if you want the critical css
npm run build:pwa:optim

Clean assets & _site folders

This will remove the generated folders

npm run clean:project

Known issues

  • Jekyll watch doesn't reload / rebuild when a translation file is updated inside _i18n folder, I recommand to remove jekyll-multiple-languages-plugin if you don't want a multi language website and if you want to watch / rebuild faster. Otherwise close and start npm run start to rebuild and see your changes from _i18n
  • The critical CSS Path may show some weird behavior when the page is loading that is why there are separated npm scripts

Websites using Jekyll Webpack Boilerplate

Other documentations

Credits

Creator

Michael Rose

Other:


License

The MIT License (MIT)

Copyright (c) 2013-2018 Michael Rose and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Minimal Mistakes incorporates icons from The Noun Project creators Garrett Knoll, Arthur Shlain, and tracy tam. Icons are distributed under Creative Commons Attribution 3.0 United States (CC BY 3.0 US).

Minimal Mistakes incorporates Font Awesome, Copyright (c) 2017 Dave Gandy. Font Awesome is distributed under the terms of the SIL OFL 1.1 and MIT License.

Minimal Mistakes incorporates photographs from Unsplash.

Minimal Mistakes incorporates Susy, Copyright (c) 2017, Miriam Eric Suzanne. Susy is distributed under the terms of the BSD 3-clause "New" or "Revised" License.

Minimal Mistakes incorporates Breakpoint. Breakpoint is distributed under the terms of the MIT/GPL Licenses.

Minimal Mistakes incorporates FitVids.js, Copyright (c) 2013 Dave Rubert and Chris Coyier. FitVids is distributed under the terms of the WTFPL License.

Minimal Mistakes incorporates Magnific Popup, Copyright (c) 2014-2016 Dmitry Semenov, https://dimsemenov.com. Magnific Popup is distributed under the terms of the MIT License.

Minimal Mistakes incorporates jQuery Smooth Scroll, Copyright (c) 2017 Karl Swedberg. jQuery Smooth Scroll is distributed under the terms of the MIT License.

Minimal Mistakes incorporates GreedyNav.js, Copyright (c) 2015 Luke Jackson. GreedyNav.js is distributed under the terms of the MIT License.

Minimal Mistakes incorporates Jekyll Group-By-Array, Copyright (c) 2015 Max White mushishi78@gmail.com. Jekyll Group-By-Array is distributed under the terms of the MIT License.

Minimal Mistakes incorporates @allejo's Pure Liquid Jekyll Table of Contents, Copyright (c) 2017 Vladimir Jimenez. Pure Liquid Jekyll Table of Contents is distributed under the terms of the MIT License.

Minimal Mistakes incorporates Lunr, Copyright (c) 2017 Oliver Nightingale. Lunr is distributed under the terms of the MIT License. Everthing else