-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
On first run of my build.js file, everything works fine. Whenever I edit a file, .md or .jade, the browser reloads, but I get a 404 error. Has anyone else run into this issue?
build.js file:
var metalsmith = require('metalsmith'),
layouts = require('metalsmith-layouts'),
inPlace = require('metalsmith-in-place'),
markdown = require('metalsmith-markdown'),
browserSync = require('metalsmith-browser-sync'),
moment = require('moment'),
collections = require('metalsmith-collections'),
beautify = require('metalsmith-beautify');
var siteBuild = metalsmith(__dirname)
.metadata({
site: {
title: 'MetalSmith test'
}
})
.source('./src')
.destination('./build')
.use(collections({
posts: {
pattern: 'posts/*.md',
sortBy: 'date',
reverse: true
}
}))
.use(markdown())
.use(layouts({
engine: 'jade',
moment: moment
}))
.use(browserSync({
server : 'build',
files : ['src/**/*', 'layouts/*.jade']
}))
.build(function(err) {
if(err) {
console.log(err);
}
else {
console.log('We did it!')
}
});Metadata
Metadata
Assignees
Labels
No labels