Browse files

0.4.4

* nested layouts
* pages arrays. pages can be formatted as objects or elements in the array.
  • Loading branch information...
1 parent d731b73 commit dfd5b89a9eb6db0e2256ddfa28b932c446806b15 @jonschlinkert jonschlinkert committed Aug 7, 2013
View
1 .travis.yml
@@ -3,4 +3,3 @@ node_js:
- "0.8"
before_script:
- npm install -g grunt-cli
- - npm install grunt
View
40 Gruntfile.js
@@ -13,6 +13,7 @@ module.exports = function(grunt) {
// package.json
pkg: grunt.file.readJSON('package.json'),
+ blog: grunt.file.readJSON('test/data/blog.json'),
// Metadata
meta: {
@@ -39,6 +40,11 @@ module.exports = function(grunt) {
]
},
+ // Example data for "pages_array" and "pages_object" targets
+ component: {
+ one: "alert"
+ },
+
// Included for running basic tests.
assemble: {
options: {
@@ -142,10 +148,10 @@ module.exports = function(grunt) {
pages_array: {
options: {
engine: 'handlebars',
- layout: "post.hbs",
+ layout: 'post.hbs',
site: {
- title: "A Blog",
- author: "Jon Schlinkert"
+ title: 'A Blog',
+ author: 'Jon Schlinkert'
},
pages: [
{
@@ -189,10 +195,10 @@ module.exports = function(grunt) {
pages: {
'sweet-blog-post-1': {
data: {
- title: "Sweet Blog Post #1",
+ title: 'Sweet Blog Post #1',
gists: ['5898072']
},
- content: 'This "content" property is optional and would get passed into the `body` tag. But if you only need to pass the page\'s metadata to the layout then the content property is unnecessary.'
+ content: 'This "content" property is optional and would get passed into the "body" tag. But if you only need to pass the page\'s metadata to the layout then the content property is unnecessary.'
},
'awesome-blog-post-2': {
data: {
@@ -224,12 +230,7 @@ module.exports = function(grunt) {
}
}
},
- // Example config for metadata
- component: {
- one: "alert"
- },
- // Run mocha tests.
mochaTest: {
files: ['test/**/*.js']
},
@@ -239,8 +240,8 @@ module.exports = function(grunt) {
}
},
- // Before assembling new files, removed previously
- // created files.
+ // Before generating new files,
+ // remove files from previous build.
clean: {
tests: ['test/actual/**/*.{html,md}']
}
@@ -252,17 +253,18 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha-test');
- // Load local tasks.
+ // Load the 'assemble' plugin.
grunt.loadTasks('tasks');
- // Default task.
- grunt.registerTask('default', ['jshint', 'clean', 'assemble']);
-
+ // Test nested layouts seperately.
grunt.registerTask('nested', ['assemble:nested_layouts']);
- //grunt.registerTask('debug', ['clean', 'assemble']);
-
// Tests to be run.
- grunt.registerTask('test', ['default', 'mochaTest']);
+ grunt.registerTask('test', ['jshint', 'default', 'mochaTest']);
+
+ // Generate readme.
grunt.registerTask('docs', ['assemble-internal']);
+
+ // Default task.
+ grunt.registerTask('default', ['clean', 'assemble']);
};
View
4 README.md
@@ -4,8 +4,6 @@
### [See the live docs →](http://assemble.io)
-
-
## Getting Started
This plugin requires Grunt `~0.4.1`
@@ -189,4 +187,4 @@ Visit [Assemble's documentation](http://assemble.io) for many more examples and
Project authored by [Jon Schlinkert](https://github.com/jonschlinkert/).
-_This file was generated on Thu Aug 01 2013 01:48:53._
+_This file was generated on Wed Aug 07 2013 23:40:11._
View
2 bower.json
@@ -1,6 +1,6 @@
{
"name": "assemble",
- "version": "0.4.2",
+ "version": "0.4.4",
"repo": "assemble/assemble",
"main": [
"./lib/assemble.js"
View
2 package.json
@@ -1,7 +1,7 @@
{
"name": "assemble",
"description": "Visit http://assemble.io. Assemble is a full-featured documentation, site and component generator built on Grunt.js.",
- "version": "0.4.3",
+ "version": "0.4.4",
"homepage": "https://github.com/assemble/assemble",
"author": {
"name": "assemble",
View
2 test/actual/blog/post2.html
@@ -13,7 +13,7 @@
<script src="https://gist.github.com/5898078.js"></script>
<h1>Blog Post #2 | A Blog</h1>
- <div class="alert"><strong>ALERT!</strong> This is an alert message. <%= pkg.version %></div> The current version of Assemble is v0.4.3.
+ <div class="alert"><strong>ALERT!</strong> This is an alert message. <%= pkg.version %></div> The current version of Assemble is v0.4.4.
<script src="http://libs.github.io/bootstrap/css/bootstrap.min.js"></script>
</body>
</html>
View
2 test/actual/custom-helpers.html
@@ -22,7 +22,7 @@
<body>
<h3>Example using the foo helper</h3>
<!-- Below is an example of using the opt helper and getting the version property from the passed-in assemble.options -->
- <div>Version: 0.4.3</div>
+ <div>Version: 0.4.4</div>
</body>
</html>
View
64 test/actual/multi/dest1/helpers.html
@@ -35,16 +35,16 @@
<h2>css helper</h2>
Example of using a custom "css" helper.
-<link rel="stylesheet" href="../../../assets/css/css/bootstrap.css?v=1375341911817">
-<link rel="stylesheet" href="../../../assets/css/css/responsive.css?v=1375341911817">
-<link rel="stylesheet" href="../../../assets/css/css/main.css?v=1375341911817">
+<link rel="stylesheet" href="../../../assets/css/css/bootstrap.css?v=1375933348726">
+<link rel="stylesheet" href="../../../assets/css/css/responsive.css?v=1375933348726">
+<link rel="stylesheet" href="../../../assets/css/css/main.css?v=1375933348726">
<h2>js helper</h2>
Example of using a custom "js" helper.
-<script src="../../../assets/js/js/bootstrap.js?v=1375341911817"></script>
-<script src="../../../assets/js/js/responsive.js?v=1375341911817"></script>
-<script src="../../../assets/js/js/main.js?v=1375341911817"></script>
+<script src="../../../assets/js/js/bootstrap.js?v=1375933348726"></script>
+<script src="../../../assets/js/js/responsive.js?v=1375933348726"></script>
+<script src="../../../assets/js/js/main.js?v=1375933348726"></script>
<h2>custom variables</h2>
@@ -65,12 +65,15 @@
<li><a href="complex.html">complex</a></li>
<li><a href="context.html">context</a></li>
<li><a href="debug-helpers.html">debug-helpers</a></li>
+ <li><a href="deep-nested-layouts.html">deep-nested-layouts</a></li>
<li><a href="example.html">example</a></li>
<li><a href="gist-helper.html">gist-helper</a></li>
<li><a href="helpers.html">helpers</a></li>
<li><a href="home.html">home</a></li>
<li><a href="html-helpers.html">html-helpers</a></li>
<li><a href="md-helper.html">md-helper</a></li>
+ <li><a href="nested-layouts.html">nested-layouts</a></li>
+ <li><a href="no-layout-none.html">no-layout-none</a></li>
<li><a href="no-layout.html">no-layout</a></li>
<li><a href="page.html">page</a></li>
<li><a href="simple3.html">simple3</a></li>
@@ -86,12 +89,15 @@
<li><a href="../dest2/sub-dest/complex.html">complex</a></li>
<li><a href="../dest2/sub-dest/context.html">context</a></li>
<li><a href="../dest2/sub-dest/debug-helpers.html">debug-helpers</a></li>
+ <li><a href="../dest2/sub-dest/deep-nested-layouts.html">deep-nested-layouts</a></li>
<li><a href="../dest2/sub-dest/example.html">example</a></li>
<li><a href="../dest2/sub-dest/gist-helper.html">gist-helper</a></li>
<li><a href="../dest2/sub-dest/helpers.html">helpers</a></li>
<li><a href="../dest2/sub-dest/home.html">home</a></li>
<li><a href="../dest2/sub-dest/html-helpers.html">html-helpers</a></li>
<li><a href="../dest2/sub-dest/md-helper.html">md-helper</a></li>
+ <li><a href="../dest2/sub-dest/nested-layouts.html">nested-layouts</a></li>
+ <li><a href="../dest2/sub-dest/no-layout-none.html">no-layout-none</a></li>
<li><a href="../dest2/sub-dest/no-layout.html">no-layout</a></li>
<li><a href="../dest2/sub-dest/page.html">page</a></li>
<li><a href="../dest2/sub-dest/simple3.html">simple3</a></li>
@@ -103,26 +109,35 @@
<h2>Debug Info</h2>
<pre class="json">
[ 'test/helpers/helper-*.js',
+ script: 'document.write(\'foo bar!\');',
+ src: 'test/templates/pages/helpers.hbs',
+ ext: '.html',
+ title: 'Helpers and custom variables',
+ extname: '.html',
[length]: 1,
- _page: 'all',
- dest: 'test/actual/multi/dest1/helpers.html',
- styles: '<link rel="stylesheet" href="css/index.css"/>',
- javascripts: [ 'js/bootstrap.js',
- 'js/responsive.js',
- 'js/main.js',
- [length]: 3 ],
+ basename: 'helpers',
+ pagename: 'helpers.html',
+ dirname: 'test/actual/multi/dest1',
+ page: { [Function]
+ [length]: 2,
+ [name]: '',
+ [arguments]: null,
+ [caller]: null,
+ [prototype]: { [constructor]: [Circular] } },
filename: 'helpers.html',
- assets: '../../assets',
- ext: '.html',
+ description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n',
+ dest: 'test/actual/multi/dest1/helpers.html',
stylesheets: [ 'css/bootstrap.css',
'css/responsive.css',
'css/main.css',
[length]: 3 ],
+ javascripts: [ 'js/bootstrap.js',
+ 'js/responsive.js',
+ 'js/main.js',
+ [length]: 3 ],
pageName: 'helpers.html',
- dirname: 'test/actual/multi/dest1',
- basename: 'helpers',
- src: 'test/templates/pages/helpers.hbs',
- extname: '.html',
+ styles: '<link rel="stylesheet" href="css/index.css"/>',
+ assets: '../../assets',
data: { title: 'Helpers and custom variables',
description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n',
stylesheets:
@@ -137,16 +152,7 @@
[length]: 3 ],
styles: '<link rel="stylesheet" href="css/index.css"/>',
script: 'document.write(\'foo bar!\');' },
- title: 'Helpers and custom variables',
- pagename: 'helpers.html',
- script: 'document.write(\'foo bar!\');',
- page: { [Function]
- [length]: 2,
- [name]: '',
- [arguments]: null,
- [caller]: null,
- [prototype]: { [constructor]: [Circular] } },
- description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n' ]
+ _page: 'all' ]
</pre>
</div>
View
160 test/actual/multi/dest1/helpers.md
@@ -11,16 +11,16 @@
<h2>css helper</h2>
Example of using a custom "css" helper.
-<link rel="stylesheet" href="../../assets/css/css/bootstrap.css?v=1375341911370">
-<link rel="stylesheet" href="../../assets/css/css/responsive.css?v=1375341911370">
-<link rel="stylesheet" href="../../assets/css/css/main.css?v=1375341911370">
+<link rel="stylesheet" href="../../assets/css/css/bootstrap.css?v=1375933348218">
+<link rel="stylesheet" href="../../assets/css/css/responsive.css?v=1375933348218">
+<link rel="stylesheet" href="../../assets/css/css/main.css?v=1375933348218">
<h2>js helper</h2>
Example of using a custom "js" helper.
-<script src="../../assets/js/js/bootstrap.js?v=1375341911370"></script>
-<script src="../../assets/js/js/responsive.js?v=1375341911370"></script>
-<script src="../../assets/js/js/main.js?v=1375341911370"></script>
+<script src="../../assets/js/js/bootstrap.js?v=1375933348218"></script>
+<script src="../../assets/js/js/responsive.js?v=1375933348218"></script>
+<script src="../../assets/js/js/main.js?v=1375933348218"></script>
<h2>custom variables</h2>
@@ -32,26 +32,35 @@ Example of using a custom "js" helper.
## Debug Info
``` json
[ 'test/helpers/helper-*.js',
+ script: 'document.write(\'foo bar!\');',
+ src: 'test/templates/pages/helpers.hbs',
+ ext: '.md',
+ title: 'Helpers and custom variables',
+ extname: '.md',
[length]: 1,
- _page: 'all',
- dest: 'test/actual/multi/dest1/helpers.md',
- styles: '<link rel="stylesheet" href="css/index.css"/>',
- javascripts: [ 'js/bootstrap.js',
- 'js/responsive.js',
- 'js/main.js',
- [length]: 3 ],
+ basename: 'helpers',
+ pagename: 'helpers.md',
+ dirname: 'test/actual/multi/dest1',
+ page: { [Function]
+ [length]: 2,
+ [name]: '',
+ [arguments]: null,
+ [caller]: null,
+ [prototype]: { [constructor]: [Circular] } },
filename: 'helpers.md',
- assets: '../../assets',
- ext: '.md',
+ description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n',
+ dest: 'test/actual/multi/dest1/helpers.md',
stylesheets: [ 'css/bootstrap.css',
'css/responsive.css',
'css/main.css',
[length]: 3 ],
+ javascripts: [ 'js/bootstrap.js',
+ 'js/responsive.js',
+ 'js/main.js',
+ [length]: 3 ],
pageName: 'helpers.md',
- dirname: 'test/actual/multi/dest1',
- basename: 'helpers',
- src: 'test/templates/pages/helpers.hbs',
- extname: '.md',
+ styles: '<link rel="stylesheet" href="css/index.css"/>',
+ assets: '../../assets',
data: { title: 'Helpers and custom variables',
description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n',
stylesheets:
@@ -66,16 +75,7 @@ Example of using a custom "js" helper.
[length]: 3 ],
styles: '<link rel="stylesheet" href="css/index.css"/>',
script: 'document.write(\'foo bar!\');' },
- title: 'Helpers and custom variables',
- pagename: 'helpers.md',
- script: 'document.write(\'foo bar!\');',
- page: { [Function]
- [length]: 2,
- [name]: '',
- [arguments]: null,
- [caller]: null,
- [prototype]: { [constructor]: [Circular] } },
- description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n' ]
+ _page: 'all' ]
```
@@ -89,12 +89,15 @@ Example of using a custom "js" helper.
[complex](complex.md)
[context](context.md)
[debug-helpers](debug-helpers.md)
+[deep-nested-layouts](deep-nested-layouts.md)
[assets](assets.md)
[gist-helper](gist-helper.md)
[helpers](helpers.md)
[home](home.md)
[html-helpers](html-helpers.md)
[md-helper](md-helper.md)
+[nested-layouts](nested-layouts.md)
+[no-layout-none](no-layout-none.md)
[no-layout](no-layout.md)
[page](page.md)
[simple3](simple3.md)
@@ -202,6 +205,17 @@ this.basename: debug-helpers
this.extname: .md
this.ext: .md
+#### deep-nested-layouts.md
+this.assets: ../../assets
+this.dest: test/actual/multi/dest1/deep-nested-layouts.md
+this.absolute:
+this.dirname: test/actual/multi/dest1
+this.filename: deep-nested-layouts.md
+this.pagename: deep-nested-layouts.md
+this.basename: deep-nested-layouts
+this.extname: .md
+this.ext: .md
+
#### assets.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/assets.md
@@ -268,6 +282,28 @@ this.basename: md-helper
this.extname: .md
this.ext: .md
+#### nested-layouts.md
+this.assets: ../../assets
+this.dest: test/actual/multi/dest1/nested-layouts.md
+this.absolute:
+this.dirname: test/actual/multi/dest1
+this.filename: nested-layouts.md
+this.pagename: nested-layouts.md
+this.basename: nested-layouts
+this.extname: .md
+this.ext: .md
+
+#### no-layout-none.md
+this.assets: ../../assets
+this.dest: test/actual/multi/dest1/no-layout-none.md
+this.absolute:
+this.dirname: test/actual/multi/dest1
+this.filename: no-layout-none.md
+this.pagename: no-layout-none.md
+this.basename: no-layout-none
+this.extname: .md
+this.ext: .md
+
#### no-layout.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/no-layout.md
@@ -502,6 +538,39 @@ page.basename: helpers
page.extname: .md
page.ext: .md
+#### helpers.md
+page.assets: ../../assets
+page.dest: test/actual/multi/dest1/helpers.md
+page.absolute:
+page.dirname: test/actual/multi/dest1
+page.filename: helpers.md
+page.pagename: helpers.md
+page.basename: helpers
+page.extname: .md
+page.ext: .md
+
+#### helpers.md
+page.assets: ../../assets
+page.dest: test/actual/multi/dest1/helpers.md
+page.absolute:
+page.dirname: test/actual/multi/dest1
+page.filename: helpers.md
+page.pagename: helpers.md
+page.basename: helpers
+page.extname: .md
+page.ext: .md
+
+#### helpers.md
+page.assets: ../../assets
+page.dest: test/actual/multi/dest1/helpers.md
+page.absolute:
+page.dirname: test/actual/multi/dest1
+page.filename: helpers.md
+page.pagename: helpers.md
+page.basename: helpers
+page.extname: .md
+page.ext: .md
+
### {{#each pages}} "page" context
@@ -703,4 +772,37 @@ basename: helpers
extname: .md
ext: .md
+#### helpers.md
+assets: ../../assets
+dest:
+absolute: test/actual/multi/dest1/helpers.md
+dirname: test/actual/multi/dest1
+filename: helpers.md
+pagename: helpers.md
+basename: helpers
+extname: .md
+ext: .md
+
+#### helpers.md
+assets: ../../assets
+dest:
+absolute: test/actual/multi/dest1/helpers.md
+dirname: test/actual/multi/dest1
+filename: helpers.md
+pagename: helpers.md
+basename: helpers
+extname: .md
+ext: .md
+
+#### helpers.md
+assets: ../../assets
+dest:
+absolute: test/actual/multi/dest1/helpers.md
+dirname: test/actual/multi/dest1
+filename: helpers.md
+pagename: helpers.md
+basename: helpers
+extname: .md
+ext: .md
+
View
50 test/actual/multi/dest1/html-helpers.html
@@ -90,12 +90,15 @@
<li><a href="complex.html">complex</a></li>
<li><a href="context.html">context</a></li>
<li><a href="debug-helpers.html">debug-helpers</a></li>
+ <li><a href="deep-nested-layouts.html">deep-nested-layouts</a></li>
<li><a href="example.html">example</a></li>
<li><a href="gist-helper.html">gist-helper</a></li>
<li><a href="helpers.html">helpers</a></li>
<li><a href="home.html">home</a></li>
<li><a href="html-helpers.html">html-helpers</a></li>
<li><a href="md-helper.html">md-helper</a></li>
+ <li><a href="nested-layouts.html">nested-layouts</a></li>
+ <li><a href="no-layout-none.html">no-layout-none</a></li>
<li><a href="no-layout.html">no-layout</a></li>
<li><a href="page.html">page</a></li>
<li><a href="simple3.html">simple3</a></li>
@@ -111,12 +114,15 @@
<li><a href="../dest2/sub-dest/complex.html">complex</a></li>
<li><a href="../dest2/sub-dest/context.html">context</a></li>
<li><a href="../dest2/sub-dest/debug-helpers.html">debug-helpers</a></li>
+ <li><a href="../dest2/sub-dest/deep-nested-layouts.html">deep-nested-layouts</a></li>
<li><a href="../dest2/sub-dest/example.html">example</a></li>
<li><a href="../dest2/sub-dest/gist-helper.html">gist-helper</a></li>
<li><a href="../dest2/sub-dest/helpers.html">helpers</a></li>
<li><a href="../dest2/sub-dest/home.html">home</a></li>
<li><a href="../dest2/sub-dest/html-helpers.html">html-helpers</a></li>
<li><a href="../dest2/sub-dest/md-helper.html">md-helper</a></li>
+ <li><a href="../dest2/sub-dest/nested-layouts.html">nested-layouts</a></li>
+ <li><a href="../dest2/sub-dest/no-layout-none.html">no-layout-none</a></li>
<li><a href="../dest2/sub-dest/no-layout.html">no-layout</a></li>
<li><a href="../dest2/sub-dest/page.html">page</a></li>
<li><a href="../dest2/sub-dest/simple3.html">simple3</a></li>
@@ -127,16 +133,30 @@
<div class="container" style="display: none">
<h2>Debug Info</h2>
<pre class="json">
-{ _page: 'all',
- dest: 'test/actual/multi/dest1/html-helpers.html',
+{ src: 'test/templates/pages/html-helpers.hbs',
+ ext: '.html',
+ extname: '.html',
+ basename: 'html-helpers',
+ pagename: 'html-helpers.html',
+ dirname: 'test/actual/multi/dest1',
+ page:
+ { [Function]
+ [length]: 2,
+ [name]: '',
+ [arguments]: null,
+ [caller]: null,
+ [prototype]: { [constructor]: [Circular] } },
filename: 'html-helpers.html',
+ text: 'helpers.js',
+ dest: 'test/actual/multi/dest1/html-helpers.html',
assets: '../../assets',
- ext: '.html',
pageName: 'html-helpers.html',
- dirname: 'test/actual/multi/dest1',
- basename: 'html-helpers',
- src: 'test/templates/pages/html-helpers.hbs',
- extname: '.html',
+ moreLinks:
+ [ { url: 'one', text: 'two' },
+ { url: 'three', text: 'four' },
+ { url: 'five', text: 'size' },
+ [length]: 3 ],
+ links: [ 'one', 'two', 'three', [length]: 3 ],
data:
{ text: 'helpers.js',
links: [ 'one', 'two', 'three', [length]: 3 ],
@@ -145,21 +165,7 @@
{ url: 'three', text: 'four' },
{ url: 'five', text: 'size' },
[length]: 3 ] },
- links: [ 'one', 'two', 'three', [length]: 3 ],
- pagename: 'html-helpers.html',
- text: 'helpers.js',
- moreLinks:
- [ { url: 'one', text: 'two' },
- { url: 'three', text: 'four' },
- { url: 'five', text: 'size' },
- [length]: 3 ],
- page:
- { [Function]
- [length]: 2,
- [name]: '',
- [arguments]: null,
- [caller]: null,
- [prototype]: { [constructor]: [Circular] } } }
+ _page: 'all' }
</pre>
</div>
View
64 test/actual/multi/dest2/sub-dest/helpers.html
@@ -35,16 +35,16 @@
<h2>css helper</h2>
Example of using a custom "css" helper.
-<link rel="stylesheet" href="../../../assets/css/css/bootstrap.css?v=1375341912226">
-<link rel="stylesheet" href="../../../assets/css/css/responsive.css?v=1375341912226">
-<link rel="stylesheet" href="../../../assets/css/css/main.css?v=1375341912226">
+<link rel="stylesheet" href="../../../assets/css/css/bootstrap.css?v=1375933349206">
+<link rel="stylesheet" href="../../../assets/css/css/responsive.css?v=1375933349206">
+<link rel="stylesheet" href="../../../assets/css/css/main.css?v=1375933349206">
<h2>js helper</h2>
Example of using a custom "js" helper.
-<script src="../../../assets/js/js/bootstrap.js?v=1375341912226"></script>
-<script src="../../../assets/js/js/responsive.js?v=1375341912226"></script>
-<script src="../../../assets/js/js/main.js?v=1375341912226"></script>
+<script src="../../../assets/js/js/bootstrap.js?v=1375933349206"></script>
+<script src="../../../assets/js/js/responsive.js?v=1375933349206"></script>
+<script src="../../../assets/js/js/main.js?v=1375933349206"></script>
<h2>custom variables</h2>
@@ -65,12 +65,15 @@
<li><a href="../../dest1/complex.html">complex</a></li>
<li><a href="../../dest1/context.html">context</a></li>
<li><a href="../../dest1/debug-helpers.html">debug-helpers</a></li>
+ <li><a href="../../dest1/deep-nested-layouts.html">deep-nested-layouts</a></li>
<li><a href="../../dest1/example.html">example</a></li>
<li><a href="../../dest1/gist-helper.html">gist-helper</a></li>
<li><a href="../../dest1/helpers.html">helpers</a></li>
<li><a href="../../dest1/home.html">home</a></li>
<li><a href="../../dest1/html-helpers.html">html-helpers</a></li>
<li><a href="../../dest1/md-helper.html">md-helper</a></li>
+ <li><a href="../../dest1/nested-layouts.html">nested-layouts</a></li>
+ <li><a href="../../dest1/no-layout-none.html">no-layout-none</a></li>
<li><a href="../../dest1/no-layout.html">no-layout</a></li>
<li><a href="../../dest1/page.html">page</a></li>
<li><a href="../../dest1/simple3.html">simple3</a></li>
@@ -86,12 +89,15 @@
<li><a href="complex.html">complex</a></li>
<li><a href="context.html">context</a></li>
<li><a href="debug-helpers.html">debug-helpers</a></li>
+ <li><a href="deep-nested-layouts.html">deep-nested-layouts</a></li>
<li><a href="example.html">example</a></li>
<li><a href="gist-helper.html">gist-helper</a></li>
<li><a href="helpers.html">helpers</a></li>
<li><a href="home.html">home</a></li>
<li><a href="html-helpers.html">html-helpers</a></li>
<li><a href="md-helper.html">md-helper</a></li>
+ <li><a href="nested-layouts.html">nested-layouts</a></li>
+ <li><a href="no-layout-none.html">no-layout-none</a></li>
<li><a href="no-layout.html">no-layout</a></li>
<li><a href="page.html">page</a></li>
<li><a href="simple3.html">simple3</a></li>
@@ -103,26 +109,35 @@
<h2>Debug Info</h2>
<pre class="json">
[ 'test/helpers/helper-*.js',
+ script: 'document.write(\'foo bar!\');',
+ src: 'test/templates/pages/helpers.hbs',
+ ext: '.html',
+ title: 'Helpers and custom variables',
+ extname: '.html',
[length]: 1,
- _page: 'all',
- dest: 'test/actual/multi/dest2/sub-dest/helpers.html',
- styles: '<link rel="stylesheet" href="css/index.css"/>',
- javascripts: [ 'js/bootstrap.js',
- 'js/responsive.js',
- 'js/main.js',
- [length]: 3 ],
+ basename: 'helpers',
+ pagename: 'helpers.html',
+ dirname: 'test/actual/multi/dest2/sub-dest',
+ page: { [Function]
+ [length]: 2,
+ [name]: '',
+ [arguments]: null,
+ [caller]: null,
+ [prototype]: { [constructor]: [Circular] } },
filename: 'helpers.html',
- assets: '../../../assets',
- ext: '.html',
+ description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n',
+ dest: 'test/actual/multi/dest2/sub-dest/helpers.html',
stylesheets: [ 'css/bootstrap.css',
'css/responsive.css',
'css/main.css',
[length]: 3 ],
+ javascripts: [ 'js/bootstrap.js',
+ 'js/responsive.js',
+ 'js/main.js',
+ [length]: 3 ],
pageName: 'helpers.html',
- dirname: 'test/actual/multi/dest2/sub-dest',
- basename: 'helpers',
- src: 'test/templates/pages/helpers.hbs',
- extname: '.html',
+ styles: '<link rel="stylesheet" href="css/index.css"/>',
+ assets: '../../../assets',
data: { title: 'Helpers and custom variables',
description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n',
stylesheets:
@@ -137,16 +152,7 @@
[length]: 3 ],
styles: '<link rel="stylesheet" href="css/index.css"/>',
script: 'document.write(\'foo bar!\');' },
- title: 'Helpers and custom variables',
- pagename: 'helpers.html',
- script: 'document.write(\'foo bar!\');',
- page: { [Function]
- [length]: 2,
- [name]: '',
- [arguments]: null,
- [caller]: null,
- [prototype]: { [constructor]: [Circular] } },
- description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n' ]
+ _page: 'all' ]
</pre>
</div>
View
48 test/actual/multi/dest2/sub-dest/html-helpers.html
@@ -90,12 +90,15 @@
<li><a href="../../dest1/complex.html">complex</a></li>
<li><a href="../../dest1/context.html">context</a></li>
<li><a href="../../dest1/debug-helpers.html">debug-helpers</a></li>
+ <li><a href="../../dest1/deep-nested-layouts.html">deep-nested-layouts</a></li>
<li><a href="../../dest1/example.html">example</a></li>
<li><a href="../../dest1/gist-helper.html">gist-helper</a></li>
<li><a href="../../dest1/helpers.html">helpers</a></li>
<li><a href="../../dest1/home.html">home</a></li>
<li><a href="../../dest1/html-helpers.html">html-helpers</a></li>
<li><a href="../../dest1/md-helper.html">md-helper</a></li>
+ <li><a href="../../dest1/nested-layouts.html">nested-layouts</a></li>
+ <li><a href="../../dest1/no-layout-none.html">no-layout-none</a></li>
<li><a href="../../dest1/no-layout.html">no-layout</a></li>
<li><a href="../../dest1/page.html">page</a></li>
<li><a href="../../dest1/simple3.html">simple3</a></li>
@@ -111,12 +114,15 @@
<li><a href="complex.html">complex</a></li>
<li><a href="context.html">context</a></li>
<li><a href="debug-helpers.html">debug-helpers</a></li>
+ <li><a href="deep-nested-layouts.html">deep-nested-layouts</a></li>
<li><a href="example.html">example</a></li>
<li><a href="gist-helper.html">gist-helper</a></li>
<li><a href="helpers.html">helpers</a></li>
<li><a href="home.html">home</a></li>
<li><a href="html-helpers.html">html-helpers</a></li>
<li><a href="md-helper.html">md-helper</a></li>
+ <li><a href="nested-layouts.html">nested-layouts</a></li>
+ <li><a href="no-layout-none.html">no-layout-none</a></li>
<li><a href="no-layout.html">no-layout</a></li>
<li><a href="page.html">page</a></li>
<li><a href="simple3.html">simple3</a></li>
@@ -127,39 +133,39 @@
<div class="container" style="display: none">
<h2>Debug Info</h2>
<pre class="json">
-{ _page: 'all',
- dest: 'test/actual/multi/dest2/sub-dest/html-helpers.html',
- filename: 'html-helpers.html',
- assets: '../../../assets',
- ext: '.html',
- pageName: 'html-helpers.html',
- dirname: 'test/actual/multi/dest2/sub-dest',
- basename: 'html-helpers',
- src: 'test/templates/pages/html-helpers.hbs',
- extname: '.html',
- data:
- { text: 'helpers.js',
- links: [ 'one', 'two', 'three', [length]: 3 ],
- moreLinks:
- [ { url: 'one', text: 'two' },
- { url: 'three', text: 'four' },
- { url: 'five', text: 'size' },
- [length]: 3 ] },
+{ text: 'helpers.js',
links: [ 'one', 'two', 'three', [length]: 3 ],
- pagename: 'html-helpers.html',
- text: 'helpers.js',
moreLinks:
[ { url: 'one', text: 'two' },
{ url: 'three', text: 'four' },
{ url: 'five', text: 'size' },
[length]: 3 ],
+ _page: 'all',
+ dirname: 'test/actual/multi/dest2/sub-dest',
+ filename: 'html-helpers.html',
+ pageName: 'html-helpers.html',
+ pagename: 'html-helpers.html',
+ basename: 'html-helpers',
+ src: 'test/templates/pages/html-helpers.hbs',
+ dest: 'test/actual/multi/dest2/sub-dest/html-helpers.html',
+ assets: '../../../assets',
+ ext: '.html',
+ extname: '.html',
page:
{ [Function]
[length]: 2,
[name]: '',
[arguments]: null,
[caller]: null,
- [prototype]: { [constructor]: [Circular] } } }
+ [prototype]: { [constructor]: [Circular] } },
+ data:
+ { text: 'helpers.js',
+ links: [ 'one', 'two', 'three', [length]: 3 ],
+ moreLinks:
+ [ { url: 'one', text: 'two' },
+ { url: 'three', text: 'four' },
+ { url: 'five', text: 'size' },
+ [length]: 3 ] } }
</pre>
</div>
View
16 test/actual/nested-layouts/helpers.html
@@ -12,17 +12,17 @@
</div>
<h2>css helper</h2>
-Example of using the "css" helper from <a href="http://github.com/assemble/helper-lib">helper-lib</a>.
-<link rel="stylesheet" href="../assets/css/css/bootstrap.css">
-<link rel="stylesheet" href="../assets/css/css/responsive.css">
-<link rel="stylesheet" href="../assets/css/css/main.css">
+Example of using a custom "css" helper.
+<link rel="stylesheet" href="../assets/css/css/bootstrap.css?v=1375933349660">
+<link rel="stylesheet" href="../assets/css/css/responsive.css?v=1375933349660">
+<link rel="stylesheet" href="../assets/css/css/main.css?v=1375933349660">
<h2>js helper</h2>
-Example of using the "js" helper from <a href="http://github.com/assemble/helper-lib">helper-lib</a>.
-<script src="../assets/js/js/bootstrap.js"></script>
-<script src="../assets/js/js/responsive.js"></script>
-<script src="../assets/js/js/main.js"></script>
+Example of using a custom "js" helper.
+<script src="../assets/js/js/bootstrap.js?v=1375933349660"></script>
+<script src="../assets/js/js/responsive.js?v=1375933349660"></script>
+<script src="../assets/js/js/main.js?v=1375933349660"></script>
<h2>custom variables</h2>
View
2 test/actual/object-blog/awesome-blog-post-2.html
@@ -13,7 +13,7 @@
<script src="https://gist.github.com/5898078.js"></script>
<h1>Awesome Blog Post #2 | Another Blog</h1>
- <div class="alert"><strong>ALERT!</strong> This is an alert message. <%= pkg.version %></div> The current version of Assemble is v0.4.3.
+ <div class="alert"><strong>ALERT!</strong> This is an alert message. <%= pkg.version %></div> The current version of Assemble is v0.4.4.
<script src="http://libs.github.io/bootstrap/css/bootstrap.min.js"></script>
</body>
</html>
View
2 test/actual/object-blog/sweet-blog-post-1.html
@@ -10,7 +10,7 @@
<script src="https://gist.github.com/5898072.js"></script>
- This "content" property is optional and would get passed into the `body` tag. But if you only need to pass the page's metadata to the layout then the content property is unnecessary.
+ This "content" property is optional and would get passed into the "body" tag. But if you only need to pass the page's metadata to the layout then the content property is unnecessary.
<script src="http://libs.github.io/bootstrap/css/bootstrap.min.js"></script>
</body>
</html>
View
166 test/actual/paths/helpers.html
@@ -16,16 +16,16 @@
<h2>css helper</h2>
Example of using a custom "css" helper.
-<link rel="stylesheet" href="../assets/css/css/bootstrap.css?v=1375341910871">
-<link rel="stylesheet" href="../assets/css/css/responsive.css?v=1375341910871">
-<link rel="stylesheet" href="../assets/css/css/main.css?v=1375341910871">
+<link rel="stylesheet" href="../assets/css/css/bootstrap.css?v=1375933347703">
+<link rel="stylesheet" href="../assets/css/css/responsive.css?v=1375933347703">
+<link rel="stylesheet" href="../assets/css/css/main.css?v=1375933347703">
<h2>js helper</h2>
Example of using a custom "js" helper.
-<script src="../assets/js/js/bootstrap.js?v=1375341910871"></script>
-<script src="../assets/js/js/responsive.js?v=1375341910871"></script>
-<script src="../assets/js/js/main.js?v=1375341910871"></script>
+<script src="../assets/js/js/bootstrap.js?v=1375933347703"></script>
+<script src="../assets/js/js/responsive.js?v=1375933347703"></script>
+<script src="../assets/js/js/main.js?v=1375933347703"></script>
<h2>custom variables</h2>
@@ -39,26 +39,35 @@
<pre class="json">
[ 'test/helpers/helper-*.js',
+ script: 'document.write(\'foo bar!\');',
+ src: 'test/templates/pages/helpers.hbs',
+ ext: '.html',
+ title: 'Helpers and custom variables',
+ extname: '.html',
[length]: 1,
- _page: 'all',
- dest: 'test/actual/paths/helpers.html',
- styles: '<link rel="stylesheet" href="css/index.css"/>',
- javascripts: [ 'js/bootstrap.js',
- 'js/responsive.js',
- 'js/main.js',
- [length]: 3 ],
+ basename: 'helpers',
+ pagename: 'helpers.html',
+ dirname: 'test/actual/paths',
+ page: { [Function]
+ [length]: 2,
+ [name]: '',
+ [arguments]: null,
+ [caller]: null,
+ [prototype]: { [constructor]: [Circular] } },
filename: 'helpers.html',
- assets: '../assets',
- ext: '.html',
+ description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n',
+ dest: 'test/actual/paths/helpers.html',
stylesheets: [ 'css/bootstrap.css',
'css/responsive.css',
'css/main.css',
[length]: 3 ],
+ javascripts: [ 'js/bootstrap.js',
+ 'js/responsive.js',
+ 'js/main.js',
+ [length]: 3 ],
pageName: 'helpers.html',
- dirname: 'test/actual/paths',
- basename: 'helpers',
- src: 'test/templates/pages/helpers.hbs',
- extname: '.html',
+ styles: '<link rel="stylesheet" href="css/index.css"/>',
+ assets: '../assets',
data: { title: 'Helpers and custom variables',
description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n',
stylesheets:
@@ -73,16 +82,7 @@
[length]: 3 ],
styles: '<link rel="stylesheet" href="css/index.css"/>',
script: 'document.write(\'foo bar!\');' },
- title: 'Helpers and custom variables',
- pagename: 'helpers.html',
- script: 'document.write(\'foo bar!\');',
- page: { [Function]
- [length]: 2,
- [name]: '',
- [arguments]: null,
- [caller]: null,
- [prototype]: { [constructor]: [Circular] } },
- description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. These are custom helpers that can found in the "./test/helpers" directory To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\r\n' ]
+ _page: 'all' ]
</pre>
<ul>
@@ -411,6 +411,42 @@
ext: .html
-->
+ <li><a href="deep-nested-layouts.html">deep-nested-layouts</a></li>
+ <!--
+ "this"
+ ===============================
+ this.dest: test/actual/paths/deep-nested-layouts.html
+ this.absolute:
+ this.dirname: test/actual/paths
+ this.filename: deep-nested-layouts.html
+ this.pagename: deep-nested-layouts.html
+ this.basename: deep-nested-layouts
+ this.extname: .html
+ this.ext: .html
+
+ "page"
+ ===============================
+ page.dest: test/actual/paths/helpers.html
+ page.absolute:
+ page.dirname: test/actual/paths
+ page.filename: helpers.html
+ page.pagename: helpers.html
+ page.basename: helpers
+ page.extname: .html
+ page.ext: .html
+
+ "root"
+ ===============================
+ dest:
+ absolute: test/actual/paths/helpers.html
+ dirname: test/actual/paths
+ filename: helpers.html
+ pagename: helpers.html
+ basename: helpers
+ extname: .html
+ ext: .html
+ -->
+
<li><a href="assets.html">assets</a></li>
<!--
"this"
@@ -627,6 +663,78 @@
ext: .html
-->
+ <li><a href="nested-layouts.html">nested-layouts</a></li>
+ <!--
+ "this"
+ ===============================
+ this.dest: test/actual/paths/nested-layouts.html
+ this.absolute:
+ this.dirname: test/actual/paths
+ this.filename: nested-layouts.html
+ this.pagename: nested-layouts.html
+ this.basename: nested-layouts
+ this.extname: .html
+ this.ext: .html
+
+ "page"
+ ===============================
+ page.dest: test/actual/paths/helpers.html
+ page.absolute:
+ page.dirname: test/actual/paths
+ page.filename: helpers.html
+ page.pagename: helpers.html
+ page.basename: helpers
+ page.extname: .html
+ page.ext: .html
+
+ "root"
+ ===============================
+ dest:
+ absolute: test/actual/paths/helpers.html
+ dirname: test/actual/paths
+ filename: helpers.html
+ pagename: helpers.html
+ basename: helpers
+ extname: .html
+ ext: .html
+ -->
+
+ <li><a href="no-layout-none.html">no-layout-none</a></li>
+ <!--
+ "this"
+ ===============================
+ this.dest: test/actual/paths/no-layout-none.html
+ this.absolute:
+ this.dirname: test/actual/paths
+ this.filename: no-layout-none.html
+ this.pagename: no-layout-none.html
+ this.basename: no-layout-none
+ this.extname: .html
+ this.ext: .html
+
+ "page"
+ ===============================
+ page.dest: test/actual/paths/helpers.html
+ page.absolute:
+ page.dirname: test/actual/paths
+ page.filename: helpers.html
+ page.pagename: helpers.html
+ page.basename: helpers
+ page.extname: .html
+ page.ext: .html
+
+ "root"
+ ===============================
+ dest:
+ absolute: test/actual/paths/helpers.html
+ dirname: test/actual/paths
+ filename: helpers.html
+ pagename: helpers.html
+ basename: helpers
+ extname: .html
+ ext: .html
+ -->
+
<li><a href="no-layout.html">no-layout</a></li>
<!--
"this"
View
86 test/actual/yfm/document.html
@@ -139,16 +139,52 @@ <h4 style="background: #eee; display: block">Delivery Instructions</h4>
<div class="container" style="display: none">
<h2>Debug Info</h2>
<pre class="json">
-{ 'ship-to':
+{ page:
+ { [Function]
+ [length]: 2,
+ [name]: '',
+ [arguments]: null,
+ [caller]: null,
+ [prototype]: { [constructor]: [Circular] } },
+ src: 'test/templates/pages/yfm/document.hbs',
+ ext: '.html',
+ filename: 'document.html',
+ customer: { given: 'Dorothy', family: 'Gale' },
+ extname: '.html',
+ dest: 'test/actual/yfm/document.html',
+ basename: 'document',
+ assets: '../assets',
+ pageName: 'document.html',
+ prettyDate: '2007-08-05',
+ 'bill-to':
{ street: '123 Tornado Alley\r\nSuite 16\r\n',
city: 'East Centerville',
state: 'KS' },
+ receipt: 'Oz-Ware Purchase Invoice',
+ specialDelivery: 'Follow the Yellow Brick Road to the Emerald City. Pay no attention to the man behind the curtain.\r\n',
+ date: Sun Aug 05 2007 20:00:00 GMT-0400 (Eastern Daylight Time),
+ dirname: 'test/actual/yfm',
+ items:
+ [ { part_no: 'A4786',
+ descrip: 'Water Bucket (Filled)',
+ price: 1.47,
+ quantity: 4 },
+ { part_no: 'E1628',
+ descrip: 'High Heeled "Ruby" Slippers',
+ size: 8,
+ price: 100.27,
+ quantity: 1 },
+ [length]: 2 ],
+ pagename: 'document.html',
data:
- { 'ship-to':
+ { customer: { given: 'Dorothy', family: 'Gale' },
+ prettyDate: '2007-08-05',
+ 'bill-to':
{ street: '123 Tornado Alley\r\nSuite 16\r\n',
city: 'East Centerville',
state: 'KS' },
- customer: { given: 'Dorothy', family: 'Gale' },
+ receipt: 'Oz-Ware Purchase Invoice',
+ specialDelivery: 'Follow the Yellow Brick Road to the Emerald City. Pay no attention to the man behind the curtain.\r\n',
date: Sun Aug 05 2007 20:00:00 GMT-0400 (Eastern Daylight Time),
items:
[ { part_no: 'A4786',
@@ -161,51 +197,15 @@ <h4 style="background: #eee; display: block">Delivery Instructions</h4>
price: 100.27,
quantity: 1 },
[length]: 2 ],
- receipt: 'Oz-Ware Purchase Invoice',
- specialDelivery: 'Follow the Yellow Brick Road to the Emerald City. Pay no attention to the man behind the curtain.\r\n',
- 'bill-to':
+ 'ship-to':
{ street: '123 Tornado Alley\r\nSuite 16\r\n',
city: 'East Centerville',
- state: 'KS' },
- prettyDate: '2007-08-05' },
- _page: 'all',
- customer: { given: 'Dorothy', family: 'Gale' },
- date: Sun Aug 05 2007 20:00:00 GMT-0400 (Eastern Daylight Time),
- dest: 'test/actual/yfm/document.html',
- items:
- [ { part_no: 'A4786',
- descrip: 'Water Bucket (Filled)',
- price: 1.47,
- quantity: 4 },
- { part_no: 'E1628',
- descrip: 'High Heeled "Ruby" Slippers',
- size: 8,
- price: 100.27,
- quantity: 1 },
- [length]: 2 ],
- pagename: 'document.html',
- receipt: 'Oz-Ware Purchase Invoice',
- specialDelivery: 'Follow the Yellow Brick Road to the Emerald City. Pay no attention to the man behind the curtain.\r\n',
- filename: 'document.html',
- assets: '../assets',
- 'bill-to':
+ state: 'KS' } },
+ 'ship-to':
{ street: '123 Tornado Alley\r\nSuite 16\r\n',
city: 'East Centerville',
state: 'KS' },
- pageName: 'document.html',
- dirname: 'test/actual/yfm',
- basename: 'document',
- src: 'test/templates/pages/yfm/document.hbs',
- extname: '.html',
- page:
- { [Function]
- [length]: 2,
- [name]: '',
- [arguments]: null,
- [caller]: null,
- [prototype]: { [constructor]: [Circular] } },
- ext: '.html',
- prettyDate: '2007-08-05' }
+ _page: 'all' }
</pre>
</div>
View
42 test/actual/yfm/lists.html
@@ -114,27 +114,38 @@
<div class="container" style="display: none">
<h2>Debug Info</h2>
<pre class="json">
-{ _page: 'all',
- dest: 'test/actual/yfm/lists.html',
- filename: 'lists.html',
- assets: '../assets',
+{ src: 'test/templates/pages/yfm/lists.hbs',
ext: '.html',
- pageName: 'lists.html',
- attributes: [ 'attr1', 'attr2', 'attr3', [length]: 3 ],
+ title: 'Almost a Haiku',
+ extname: '.html',
+ basename: 'lists',
+ groceries: [ 'milk', 'pumpkin pie', 'eggs', 'juice', [length]: 4 ],
+ pagename: 'lists.html',
dirname: 'test/actual/yfm',
+ page:
+ { [Function]
+ [length]: 2,
+ [name]: '',
+ [arguments]: null,
+ [caller]: null,
+ [prototype]: { [constructor]: [Circular] } },
people:
[ { name: 'John Smith', age: 33 },
{ name: 'Mary Smith', age: 27 },
[length]: 2 ],
- basename: 'lists',
men: [ 'John Smith', 'Bill Jones', [length]: 2 ],
+ filename: 'lists.html',
+ dest: 'test/actual/yfm/lists.html',
+ women: [ 'Mary Smith', 'Susan Williams', [length]: 2 ],
+ assets: '../assets',
+ attributes: [ 'attr1', 'attr2', 'attr3', [length]: 3 ],
+ pageName: 'lists.html',
movies:
[ 'Casablanca',
'North by Northwest',
'The Man Who Wasn\'t There',
[length]: 3 ],
- src: 'test/templates/pages/yfm/lists.hbs',
- extname: '.html',
+ methods: [ 'getter', 'setter', [length]: 2 ],
data:
{ title: 'Almost a Haiku',
attributes: [ 'attr1', 'attr2', 'attr3', [length]: 3 ],
@@ -151,18 +162,7 @@
[length]: 2 ],
men: [ 'John Smith', 'Bill Jones', [length]: 2 ],
women: [ 'Mary Smith', 'Susan Williams', [length]: 2 ] },
- title: 'Almost a Haiku',
- pagename: 'lists.html',
- women: [ 'Mary Smith', 'Susan Williams', [length]: 2 ],
- groceries: [ 'milk', 'pumpkin pie', 'eggs', 'juice', [length]: 4 ],
- methods: [ 'getter', 'setter', [length]: 2 ],
- page:
- { [Function]
- [length]: 2,
- [name]: '',
- [arguments]: null,
- [caller]: null,
- [prototype]: { [constructor]: [Circular] } } }
+ _page: 'all' }
</pre>
</div>
View
8 test/actual/yfm/variables.html
@@ -22,15 +22,15 @@
This is an example YAML variable. Variables need to be the first thing in the line. If it shows up in the result, it worked!
<p>This would output the variable as literal text.</p>
-<pre><code class="language-yaml">three: But this doesn&#39;t work. *DOOWB</code></pre>
+<pre><code class="lang-yaml">three: But this doesn&#39;t work. *DOOWB</code></pre>
<p>And this would throw an error:</p>
-<pre><code class="language-yaml">three: *DOOWB But this doesn&#39;t work.</code></pre>
+<pre><code class="lang-yaml">three: *DOOWB But this doesn&#39;t work.</code></pre>
<p>YAML supports <strong>variables</strong>, or <strong>repeated nodes</strong>. The simplest explanation is that you define something as a variable by preceding it with &quot;&amp;NAME value&quot; and you can refer to it with &quot;*NAME&quot; e.g.:</p>
-<pre><code class="language-yaml"># YAML
+<pre><code class="lang-yaml"># YAML
some_thing: &amp;NAME foobar
other_thing: *NAME</code></pre>
<p>Parses to:</p>
-<pre><code class="language-json">{"<span class="attribute">other_thing</span>": <span class="value"><span class="string">"foobar"</span></span>, "<span class="attribute">some_thing</span>": <span class="value"><span class="string">"foobar"</span>}</span></code></pre>
+<pre><code class="lang-json">{&quot;other_thing&quot;: &quot;foobar&quot;, &quot;some_thing&quot;: &quot;foobar&quot;}</code></pre>
</div>
View
2 test/collection_tests.js
@@ -6,7 +6,7 @@ var grunt = require('grunt');
var path = require('path');
var getCollection = function(file) {
- return grunt.file.readJSON(path.join('.', 'test', 'data', 'collections', file));
+ return grunt.file.readJSON(path.join('./test/data/collections', file));
};
var fakeCollection = getCollection('fakeCollection.json');
View
35 test/data/blog.json
@@ -0,0 +1,35 @@
+{
+ "articles": [
+ {
+ "filename": "post1",
+ "data": {
+ "title": "Blog Post #1",
+ "gists": [
+ "5898072"
+ ]
+ },
+ "content": "This \"content\" property is optional and would get passed into the `body` tag. But if you only need to pass the page's metadata to the layout then the content property isn't required."
+ },
+ {
+ "filename": "post2",
+ "data": {
+ "title": "Blog Post #2",
+ "subtitle": "",
+ "gists": [
+ "5898077",
+ "5898078"
+ ]
+ },
+ "content": "<h1>{{title}} | {{site.title}}</h1>\n {{> <%= component.one %> }} The current version of Assemble is v<%= pkg.version %>."
+ },
+ {
+ "filename": "post3",
+ "data": {
+ "title": "Blog Post #3",
+ "gists": [
+ "5909393"
+ ]
+ }
+ }
+ ]
+}

0 comments on commit dfd5b89

Please sign in to comment.