• Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    HTML
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚡️ A boilerplate with Jekyll and Webpack to make the most performant static websites

Jekyll-webpack-boilerplate

GitHub Telegram Medium Badge Twitter: sandochee

A Jekyll boilerplate supercharged with 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

ES6 & Optimization

  • ES6 Babel
  • JS minified and uglified
  • ES Lint

Images optimized

  • 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
  • Accelerated Mobile Pages enabled for Posts

Write better code

  • Internationalization plugin

Progressive Web Apps (optional)

  • Generation of the Manifest
  • Generation of Service worker

CMS Admin panel

  • Works with Netlify CMS

Easy to deploy

  • Easy deployment with Netlify

Prerequisites

The following tools should be installed before starting:

  • NodeJS, npm
  • Ruby, Gem, Bundler
  • Jekyll
  • Sass
  • Distro package build-essential libpng-dev

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

Netlify CMS

It also works with Netlify CMS after enabling Identity service and Git Gateway: https://www.netlifycms.org/docs/add-to-your-site/#enable-identity-and-git-gateway

See admin/config.yml for more customization.

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
│   ├── manifest.json <--- Please edit this file if you want a PWA
│   ├── 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.prod.js <--- Prod Webpack environment config file
│   └── webpack.pwa.js
├── _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/manifest.json
  • 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

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/manifest.json The built website will be in _site folder.

npm run build:pwa

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
  • Wsl2 requires to run sudo apt install -y build-essential libpng-dev in order to fix the pngquant failed to build, make sure that libpng-dev is installed issue

Websites using Jekyll Webpack Boilerplate

Other documentations

⭐️ Show your support

Please ⭐️ this repository if this project helped you!

patreon.png

🍺 Buy me a beer

If you like this project, feel free to donate:

  • PayPal: https://www.paypal.me/kanbanote
  • Bitcoin: 19JiNZ1LkMaz57tewqJaTg2hQWH4RgW4Yp
  • Ethereum: 0xded81fa4624e05339924355fe3504ba9587d5419
  • Monero: 43jqzMquW2q989UKSrB2YbeffhmJhbYb2Yxu289bv7pLRh4xVgMKj5yTd52iL6x1dvCYs9ERg5biHYxMjGkpSTs6S2jMyJn
  • Motive: MOTIV-25T5-SD65-V7LJ-BBWRD (Get Motive Now: https://motive.network)

More Repositories

1

Darkmode.js

🌓 Add a dark-mode / night-mode to your website in a few seconds
JavaScript
2,634
star
2

Mobile-app-landingpage-template

📱 Free to use static generated website template for your mobile app
HTML
543
star
3

Proof-of-Stake-Cryptocurrency-generator

🍀 Create your own Proof of Stake cryptocurrency with its own blockchain based on NXT
HTML
359
star
4

Detoxify-app

📱🙅 Generate a fake app to replace any addictive app
Twig
136
star
5

Infinideas-app

💡 Infinite feed of crowdsourced ideas from Reddit and Twitter.
Dart
98
star
6

CuratedStack-nocode-template

🧱 A template to create a CuratedStack without (or with) code
Vue
93
star
7

Terminhack

👨‍💻 Impress your friends by pretending to be a real hacker
JavaScript
74
star
8

Surfable-app

Install any website as an app for instant access 🖥️
JavaScript
65
star
9

nuxtjs-darkmode-js-module

🌓 Add darkmode / nightmode to your nuxt project in a few seconds
JavaScript
61
star
10

LearningLab-website

Website of Learning lab to follow the challenge
HTML
25
star
11

Producthunt-floating-prompt

⚡️ Invite your users to support you on product hunt with this floating prompt
JavaScript
23
star
12

Monero-miner-website

⛏️ A simple page to mine monero using Coin hive
HTML
19
star
13

Webdesign-checklist

A web design checklist to make the most beautiful designs!
19
star
14

NaivecoinStake-Proof-of-Stake-Website

A tutorial for building a Proof of Stake cryptocurrency
HTML
16
star
15

tree-emoji-cli

List contents of directories in tree-like 🌳 format with emojis 📁📄🖼️
JavaScript
15
star
16

Invitecode-website

🤑 Discounts on your favorite services through invite codes
HTML
12
star
17

learning-music

Summer loading...12% - A music to learn music production
11
star
18

Colors-curated-links

A curated list of tools to help you make the best color palettes
10
star
19

Hacking-cheatsheet

📑 A collection of cheatsheets for pentesting tools
10
star
20

snoozever

📥 Get Gmail snoozed emails directly to Evernote
JavaScript
10
star
21

Colors-interactor-website

A website to quickly test the interactions between the colors of your palette
JavaScript
9
star
22

nuxt-floating-prompt-module

⚡️ Invite your users to support you on product hunt (or anything else) with this floating prompt for Nuxt.js
JavaScript
7
star
23

Wine-Flashcards-Anki

Flashcards for my learning about wine
HTML
4
star
24

Nucleart-smart-contracts

☢️ Nuke any NFT and receive a new radioactive NFT
JavaScript
4
star
25

BreakingOut-website

👮 A Prison Break themed multiplayer persistent online browser game (built in 2007 when I was 16, and a very bad coder)
PHP
4
star
26

Godot-learning-udemy

Godot Learning repository for the Udemy godot course
GDScript
3
star
27

Jetstream-inertia-laravel-todo-list

Building a simple todo list with Jetstream and Inertia
PHP
3
star
28

Interneting-is-hard-archive

An archive from internetingishard.com
HTML
2
star
29

satoshi-lottery-api

Try random bitcoin keys and see if you get lucky!
Go
2
star
30

nxt-clone-starter

A fork of the nxt-clone-starter
2
star
31

Gmail-Filters-Detection

Gmail addon made with google app script which detects whether a filter can be applied or not to the email
JavaScript
2
star
32

TEDxMarseille-2016-website

TEDxMarseille 2016 Website
CSS
1
star
33

Snitco-information-architecture-example

An example for my blog article
1
star
34

Revenual-status

Status of Revenual's services
1
star
35

Captainshare-website

The sharing economy curated directory
PHP
1
star
36

VueJS-simple-todo-vuex-example

A very simple todo app using vuex for demo-ing VueJS
JavaScript
1
star
37

Symfony-ux-live-component-todo-list

Playing with the new Symfony UX Live Component
PHP
1
star
38

kycdao-react-sdk

A wrapper around kycdao-js-sdk for React and Next.js
TypeScript
1
star
39

beefy-dao-treasury

A simple treasury dashboard
TypeScript
1
star
40

TEDxCapture

TEDxCapture App is an open project for TEDx communities in order to Capture and Spread the best moments
JavaScript
1
star
41

VueJS-presentation

A presentation about VueJS and frontend development
HTML
1
star