package
Super simple static sites
npm install sitesGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Sites is a small collection of useful utilities for building static websites, without having to configure complex build tools. It works out-of-the-box with close to zero configuration required.
Sites includes everything you need for a modern static website, out-of-the-box:
tl;dr: See the example directory in this repo for a sample site.
Add the required npm packages to your site, by running yarn add --dev gulp sites (or npm install --save-dev gulp sites if using npm rather than Yarn).
Create basic directory structure:
assets for any static files that do not need any processing (images, web fonts, etc).css for SASS files. These are compiled into the _output/css directory.Create gulpfile.js with the following contents:
const gulp = require('gulp');
const sites = require('sites');
sites.installTasks(gulp);Build static HTML files, referencing CSS files from _output/css:
<!DOCTYPE html>
<html>
<head>
<
css/modules and css/partials directories changeRun gulp serve to open the site in your browser. This uses BrowserSync, so any edits to the CSS or HTML files will automatically refresh the browser!
Configure CSS combination by adding some comments to the HTML file:
<!-- build:css css/combined.css -->
<link href="_output/css/main.css" rel="stylesheet">
<!-- endbuild -->Run gulp build to build the production version of the site. The _output directory is now fully optimized and ready to push to production!
Estimated unpacked size across 65 packages.
4.8 MB+
Includes dependencies.
^7.0.0
8.1.0
^0.3.2
0.4.0
^1.3.0
1.4.0
^3.0.0
3.0.2
^3.1.2
5.0.0
^7.1.2
10.1.4
^7.1.6
10.6.2
^2.18.13
3.0.4
^7.0.0
10.0.0
^2.2.0
2.2.1
^2.6.1
3.0.0
^1.6.1
1.7.0
^0.4.3
0.4.4