Skip to content

Commit

Permalink
Merge pull request #182 from ansballard/switch-to-layouts
Browse files Browse the repository at this point in the history
Switched references from `metalsmith-templates` to `metalsmith-layouts`
  • Loading branch information
Ajedi32 committed Jan 10, 2016
2 parents dac3396 + 0753a47 commit 9a299f9
Show file tree
Hide file tree
Showing 31 changed files with 55 additions and 55 deletions.
8 changes: 4 additions & 4 deletions Readme.md
Expand Up @@ -14,7 +14,7 @@ In Metalsmith, all of the logic is handled by plugins. You simply chain them tog
```js
Metalsmith(__dirname)
.use(markdown())
.use(templates('handlebars'))
.use(layouts('handlebars'))
.build(function(err) {
if (err) throw err;
});
Expand All @@ -27,7 +27,7 @@ Metalsmith(__dirname)
.use(drafts())
.use(markdown())
.use(permalinks('posts/:title'))
.use(templates('handlebars'))
.use(layouts('handlebars'))
.build(function(err) {
if (err) throw err;
});
Expand Down Expand Up @@ -113,7 +113,7 @@ In addition to a simple [Javascript API](#api), the Metalsmith CLI can read conf
"metalsmith-drafts": true,
"metalsmith-markdown": true,
"metalsmith-permalinks": "posts/:title",
"metalsmith-templates": "handlebars"
"metalsmith-layouts": "handlebars"
}
}
```
Expand Down Expand Up @@ -200,7 +200,7 @@ Get the global metadata. This is useful for plugins that want to set global-leve

#### #path(paths...)

Resolve any amount of `paths...` relative to the working directory. This is useful for plugins who want to read extra assets from another directory, for example `./templates`.
Resolve any amount of `paths...` relative to the working directory. This is useful for plugins who want to read extra assets from another directory, for example `./layouts`.

#### #run(files, fn)

Expand Down
4 changes: 2 additions & 2 deletions examples/jekyll/_posts/2012-08-20-first-post.md
@@ -1,7 +1,7 @@
---
title: First Post
date: 2012-08-20
template: post.html
layout: post.html
---

An interesting post about how it's going to be different this time around. I'm going write a lot more nowadays and use this blog to improve my writing.
An interesting post about how it's going to be different this time around. I'm going write a lot more nowadays and use this blog to improve my writing.
4 changes: 2 additions & 2 deletions examples/jekyll/_posts/2012-08-23-second-post.md
@@ -1,7 +1,7 @@
---
title: Second Post
date: 2012-08-23
template: post.html
layout: post.html
---

A super-interesting piece of prose I had already written weeks ago.
A super-interesting piece of prose I had already written weeks ago.
4 changes: 2 additions & 2 deletions examples/jekyll/_posts/2012-09-28-third-post.md
@@ -1,7 +1,7 @@
---
title: Third Post
date: 2012-09-28
template: post.html
layout: post.html
---

A slightly late, less interesting piece of prose.
A slightly late, less interesting piece of prose.
4 changes: 2 additions & 2 deletions examples/jekyll/_posts/2012-12-07-fourth-post.md
@@ -1,7 +1,7 @@
---
title: Fourth Post
date: 2012-12-07
template: post.html
layout: post.html
---

