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
Improved workflow
Optimized Style and SASS
ES6 & Optimization
Images optimized
Write less code
SEO Ready
Write better code
Progressive Web Apps (optional)
CMS Admin panel
Easy to deploy
The following tools should be installed before starting:
git clone https://github.com/sandoche/Jekyll-webpack-boilerplate.git
cd Jekyll-webpack-boilerplate
.npm install
and bundler install
in order to install dependencies and clean the git repo.npm start
to start the development server (or use npm start
).Here is a demo of the Netlify build: https://dazzling-swartz-9738b5.netlify.com
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.
To start the development server just run npm start
.
├── 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
_config.yml
package.json
the name is used in the meta tagsmanifest.json
file please edit config/manifest.json
_images
and in the root folder_scss
for better reading_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_src
and import them from index.js
or you can also add them as a new entry point in your webpack configuration file_i18n
folder inside its language, check the boilerplate examples_i18n/en.yml
(replace en with your language) and call them in your template with {% t variable_name.sub_variable %}
gem 'jekyll-multiple-languages-plugin'
from gemfile
and jekyll-multiple-languages-plugin
from plugins
in _config.yml
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
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
This will remove the generated folders
npm run clean:project
_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
sudo apt install -y build-essential libpng-dev
in order to fix the pngquant failed to build, make sure that libpng-dev is installed
issuePlease
If you like this project, feel free to donate:
Jekyll 是一个简单的免费的Blog生成工具,类似WordPress。但是和WordPress又有很大的不同,原因是jekyll只是一个生成静态网页的工具,不需要数据库支持。但是可以配合第三方服务,例如discuz。最关键的是jekyll可以免费部署在Github上,而且可以绑定自己的域名。 快速安装指令: gem install jekylljekyll new my-awesome-sit
Jekyll Netlify Boilerplate Note: Check out my Eleventy Netlify Boilerplate. It does pretty much the same as this project but uses the Eleventy static site generator. It's fast, flexible and doesn't re
中文网站 jekyllcn 快速开始 ~ $ gem install jekyll bundler ~ $ jekyll new my-awesome-site ~ $ cd my-awesome-site ~/my-awesome-site $ bundle install ~/my-awesome-site $ bundle exec jekyll serve # => 打开浏览器 http
jekyll-admin 是一个 jekyll 插件,为用户提供了传统 CMS(内容管理系统)风格的图形化界面来创作内容和管理 jekyll 网站。 该项目分为两部分。基于 Ruby 的 HTTP API 处理 jekyll 和文件系统的操作部分,以及在这个 API 基础上的基于 JavaScript 的前端部分。 安装: 就像安装其他插件一样,请参阅 jekyll 文档的插件安装部分安装 jek
Jekyll的增强版,使用Markdown来写日志。 Jekyll采用静态文件方式管理,不需要数据库即可支持一个独立博客站点,在github-pages平台上被普遍采用。Jekyll-Bootstrap在Jekyll基础上,集成了twitter-bootstrap界面风格和一些实用的插件,并且易于扩展。
Jekyll Docker Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types wi