Adds asset revisioning

This commit is contained in:
Samuel Ryan 2015-11-06 21:36:13 +00:00
parent a32c0342aa
commit 4658391fc9
3 changed files with 7 additions and 3 deletions

View File

@ -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({

View File

@ -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",

View File

@ -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