A really short, rushed-feeling string of words.
A really short, rushed-feeling string of words.
4 changes: 2 additions & 2 deletions examples/jekyll/metalsmith.json
Expand Up @@ -11,9 +11,9 @@
"metalsmith-permalinks": {
"pattern": ":title"
},
"metalsmith-templates": {
"metalsmith-layouts": {
"engine": "swig",
"directory": "_layouts"
}
}
}
}
6 changes: 3 additions & 3 deletions examples/jekyll/package.json
Expand Up @@ -2,12 +2,12 @@
"name": "jekyll-example",
"private": true,
"dependencies": {
"metalsmith": "^1.0.0",
"metalsmith-drafts": "0.0.1",
"metalsmith-templates": "^0.6.1",
"metalsmith-layouts": "^1.4.1",
"metalsmith-markdown": "^0.2.1",
"metalsmith-permalinks": "^0.1.0",
"swig": "^1.3.2",
"metalsmith": "^1.0.0"
"swig": "^1.3.2"
},
"scripts": {
"build": "metalsmith"
Expand Down
2 changes: 1 addition & 1 deletion examples/static-site/build/my-first-post/index.html
Expand Up @@ -4,7 +4,7 @@
</head>
<body>
<h1>My First Post</h1>
<time>Sun Aug 19 2012 17:00:00 GMT-0700 (PDT)</time>
<time>Sun Aug 19 2012 19:00:00 GMT-0500 (Central Daylight Time)</time>
<p>An interesting post about how it&#39;s going to be different this time around. I&#39;m going write a lot more nowadays and use this blog to improve my writing.</p>

</body>
Expand Down
2 changes: 1 addition & 1 deletion examples/static-site/build/my-fourth-post/index.html
Expand Up @@ -4,7 +4,7 @@
</head>
<body>
<h1>My Fourth Post</h1>
<time>Thu Dec 06 2012 16:00:00 GMT-0800 (PST)</time>
<time>Thu Dec 06 2012 18:00:00 GMT-0600 (Central Standard Time)</time>
<p>A really short, rushed-feeling string of words.</p>

</body>
Expand Down
2 changes: 1 addition & 1 deletion examples/static-site/build/my-second-post/index.html
Expand Up @@ -4,7 +4,7 @@
</head>
<body>
<h1>My Second Post</h1>
<time>Wed Aug 22 2012 17:00:00 GMT-0700 (PDT)</time>
<time>Wed Aug 22 2012 19:00:00 GMT-0500 (Central Daylight Time)</time>
<p>A super-interesting piece of prose I had already written weeks ago.</p>

</body>
Expand Down
2 changes: 1 addition & 1 deletion examples/static-site/build/my-third-post/index.html
Expand Up @@ -4,7 +4,7 @@
</head>
<body>
<h1>My Third Post</h1>
<time>Thu Sep 27 2012 17:00:00 GMT-0700 (PDT)</time>
<time>Thu Sep 27 2012 19:00:00 GMT-0500 (Central Daylight Time)</time>
<p>A slightly late, less interesting piece of prose.</p>

</body>
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/static-site/metalsmith.json
Expand Up @@ -8,8 +8,8 @@
"metalsmith-permalinks": {
"pattern": ":title"
},
"metalsmith-templates": {
"metalsmith-layouts": {
"engine": "handlebars"
}
}
}
}
8 changes: 4 additions & 4 deletions examples/static-site/package.json
Expand Up @@ -2,10 +2,10 @@
"name": "static-site-example",
"private": true,
"dependencies": {
"metalsmith-templates": "^0.6.1",
"metalsmith-markdown": "^0.2.1",
"metalsmith-permalinks": "^0.1.1",
"handlebars": "^2.0.0-alpha.2",
"metalsmith": "^1.0.0",
"handlebars": "^2.0.0-alpha.2"
"metalsmith-layouts": "^1.4.1",
"metalsmith-markdown": "^0.2.1",
"metalsmith-permalinks": "^0.1.1"
}
}
4 changes: 2 additions & 2 deletions examples/static-site/src/first-post.md
@@ -1,7 +1,7 @@
---
title: My First Post
date: 2012-08-20
template: post.html
layout: post.html
---

An interesting post about how it's going to be different this time around. I'm going write a lot more nowadays and use this blog to improve my writing.
An interesting post about how it's going to be different this time around. I'm going write a lot more nowadays and use this blog to improve my writing.
4 changes: 2 additions & 2 deletions examples/static-site/src/fourth-post.md
@@ -1,7 +1,7 @@
---
title: My Fourth Post
date: 2012-12-07
template: post.html
layout: post.html
---

A really short, rushed-feeling string of words.
A really short, rushed-feeling string of words.
4 changes: 2 additions & 2 deletions examples/static-site/src/index.md
@@ -1,3 +1,3 @@
---
template: index.html
---
layout: index.html
---
4 changes: 2 additions & 2 deletions examples/static-site/src/second-post.md
@@ -1,7 +1,7 @@
---
title: My Second Post
date: 2012-08-23
template: post.html
layout: post.html
---

A super-interesting piece of prose I had already written weeks ago.
A super-interesting piece of prose I had already written weeks ago.
4 changes: 2 additions & 2 deletions examples/static-site/src/third-post.md
@@ -1,7 +1,7 @@
---
title: My Third Post
date: 2012-09-28
template: post.html
layout: post.html
---

