diff --git a/build.js b/build.js index f0a360b..d7a4585 100644 --- a/build.js +++ b/build.js @@ -7,6 +7,7 @@ var sass = require('metalsmith-sass'); var elevate = require('metalsmith-elevate'); var ignore = require('metalsmith-ignore'); var collectionGrouping = require('metalsmith-collection-grouping'); +var fingerprint = require('metalsmith-fingerprint-ignore'); var metalsmith = Metalsmith(__dirname); metalsmith @@ -34,6 +35,8 @@ var metalsmith = Metalsmith(__dirname); .use(sass()) ) + .use(fingerprint({pattern: ['style.css']})) + .use(branch('**/*.md') .use(markdown()) .use(layouts({ diff --git a/package.json b/package.json index eff7ed3..3c861a5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "An easy to reference directory of HTTP Status Codes", "main": "build.js", "scripts": { - "test": "build.js" + "start": "node build.js", + "test": "node build.js" }, "repository": { "type": "git", @@ -25,6 +26,7 @@ "metalsmith-collection-grouping": "^0.1.0", "metalsmith-collections": "^0.7.0", "metalsmith-elevate": "0.0.0", + "metalsmith-fingerprint-ignore": "^1.1.2", "metalsmith-ignore": "^0.1.2", "metalsmith-layouts": "^1.4.2", "metalsmith-markdown": "^0.2.1", diff --git a/templates/layout.jade b/templates/layout.jade index 22f3a25..75dbd55 100644 --- a/templates/layout.jade +++ b/templates/layout.jade @@ -5,8 +5,7 @@ doctype html html(lang="en") head block title - // link(rel='shortcut icon', href='/favicon.ico', type='image/x-icon') - link(rel='stylesheet', href='/style.css') + link(rel='stylesheet', href='/' + fingerprint['style.css']) link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Montserrat|Open+Sans|Source+Code+Pro:700', type='text/css') meta(name='viewport', content='width=device-width, initial-scale=1.0') body