The project template is the way to build static sites fast. With one command, build a static page using Webpack, Gulp, Handlebars.js, and SCSS.
[ES6]
All with one command from the terminal:
yarn start
npm install -g gulp # May require `sudo`
yarn install # One time
gulp serve
If you want to use this repo for your next project, make sure to make the following changes:
data.yml
, filling in the HTML metadata associated with your site.package.json
providing a name
, version
, description
, license
, and repository.url
..git
folder, so that you start from a fresh commit history.README.md
to your preference.An overview of Gulp commands available:
gulp build
Builds the site into the dist
directory. This includes:
gulp build:optimized
This is used for distributing an optimized version of the site (for deployment). It includes everything from gulp build
as well as:
gulp watch
Watchs for changes in local files and rebuilds parts of the site as necessary, into the dist
directory.
gulp serve
Runs gulp watch
in the background, and serves the dist
directory at localhost:3000
with automatic reloading using Browsersync.
├── webpack.config.dev.js # Controls javascript and css bundling
├── Gulpfile.js # Controls Gulp, used for building the website
├── README.md # This file
├── data.yml # Metadata associated with the site.
├── dist/ # Gulp builds the static site into this directory
├── package.json # Dependencies
└── src/ # All source code
├── assets/
├── css/ # Stylesheets
├── font/ # Font files
├── img/ # Images and SVGs
├── js/ # Javascript libraries and scripts
├── views/
├── partials/ # Handlebars HTML partials that are included / extended
└── templates/ # Handlebars HTML files, one per page on the site.