A slightly late, less interesting piece of prose.
A slightly late, less interesting piece of prose.
2 changes: 1 addition & 1 deletion examples/wintersmith/build/my-first-post/index.html
@@ -1,2 +1,2 @@
<!DOCTYPE html><html><head><title>My Blog</title></head><body><h1>My First Post</h1><time>Sun Aug 19 2012 17:00:00 GMT-0700 (PDT)</time><div><p>An interesting post about how it&#39;s going to be different this time around. I&#39;m going write a lot more nowadays and use this blog to improve my writing.</p>
<!DOCTYPE html><html><head><title>My Blog</title></head><body><h1>My First Post</h1><time>Sun Aug 19 2012 19:00:00 GMT-0500 (Central Daylight Time)</time><div><p>An interesting post about how it&#39;s going to be different this time around. I&#39;m going write a lot more nowadays and use this blog to improve my writing.</p>
</div></body></html>
2 changes: 1 addition & 1 deletion examples/wintersmith/build/my-fourth-post/index.html
@@ -1,2 +1,2 @@
<!DOCTYPE html><html><head><title>My Blog</title></head><body><h1>My Fourth Post</h1><time>Thu Dec 06 2012 16:00:00 GMT-0800 (PST)</time><div><p>A really short, rushed-feeling string of words.</p>
<!DOCTYPE html><html><head><title>My Blog</title></head><body><h1>My Fourth Post</h1><time>Thu Dec 06 2012 18:00:00 GMT-0600 (Central Standard Time)</time><div><p>A really short, rushed-feeling string of words.</p>
</div></body></html>
2 changes: 1 addition & 1 deletion examples/wintersmith/build/my-second-post/index.html
@@ -1,2 +1,2 @@
<!DOCTYPE html><html><head><title>My Blog</title></head><body><h1>My Second Post</h1><time>Wed Aug 22 2012 17:00:00 GMT-0700 (PDT)</time><div><p>A super-interesting piece of prose I had already written weeks ago.</p>
<!DOCTYPE html><html><head><title>My Blog</title></head><body><h1>My Second Post</h1><time>Wed Aug 22 2012 19:00:00 GMT-0500 (Central Daylight Time)</time><div><p>A super-interesting piece of prose I had already written weeks ago.</p>
</div></body></html>
2 changes: 1 addition & 1 deletion examples/wintersmith/build/my-third-post/index.html
@@ -1,2 +1,2 @@
<!DOCTYPE html><html><head><title>My Blog</title></head><body><h1>My Third Post</h1><time>Thu Sep 27 2012 17:00:00 GMT-0700 (PDT)</time><div><p>A slightly late, less interesting piece of prose.</p>
<!DOCTYPE html><html><head><title>My Blog</title></head><body><h1>My Third Post</h1><time>Thu Sep 27 2012 19:00:00 GMT-0500 (Central Daylight Time)</time><div><p>A slightly late, less interesting piece of prose.</p>
</div></body></html>
4 changes: 2 additions & 2 deletions examples/wintersmith/contents/first-post.md
@@ -1,7 +1,7 @@
---
title: My First Post
date: 2012-08-20
template: post.jade
layout: post.jade
---

An interesting post about how it's going to be different this time around. I'm going write a lot more nowadays and use this blog to improve my writing.
An interesting post about how it's going to be different this time around. I'm going write a lot more nowadays and use this blog to improve my writing.
4 changes: 2 additions & 2 deletions examples/wintersmith/contents/fourth-post.md
@@ -1,7 +1,7 @@
---
title: My Fourth Post
date: 2012-12-07
template: post.jade
layout: post.jade
---

A really short, rushed-feeling string of words.
A really short, rushed-feeling string of words.
4 changes: 2 additions & 2 deletions examples/wintersmith/contents/index.md
@@ -1,3 +1,3 @@
---
template: index.jade
---
layout: index.jade
---
4 changes: 2 additions & 2 deletions examples/wintersmith/contents/second-post.md
@@ -1,7 +1,7 @@
---
title: My Second Post
date: 2012-08-23
template: post.jade
layout: post.jade
---

A super-interesting piece of prose I had already written weeks ago.
A super-interesting piece of prose I had already written weeks ago.
4 changes: 2 additions & 2 deletions examples/wintersmith/contents/third-post.md
@@ -1,7 +1,7 @@
---
title: My Third Post
date: 2012-09-28
template: post.jade
layout: post.jade
---

A slightly late, less interesting piece of prose.
A slightly late, less interesting piece of prose.
4 changes: 2 additions & 2 deletions examples/wintersmith/metalsmith.json
Expand Up @@ -9,9 +9,9 @@
"metalsmith-permalinks": {
"pattern": ":title"
},
"metalsmith-templates": {
"metalsmith-layouts": {
"engine": "jade",
"directory": "./templates"
}
}
}
}
4 changes: 2 additions & 2 deletions examples/wintersmith/package.json
Expand Up @@ -4,8 +4,8 @@
"dependencies": {
"jade": "^1.3.0",
"metalsmith": "^1.0.0",
"metalsmith-layouts": "^1.4.1",
"metalsmith-markdown": "^0.2.1",
"metalsmith-permalinks": "^0.1.0",
"metalsmith-templates": "^0.6.1"
"metalsmith-permalinks": "^0.1.0"
}
}

0 comments on commit 9a299f9

Please sign in to comment.