Node module for controlling the Wintersmith static site generator. Useful for task runners like gulp.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This module exposes a really simple API for configuring and controlling the Wintersmith static site generator. This is useful if you use a task runner (like gulp or Grunt) with your static site workflow. This module will allow you to automatically compile assets and refresh the browser when you edit Markdown files or change something in the templates etc.


  1. Install via npm:

     npm install run-wintersmith --save
  2. Require it in your project:

    var runWintersmith = require('run-wintersmith');
  3. Call one of the API methods:

    // or;

Usage with gulp

Please take a look at the example-gulpfile.js to see full usage example.

Feel free to get in touch if you need help setting it up.



Starts the Wintersmith site in preview mode, with default hostname and port. (localhost:3000)

Generates the Wintersmith site to the default directory. (/build)


The module has a few default settings. They can be overwritten in the following way:

var runWintersmith = require('run-wintersmith');

runWintersmith.settings.hostname = 'somehostname';
runWintersmith.settings.port = 8080;
runWintersmith.settings.configFile = 'myConfig.json';


Sets which Wintersmith configuration file to read from. Default is config.json.


Sets the server hostname. Default is localhost. Only used in preview mode.


Sets the server port. Default is 3000. Only used in preview mode.


Wintersmith is an awesome static website generator. gulp is an equally awesome task runner. I like to use gulp in my Wintersmith project to handle everything - so I decided to share how I do it.

At first, I created gulp-wintersmith as gulp plugin to automate my development workflow with Wintersmith. But as I learned from the gulp core team: Creating a specific plugin to connect them, is in violation of the gulp plugin guidelines and of the spirit of creating non-specific modules.

So instead I made this module more generic, so it could be used in different contexts and not only with gulp.

Feedback and contribution

I'm still new to creating and publishing modules, please let me know if you have any ideas or feedback to this module.


MIT © Vanja Cosic