Skip to content
Permalink
Browse files

Merge branch 'feature/refactor-jade-to-pug' of https://github.com/yus…

…ufhm/wintersmith

# Conflicts:
#	package-lock.json
#	package.json
  • Loading branch information...
jnordberg committed Nov 19, 2018
2 parents 204f4ba + be4a0a5 commit 16a9b4d8dc49bb0f837f103b16050d1e8921d1b1
@@ -2,7 +2,7 @@

Wintersmith is a simple yet flexible static site generator. It takes contents (markdown, less, scripts, etc), transforms them using plugins and outputs a static website (html, css, images, etc) that you can host anywhere.

It ships with plugins for [markdown](http://daringfireball.net/projects/markdown/) and [jade templates](https://github.com/visionmedia/jade), if you need something else check the [plugin listing][plugin-listing] or [write your own][plugin-guide]!
It ships with plugins for [markdown](http://daringfireball.net/projects/markdown/) and [pug templates](https://github.com/pugjs/pug), if you need something else check the [plugin listing][plugin-listing] or [write your own][plugin-guide]!

## Resources

@@ -79,7 +79,7 @@ Wintersmith comes with a default Page plugin that renders markdown content using

This brings us to the second component, the template directory. All templates found in this directory are loaded and are also passed to the content plugins when rendering.

By default only `.jade` templates are loaded, but you can easily add template plugins to use a template engine of your choosing.
By default only `.pug` templates are loaded, but you can easily add template plugins to use a template engine of your choosing.

Check the `examples/` directory for some inspiration on how you can use wintersmith or the [showcase](https://github.com/jnordberg/wintersmith/wiki/Showcase) to see what others are doing.

@@ -148,7 +148,7 @@ A MarkdownPage is either a markdown file with metadata on top or a json file loc
title: My first post
date: 2012-12-12 12:12
author: John Hjort <foo@bar.com>
template: article.jade
template: article.pug
----

# Hello friends!
@@ -161,7 +161,7 @@ or use json to simply pass metadata to a template:

```json
{
"template": "template.jade",
"template": "template.pug",
"stuff": {
"things": 123,
"moar": [1, 2, 3]
@@ -1,6 +1,6 @@
---
title: Wintersmith
template: index.jade
template: index.pug
---


File renamed without changes.
@@ -13,7 +13,7 @@
"_": "underscore",
"typogr": "typogr"
},
"jade": {
"pug": {
"pretty": true
},
"markdown": {
@@ -1,3 +1,3 @@
{
"template": "archive.jade"
"template": "archive.pug"
}
@@ -2,7 +2,7 @@
title: Code and stuff!
author: the-wintersmith
date: 2012-10-01 15:00
template: article.jade
template: article.pug
---

Syntax highlighting with [highlight.js](http://softwaremaniacs.org/soft/highlight/en/).
@@ -2,7 +2,7 @@
title: "Taketori Monogatari"
author: Princess Kaguya
date: 2012-02-01
template: article.jade
template: article.pug
---

Long, long ago, there lived an old bamboo wood-cutter.
@@ -2,7 +2,7 @@
title: README
author: the-wintersmith
date: 2013-04-30
template: article.jade
template: article.pug
---

Welcome to your new blog! This is the default blog template with RSS, pagination and an archive. There are other templates available -- run `wintersmith new --help` to list them.
@@ -29,7 +29,7 @@ Good, now, the directory structure of your blog is as follows:
│   │   └── red-herring
│   │   ├── banana.png
│   │   └── index.md
│   ├── authors <- author metadata, check author.jade
│   ├── authors <- author metadata, check author.pug
│   │   ├── baker.json
│   │   └── the-wintersmith.json
│   ├── css
@@ -38,12 +38,12 @@ Good, now, the directory structure of your blog is as follows:
├── plugins
│   └── paginator.coffee <- paginator plugin
├── templates
│   ├── archive.jade
│   ├── article.jade
│   ├── author.jade
│   ├── feed.jade
│   ├── index.jade
│   └── layout.jade
│   ├── archive.pug
│   ├── article.pug
│   ├── author.pug
│   ├── feed.pug
│   ├── index.pug
│   └── layout.pug
└── views
└── articles.coffee <- view that lists articles
```
@@ -2,7 +2,7 @@
title: Markdown syntax
author: John Gruber
date: 2012-02-02
template: article.jade
template: article.pug
---

Full markdown syntax taken from John Gruber's [Daring Fireball](http://daringfireball.net/projects/markdown/syntax).
@@ -2,7 +2,7 @@
title: A red herring
author: baker
date: 2013-04-01
template: article.jade
template: article.pug
---

A long time ago, when the world was young -- someone put some food on their tongue.
@@ -1,4 +1,4 @@
{
"template": "feed.jade",
"template": "feed.pug",
"filename": "feed.xml"
}
@@ -4,7 +4,7 @@ module.exports = (env, callback) ->
e.g. "paginator": {"perPage": 10} ###

defaults =
template: 'index.jade' # template that renders pages
template: 'index.pug' # template that renders pages
articles: 'articles' # directory containing contents to paginate
first: 'index.html' # filename/url for first page
filename: 'page/%d/index.html' # filename for rest of pages
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 16a9b4d

Please sign in to comment.
You can’t perform that action at this time.