<commit_before># Wintersmith

A flexible static site generator.

## Features

 * Easy to use
 * Generated sites can be hosted anywhere (output is plain html)
 * Write articles/pages using markdown
 * Robust templating using [Jade](https://github.com/visionmedia/jade)
 * Preview server (no need to rebuild every time you make a change)
 * Highly configurable
 * FAST!

## Get going

Simple steps to getting started:

	[sudo] npm install wintersmith -g
	wintersmith new ~/my-site
	cd ~/my-site
	wintersmith preview

Now point your browser to `http://localhost:8080` and start editing templates and adding articles. When you are done run `wintersmith build` and the site will be generated.

Also give the old `--help` a look.

## Config

Configuration can be done with command-line options, a config file or both. The config file will be looked for as `config.json` in the root of your site. (you can set a custom path using `--config`)

### Options

 * output
	* output directory, this is where the generated site is output
	* default: `./build`
 * articles
	* article directory, where to look for markdown files
    * default: `./articles`
 * templates
    * template directory, where to look for Jade templates
    * default: `./templates`
 * static
    * static file directory, all static content for your site (css, images, etc)
    * default: `./static`
 * locals
    * javascript object to pass to all templates when rendering, useful for storing metadata for your site. can also be a path to a json file
    * default: `{}`
 * rebuild
	* if set all articles will be rebuilt
	* default: `false`
 * clean
	* if set output directory will emptied before build starts
	* default: `false`

All paths can either be relative or absolute. Relative paths will be resolved from the current directory or `--chdir` if set.

## Articles

An article is a markdown file combined with metadata on top

example:
```markdown
title: My first post
date: 2012-12-12 12:12
author: <NAME> <<EMAIL>>

# Hello friends!

Life is wonderful, isn't it?

```

### Article types

There are two article formats, either a markdown file in the root of your articles directory or a directory with a markdown index file.

If you use a directory all other contents in the it are copied when building, this allows you to easily add images, scripts etc specific to the article.

File extensions can be either `.md` or `.markdown`

### Links

All relative links used will be resolved correctly when rendering. This means you can just place *image.png* in your article directory and simply include it in your markdown as `![my image](image.png)`

This is especially convenient when using a markdown editor (read [Mou](http://mouapp.com/) if you're on a mac).

### Metadata

Metadata can be any `key: value` pair you want. And will be accessible in the article template as `article.metadata`.<commit_msg>Fix readme <commit_after># Wintersmith

A flexible static site generator.

## Features

 * Easy to use
 * Generated sites can be hosted anywhere (output is plain html)
 * Write articles/pages using markdown
 * Robust templating using [Jade](https://github.com/visionmedia/jade)
 * Preview server (no need to rebuild every time you make a change)
 * Highly configurable
 * FAST!

## Get going

Simple steps to getting started:

	[sudo] npm install wintersmith -g
	wintersmith new ~/my-site
	cd ~/my-site
	wintersmith preview

Now point your browser to `http://localhost:8080` and start editing templates and adding articles. When you are done run `wintersmith build` and the site will be generated.

Also give the old `--help` a look.

## Config

Configuration can be done with command-line options, a config file or both. The config file will be looked for as `config.json` in the root of your site. (you can set a custom path using `--config`)

### Options

 * output
	* output directory, this is where the generated site is output
	* default: `./build`
 * articles
	* article directory, where to look for markdown files
    * default: `./articles`
 * templates
    * template directory, where to look for Jade templates
    * default: `./templates`
 * static
    * static file directory, all static content for your site (css, images, etc)
    * default: `./static`
 * locals
    * javascript object to pass to all templates when rendering, useful for storing metadata for your site. can also be a path to a json file
    * default: `{}`
 * rebuild
	* if set all articles will be rebuilt
	* default: `false`
 * clean
	* if set output directory will emptied before build starts
	* default: `false`

All paths can either be relative or absolute. Relative paths will be resolved from the current directory or `--chdir` if set.

## Articles

An article is a markdown file combined with metadata on top

example:

```markdown
title: My first post
date: 2012-12-12 12:12
author: <NAME> <<EMAIL>>

# Hello friends!

Life is wonderful, isn't it?

```

### Article types

There are two article formats, either a markdown file in the root of your articles directory or a directory with a markdown index file.

If you use a directory all other contents in the it are copied when building, this allows you to easily add images, scripts etc specific to the article.

File extensions can be either `.md` or `.markdown`

### Links

All relative links used will be resolved correctly when rendering. This means you can just place *image.png* in your article directory and simply include it in your markdown as `![my image](image.png)`

This is especially convenient when using a markdown editor (read [Mou](http://mouapp.com/) if you're on a mac).

### Metadata

Metadata can be any `key: value` pair you want. And will be accessible in the article template as `article.metadata`.
{'fraction_non_alphanumeric': 0.07744636316064887, 'fraction_numerical': 0.005581719867434153, 'mean_word_length': 3.859322033898305, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2784993', 'n_tokens_mistral': 1604, 'n_tokens_neox': 1525, 'n_words': 829}