Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

assemble

Package Overview
Dependencies
Maintainers
2
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assemble - npm Package Compare versions

Comparing version 0.3.80 to 0.3.81

lib/engine/helpers.js

2

component.json
{
"name": "assemble",
"description": "Get the rocks out of your socks. Assemble helps you quickly launch static web projects by emphasizing a strong separation of concerns between structure, style, content and configuration.",
"version": "0.3.80",
"version": "0.3.81",
"repo": "assemble/assemble",

@@ -6,0 +6,0 @@ "main": [

@@ -0,0 +0,0 @@ ## Methods

@@ -51,17 +51,28 @@ /*

},
compact: {
paths: {
options: {
partials: 'test/files/partials/*.hbs',
layout: 'test/files/layout.hbs'
partials: 'test/templates/partials/*.hbs',
layout: 'test/templates/layouts/paths-example.hbs',
data: ['test/data/*.yml']
},
src: ['test/files/dates.hbs', 'test/files/page.hbs'],
dest: 'test/actual/'
files: {
'test/actual/paths/': ['test/templates/pages/**/*.hbs']
}
},
single_page: {
options: {
partials: 'test/templates/partials/*.hbs',
layout: 'test/templates/layouts/layout.hbs'
},
files: {
'test/actual/page.html': ['test/templates/pages/page.hbs']
}
},
files_object: {
options: {
layout: 'test/files/layout.hbs',
data: 'test/yaml/data/**/*.*'
layout: 'test/templates/layouts/layout.hbs',
data: 'test/yaml/data/*.{json,yml}'
},
files: {
'test/actual/yaml/': ['test/yaml/*.hbs']
'test/actual/yaml/': ['test/YAML/*.hbs']
}

@@ -71,9 +82,9 @@ },

options: {
layout: 'test/files/layout.hbs',
layout: 'test/templates/layouts/layout.hbs',
data: ['test/data/*.json']
},
files: {
'test/actual/multi/dest1/': ['test/files/**/*.hbs', '!test/files/layout*.*'],
'test/actual/multi/dest2/': ['test/files/**/*.{md,markdown}'],
'test/actual/multi/dest2/sub-dest/': ['test/files/**/*.hbs', '!test/files/layout*.*']
'test/actual/multi/dest1/': ['test/templates/pages/**/*.hbs'],
'test/actual/multi/dest2/': ['test/templates/pages/**/*.{md,markdown}'],
'test/actual/multi/dest2/sub-dest/': ['test/templates/pages/**/*.hbs']
}

@@ -83,6 +94,9 @@ },

options: {
layout: 'test/layouts/default.md.hbs',
layout: 'test/templates/layouts/default.md.hbs',
data: ['test/data/*.json'],
ext: '.md'
},
files: {'test/actual/multi/dest1/': ['test/files/**/*.hbs', '!test/files/layout*.*']}
files: {
'test/actual/multi/dest1/': ['test/templates/pages/**/*.hbs']
}
},

@@ -94,3 +108,5 @@ assets_one: {

},
files: {'test/actual/assets-public-folder.html': ['test/files/assets.hbs']}
files: {
'test/actual/assets-public-folder.html': ['test/templates/pages/assets.hbs']
}
},

@@ -102,3 +118,5 @@ assets_two: {

},
files: {'test/actual/assets-same-folder.html': ['test/files/assets.hbs']}
files: {
'test/actual/assets-same-folder.html': ['test/templates/pages/assets.hbs']
}
},

@@ -110,3 +128,14 @@ assets_three: {

},
files: {'test/actual/assets-root.html': ['test/files/assets.hbs']}
files: {
'test/actual/assets-root.html': ['test/templates/pages/assets.hbs']
}
},
custom_helpers: {
options: {
helpers: ['test/lib/**/*.js'],
version: '<%= pkg.version %>'
},
files: {
'test/actual/custom_helpers.html': ['test/custom_helpers/custom_helpers.hbs']
}
}

@@ -131,3 +160,3 @@ },

// Default task.
grunt.registerTask('default', ['jshint', 'clean', 'assemble:compact']);
grunt.registerTask('default', ['jshint', 'clean', 'assemble']);

@@ -134,0 +163,0 @@ // Tests to be run.

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ var fs = require('fs'),

var grunt = require('grunt');
var helpers = require('./helpers');

@@ -41,2 +42,11 @@ var EngineFactory = function() {

}
if(options && typeof options.helpers !== 'undefined') {
if(this.toString.call(options.helpers) !== '[object Array]'){
options.helpers = [options.helpers];
}
var engineEngine = this.engine[engineName] || this.engine;
options.helpers.forEach(function(file) {
helpers.register(file, this.engine, engineEngine, options);
}, this);
}
};

@@ -60,5 +70,5 @@

// Helpers, filters etc. depending on template engine
var registerFunctions = function() {
var registerFunctions = function(helperFunctions) {
if(functionExists(this.engine.registerFunctions)) {
this.engine.registerFunctions();
this.engine.registerFunctions(helperFunctions);
}

@@ -65,0 +75,0 @@ };

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@

{
"name": "assemble",
"description": "Assemble makes it dead simple to build modular sites and components from reusable templates and data.",
"version": "0.3.80",
"version": "0.3.81",
"homepage": "https://github.com/assemble/assemble",

@@ -6,0 +6,0 @@ "author": {

@@ -1,2 +0,2 @@

# [Assemble v0.3.80](http://github.com/assemble/assemble) [![Build Status](https://travis-ci.org/assemble/assemble.png)](https://travis-ci.org/assemble/assemble)
# [Assemble v0.3.81](http://github.com/assemble/assemble) [![Build Status](https://travis-ci.org/assemble/assemble.png)](https://travis-ci.org/assemble/assemble)

@@ -629,2 +629,3 @@ > Assemble makes it dead simple to build modular sites and components from reusable templates and data.

## Release History
* 2013-06-10 v0.3.81 Adding additional ways to load custom helpers. Now it's possible to use a glob pattern that points to a list of scripts with helpers to load.Adding examples and tests on how to use the new custom helper loading methods.
* 2013-06-01 v0.3.80 Fixing bug with null value in engine

@@ -650,3 +651,3 @@ * 2013-05-07 v0.3.77 Updated README with info about assemble methods

_This file was generated using Grunt and [assemble](http://github.com/assemble/assemble) on Sun Jun 02 2013 04:30:03._
_This file was generated using Grunt and [assemble](http://github.com/assemble/assemble) on Mon Jun 10 2013 18:55:43._

@@ -653,0 +654,0 @@

# alert.md output
## Content
<span class="alert alert-info"></span>
## Debug Info
``` json

@@ -12,3 +19,3 @@ { one: { two: 'This is an alert' },

basename: 'alert',
src: 'test/files/alert.hbs',
src: 'test/templates/pages/alert.hbs',
dest: 'test/actual/multi/dest1/alert.md',

@@ -28,16 +35,19 @@ assets: '../../assets',

### "{{#each pages}}" Links
[alert](alert.md)
[assets](assets.md)
[category](category.md)
[category2](category2.md)
[collections-categories](collections-categories.md)
[collections-categories2](collections-categories2.md)
[collections-tags-2](collections-tags-2.md)
[collections-tags](collections-tags.md)
[complex](complex.md)
[dates](dates.md)
[debug-helpers](debug-helpers.md)
[example](example.md)
[gist-helper](gist-helper.md)
[helpers](helpers.md)
[home](home.md)
[html-helpers](html-helpers.md)
[page](page.md)
[nav](nav.md)
[simple3](simple3.md)
[tags_test](tags_test.md)
[tags_test2](tags_test2.md)

@@ -70,24 +80,46 @@

#### category.md
#### collections-categories.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category.md
this.dest: test/actual/multi/dest1/collections-categories.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category.md
this.pagename: category.md
this.basename: category
this.filename: collections-categories.md
this.pagename: collections-categories.md
this.basename: collections-categories
this.extname: .md
this.ext: .md
#### category2.md
#### collections-categories2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category2.md
this.dest: test/actual/multi/dest1/collections-categories2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category2.md
this.pagename: category2.md
this.basename: category2
this.filename: collections-categories2.md
this.pagename: collections-categories2.md
this.basename: collections-categories2
this.extname: .md
this.ext: .md
#### collections-tags-2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags-2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags-2.md
this.pagename: collections-tags-2.md
this.basename: collections-tags-2
this.extname: .md
this.ext: .md
#### collections-tags.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags.md
this.pagename: collections-tags.md
this.basename: collections-tags
this.extname: .md
this.ext: .md
#### complex.md

@@ -104,10 +136,10 @@ this.assets: ../../assets

#### dates.md
#### debug-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/dates.md
this.dest: test/actual/multi/dest1/debug-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: dates.md
this.pagename: dates.md
this.basename: dates
this.filename: debug-helpers.md
this.pagename: debug-helpers.md
this.basename: debug-helpers
this.extname: .md

@@ -127,65 +159,65 @@ this.ext: .md

#### helpers.md
#### gist-helper.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/helpers.md
this.dest: test/actual/multi/dest1/gist-helper.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.filename: gist-helper.md
this.pagename: gist-helper.md
this.basename: gist-helper
this.extname: .md
this.ext: .md
#### page.md
#### helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/page.md
this.dest: test/actual/multi/dest1/helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: page.md
this.pagename: page.md
this.basename: page
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.extname: .md
this.ext: .md
#### nav.md
#### home.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/nav.md
this.dest: test/actual/multi/dest1/home.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: nav.md
this.pagename: nav.md
this.basename: nav
this.filename: home.md
this.pagename: home.md
this.basename: home
this.extname: .md
this.ext: .md
#### simple3.md
#### html-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/simple3.md
this.dest: test/actual/multi/dest1/html-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.filename: html-helpers.md
this.pagename: html-helpers.md
this.basename: html-helpers
this.extname: .md
this.ext: .md
#### tags_test.md
#### page.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test.md
this.dest: test/actual/multi/dest1/page.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test.md
this.pagename: tags_test.md
this.basename: tags_test
this.filename: page.md
this.pagename: page.md
this.basename: page
this.extname: .md
this.ext: .md
#### tags_test2.md
#### simple3.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test2.md
this.dest: test/actual/multi/dest1/simple3.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test2.md
this.pagename: tags_test2.md
this.basename: tags_test2
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.extname: .md

@@ -340,3 +372,25 @@ this.ext: .md

#### alert.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/alert.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: alert.md
page.pagename: alert.md
page.basename: alert
page.extname: .md
page.ext: .md
#### alert.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/alert.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: alert.md
page.pagename: alert.md
page.basename: alert
page.extname: .md
page.ext: .md
### {{#each pages}} "page" context

@@ -487,6 +541,24 @@

#### alert.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/alert.md
dirname: test/actual/multi/dest1
filename: alert.md
pagename: alert.md
basename: alert
extname: .md
ext: .md
#### alert.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/alert.md
dirname: test/actual/multi/dest1
filename: alert.md
pagename: alert.md
basename: alert
extname: .md
ext: .md
<span class="alert alert-info"></span>
# assets.md output
## Content
<p>Examples to test the "relative" and "assets" variables, and to show how they work</p>
<h1>Relative Helper</h1>
<script src="../../../../css/one/two/three.js"></script>
<script src="../../../../js/one/two/three.js"></script>
<script src="../../../../jsone/two/three.js"></script>
<script src="./../../../../jsone/two/three.js"></script>
<h1>Assets Helper</h1>
<script src="../../assetsone/two/three.js"></script>
<script src="../../assets/one/two/three.js"></script>
## Debug Info
``` json

@@ -11,3 +31,3 @@ { dirname: 'test/actual/multi/dest1',

basename: 'assets',
src: 'test/files/assets.hbs',
src: 'test/templates/pages/assets.hbs',
dest: 'test/actual/multi/dest1/assets.md',

@@ -27,16 +47,19 @@ assets: '../../assets',

### "{{#each pages}}" Links
[alert](alert.md)
[assets](assets.md)
[category](category.md)
[category2](category2.md)
[collections-categories](collections-categories.md)
[collections-categories2](collections-categories2.md)
[collections-tags-2](collections-tags-2.md)
[collections-tags](collections-tags.md)
[complex](complex.md)
[dates](dates.md)
[debug-helpers](debug-helpers.md)
[example](example.md)
[gist-helper](gist-helper.md)
[helpers](helpers.md)
[home](home.md)
[html-helpers](html-helpers.md)
[page](page.md)
[nav](nav.md)
[simple3](simple3.md)
[tags_test](tags_test.md)
[tags_test2](tags_test2.md)

@@ -69,24 +92,46 @@

#### category.md
#### collections-categories.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category.md
this.dest: test/actual/multi/dest1/collections-categories.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category.md
this.pagename: category.md
this.basename: category
this.filename: collections-categories.md
this.pagename: collections-categories.md
this.basename: collections-categories
this.extname: .md
this.ext: .md
#### category2.md
#### collections-categories2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category2.md
this.dest: test/actual/multi/dest1/collections-categories2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category2.md
this.pagename: category2.md
this.basename: category2
this.filename: collections-categories2.md
this.pagename: collections-categories2.md
this.basename: collections-categories2
this.extname: .md
this.ext: .md
#### collections-tags-2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags-2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags-2.md
this.pagename: collections-tags-2.md
this.basename: collections-tags-2
this.extname: .md
this.ext: .md
#### collections-tags.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags.md
this.pagename: collections-tags.md
this.basename: collections-tags
this.extname: .md
this.ext: .md
#### complex.md

@@ -103,10 +148,10 @@ this.assets: ../../assets

#### dates.md
#### debug-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/dates.md
this.dest: test/actual/multi/dest1/debug-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: dates.md
this.pagename: dates.md
this.basename: dates
this.filename: debug-helpers.md
this.pagename: debug-helpers.md
this.basename: debug-helpers
this.extname: .md

@@ -126,65 +171,65 @@ this.ext: .md

#### helpers.md
#### gist-helper.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/helpers.md
this.dest: test/actual/multi/dest1/gist-helper.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.filename: gist-helper.md
this.pagename: gist-helper.md
this.basename: gist-helper
this.extname: .md
this.ext: .md
#### page.md
#### helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/page.md
this.dest: test/actual/multi/dest1/helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: page.md
this.pagename: page.md
this.basename: page
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.extname: .md
this.ext: .md
#### nav.md
#### home.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/nav.md
this.dest: test/actual/multi/dest1/home.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: nav.md
this.pagename: nav.md
this.basename: nav
this.filename: home.md
this.pagename: home.md
this.basename: home
this.extname: .md
this.ext: .md
#### simple3.md
#### html-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/simple3.md
this.dest: test/actual/multi/dest1/html-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.filename: html-helpers.md
this.pagename: html-helpers.md
this.basename: html-helpers
this.extname: .md
this.ext: .md
#### tags_test.md
#### page.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test.md
this.dest: test/actual/multi/dest1/page.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test.md
this.pagename: tags_test.md
this.basename: tags_test
this.filename: page.md
this.pagename: page.md
this.basename: page
this.extname: .md
this.ext: .md
#### tags_test2.md
#### simple3.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test2.md
this.dest: test/actual/multi/dest1/simple3.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test2.md
this.pagename: tags_test2.md
this.basename: tags_test2
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.extname: .md

@@ -339,3 +384,25 @@ this.ext: .md

#### assets.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/assets.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: assets.md
page.pagename: assets.md
page.basename: assets
page.extname: .md
page.ext: .md
#### assets.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/assets.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: assets.md
page.pagename: assets.md
page.basename: assets
page.extname: .md
page.ext: .md
### {{#each pages}} "page" context

@@ -486,17 +553,24 @@

#### assets.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/assets.md
dirname: test/actual/multi/dest1
filename: assets.md
pagename: assets.md
basename: assets
extname: .md
ext: .md
#### assets.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/assets.md
dirname: test/actual/multi/dest1
filename: assets.md
pagename: assets.md
basename: assets
extname: .md
ext: .md
<h1>Relative Helper</h1>
<script src="../../../../css/one/two/three.js"></script>
<script src="../../../../js/one/two/three.js"></script>
<script src="../../../../jsone/two/three.js"></script>
<script src="./../../../../jsone/two/three.js"></script>
<h1>Assets Helper</h1>
<script src="../../assetsone/two/three.js"></script>
<script src="../../assets/one/two/three.js"></script>
# complex.md output
## Content
<span class="alert alert-info">This is an alert</span>
## Debug Info
``` json

@@ -13,3 +20,3 @@ { foo: 'bar',

basename: 'complex',
src: 'test/files/complex.hbs',
src: 'test/templates/pages/complex.hbs',
dest: 'test/actual/multi/dest1/complex.md',

@@ -29,16 +36,19 @@ assets: '../../assets',

### "{{#each pages}}" Links
[alert](alert.md)
[assets](assets.md)
[category](category.md)
[category2](category2.md)
[collections-categories](collections-categories.md)
[collections-categories2](collections-categories2.md)
[collections-tags-2](collections-tags-2.md)
[collections-tags](collections-tags.md)
[complex](complex.md)
[dates](dates.md)
[debug-helpers](debug-helpers.md)
[example](example.md)
[gist-helper](gist-helper.md)
[helpers](helpers.md)
[home](home.md)
[html-helpers](html-helpers.md)
[page](page.md)
[nav](nav.md)
[simple3](simple3.md)
[tags_test](tags_test.md)
[tags_test2](tags_test2.md)

@@ -71,24 +81,46 @@

#### category.md
#### collections-categories.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category.md
this.dest: test/actual/multi/dest1/collections-categories.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category.md
this.pagename: category.md
this.basename: category
this.filename: collections-categories.md
this.pagename: collections-categories.md
this.basename: collections-categories
this.extname: .md
this.ext: .md
#### category2.md
#### collections-categories2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category2.md
this.dest: test/actual/multi/dest1/collections-categories2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category2.md
this.pagename: category2.md
this.basename: category2
this.filename: collections-categories2.md
this.pagename: collections-categories2.md
this.basename: collections-categories2
this.extname: .md
this.ext: .md
#### collections-tags-2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags-2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags-2.md
this.pagename: collections-tags-2.md
this.basename: collections-tags-2
this.extname: .md
this.ext: .md
#### collections-tags.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags.md
this.pagename: collections-tags.md
this.basename: collections-tags
this.extname: .md
this.ext: .md
#### complex.md

@@ -105,10 +137,10 @@ this.assets: ../../assets

#### dates.md
#### debug-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/dates.md
this.dest: test/actual/multi/dest1/debug-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: dates.md
this.pagename: dates.md
this.basename: dates
this.filename: debug-helpers.md
this.pagename: debug-helpers.md
this.basename: debug-helpers
this.extname: .md

@@ -128,65 +160,65 @@ this.ext: .md

#### helpers.md
#### gist-helper.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/helpers.md
this.dest: test/actual/multi/dest1/gist-helper.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.filename: gist-helper.md
this.pagename: gist-helper.md
this.basename: gist-helper
this.extname: .md
this.ext: .md
#### page.md
#### helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/page.md
this.dest: test/actual/multi/dest1/helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: page.md
this.pagename: page.md
this.basename: page
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.extname: .md
this.ext: .md
#### nav.md
#### home.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/nav.md
this.dest: test/actual/multi/dest1/home.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: nav.md
this.pagename: nav.md
this.basename: nav
this.filename: home.md
this.pagename: home.md
this.basename: home
this.extname: .md
this.ext: .md
#### simple3.md
#### html-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/simple3.md
this.dest: test/actual/multi/dest1/html-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.filename: html-helpers.md
this.pagename: html-helpers.md
this.basename: html-helpers
this.extname: .md
this.ext: .md
#### tags_test.md
#### page.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test.md
this.dest: test/actual/multi/dest1/page.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test.md
this.pagename: tags_test.md
this.basename: tags_test
this.filename: page.md
this.pagename: page.md
this.basename: page
this.extname: .md
this.ext: .md
#### tags_test2.md
#### simple3.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test2.md
this.dest: test/actual/multi/dest1/simple3.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test2.md
this.pagename: tags_test2.md
this.basename: tags_test2
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.extname: .md

@@ -341,3 +373,25 @@ this.ext: .md

#### complex.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/complex.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: complex.md
page.pagename: complex.md
page.basename: complex
page.extname: .md
page.ext: .md
#### complex.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/complex.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: complex.md
page.pagename: complex.md
page.basename: complex
page.extname: .md
page.ext: .md
### {{#each pages}} "page" context

@@ -488,6 +542,24 @@

#### complex.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/complex.md
dirname: test/actual/multi/dest1
filename: complex.md
pagename: complex.md
basename: complex
extname: .md
ext: .md
#### complex.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/complex.md
dirname: test/actual/multi/dest1
filename: complex.md
pagename: complex.md
basename: complex
extname: .md
ext: .md
<span class="alert alert-info">This is an alert</span>
# example.md output
## Content
This example shows that the properties from "example.json" and "example.hbs" are on the page object.
<div>bar</div>
<div></div>
<div>bar</div>
<div></div>
## Debug Info
``` json

@@ -12,3 +26,3 @@ { foo: 'bar',

basename: 'example',
src: 'test/files/example.hbs',
src: 'test/templates/pages/example.hbs',
dest: 'test/actual/multi/dest1/example.md',

@@ -28,16 +42,19 @@ assets: '../../assets',

### "{{#each pages}}" Links
[alert](alert.md)
[assets](assets.md)
[category](category.md)
[category2](category2.md)
[collections-categories](collections-categories.md)
[collections-categories2](collections-categories2.md)
[collections-tags-2](collections-tags-2.md)
[collections-tags](collections-tags.md)
[complex](complex.md)
[dates](dates.md)
[debug-helpers](debug-helpers.md)
[example](example.md)
[gist-helper](gist-helper.md)
[helpers](helpers.md)
[home](home.md)
[html-helpers](html-helpers.md)
[page](page.md)
[nav](nav.md)
[simple3](simple3.md)
[tags_test](tags_test.md)
[tags_test2](tags_test2.md)

@@ -70,24 +87,46 @@

#### category.md
#### collections-categories.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category.md
this.dest: test/actual/multi/dest1/collections-categories.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category.md
this.pagename: category.md
this.basename: category
this.filename: collections-categories.md
this.pagename: collections-categories.md
this.basename: collections-categories
this.extname: .md
this.ext: .md
#### category2.md
#### collections-categories2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category2.md
this.dest: test/actual/multi/dest1/collections-categories2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category2.md
this.pagename: category2.md
this.basename: category2
this.filename: collections-categories2.md
this.pagename: collections-categories2.md
this.basename: collections-categories2
this.extname: .md
this.ext: .md
#### collections-tags-2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags-2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags-2.md
this.pagename: collections-tags-2.md
this.basename: collections-tags-2
this.extname: .md
this.ext: .md
#### collections-tags.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags.md
this.pagename: collections-tags.md
this.basename: collections-tags
this.extname: .md
this.ext: .md
#### complex.md

@@ -104,10 +143,10 @@ this.assets: ../../assets

#### dates.md
#### debug-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/dates.md
this.dest: test/actual/multi/dest1/debug-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: dates.md
this.pagename: dates.md
this.basename: dates
this.filename: debug-helpers.md
this.pagename: debug-helpers.md
this.basename: debug-helpers
this.extname: .md

@@ -127,65 +166,65 @@ this.ext: .md

#### helpers.md
#### gist-helper.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/helpers.md
this.dest: test/actual/multi/dest1/gist-helper.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.filename: gist-helper.md
this.pagename: gist-helper.md
this.basename: gist-helper
this.extname: .md
this.ext: .md
#### page.md
#### helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/page.md
this.dest: test/actual/multi/dest1/helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: page.md
this.pagename: page.md
this.basename: page
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.extname: .md
this.ext: .md
#### nav.md
#### home.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/nav.md
this.dest: test/actual/multi/dest1/home.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: nav.md
this.pagename: nav.md
this.basename: nav
this.filename: home.md
this.pagename: home.md
this.basename: home
this.extname: .md
this.ext: .md
#### simple3.md
#### html-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/simple3.md
this.dest: test/actual/multi/dest1/html-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.filename: html-helpers.md
this.pagename: html-helpers.md
this.basename: html-helpers
this.extname: .md
this.ext: .md
#### tags_test.md
#### page.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test.md
this.dest: test/actual/multi/dest1/page.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test.md
this.pagename: tags_test.md
this.basename: tags_test
this.filename: page.md
this.pagename: page.md
this.basename: page
this.extname: .md
this.ext: .md
#### tags_test2.md
#### simple3.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test2.md
this.dest: test/actual/multi/dest1/simple3.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test2.md
this.pagename: tags_test2.md
this.basename: tags_test2
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.extname: .md

@@ -340,3 +379,25 @@ this.ext: .md

#### example.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/example.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: example.md
page.pagename: example.md
page.basename: example
page.extname: .md
page.ext: .md
#### example.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/example.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: example.md
page.pagename: example.md
page.basename: example
page.extname: .md
page.ext: .md
### {{#each pages}} "page" context

@@ -487,11 +548,24 @@

#### example.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/example.md
dirname: test/actual/multi/dest1
filename: example.md
pagename: example.md
basename: example
extname: .md
ext: .md
#### example.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/example.md
dirname: test/actual/multi/dest1
filename: example.md
pagename: example.md
basename: example
extname: .md
ext: .md
<div>bar</div>
<div></div>
<div>bar</div>
<div></div>

@@ -1,25 +0,63 @@

# helpers.md output
# Helpers and custom variables
## Content
<div class="page-header">
<h1>Helpers and custom variables</h1>
<p class="lead">Here we are using the &quot;css&quot; and &quot;js&quot; helpers to output the stylesheets and scripts that we want for this page. To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.
</p>
</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">
<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>
<h2>custom variables</h2>
<link rel="stylesheet" href="css/index.css"/>
<script>document.write('foo bar!');</script>
## Debug Info
``` json
{ assets: '../../assets',
{ extname: '.md',
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. To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\n',
stylesheets:
[ 'css/bootstrap.css',
'css/responsive.css',
'css/main.css',
[length]: 3 ],
javascripts:
[ 'js/bootstrap.js',
'js/responsive.js',
'js/main.js',
[length]: 3 ],
styles: '<link rel="stylesheet" href="css/index.css"/>',
scripts: 'document.write(\'foo bar!\');' },
description: 'Here we are using the "css" and "js" helpers to output the stylesheets and scripts that we want for this page. To show another approach (as well as the advantage of using helpers), we also demonstrate adding styles and scrips with custom variables.\n',
assets: '../../assets',
scripts: 'document.write(\'foo bar!\');',
basename: 'helpers',
src: 'test/templates/pages/helpers.hbs',
ext: '.md',
filename: 'helpers.md',
dest: 'test/actual/multi/dest1/helpers.md',
javascripts:
[ 'js/bootstrap.js',
'js/responsive.js',
'js/main.js',
[length]: 3 ],
dirname: 'test/actual/multi/dest1',
ext: '.md',
url: 'http://gist.github.com/jonschlinkert/5193239',
text: 'helpers.js',
src: 'test/files/helpers.hbs',
links: [ 'one', 'two', 'three', [length]: 3 ],
basename: 'helpers',
data:
{ url: 'http://gist.github.com/jonschlinkert/5193239',
text: 'helpers.js',
links: [ 'one', 'two', 'three', [length]: 3 ],
moreLinks:
[ { url: 'one', text: 'two' },
{ url: 'three', text: 'four' },
{ url: 'five', text: 'size' },
[length]: 3 ] },
page:

@@ -32,26 +70,31 @@ { [Function]

[prototype]: { [constructor]: [Circular] } },
extname: '.md',
title: 'Helpers and custom variables',
styles: '<link rel="stylesheet" href="css/index.css"/>',
pagename: 'helpers.md',
pageName: 'helpers.md',
pagename: 'helpers.md',
moreLinks:
[ { url: 'one', text: 'two' },
{ url: 'three', text: 'four' },
{ url: 'five', text: 'size' },
[length]: 3 ] }
stylesheets:
[ 'css/bootstrap.css',
'css/responsive.css',
'css/main.css',
[length]: 3 ],
dest: 'test/actual/multi/dest1/helpers.md' }
```
### "{{#each pages}}" Links
[alert](alert.md)
[assets](assets.md)
[category](category.md)
[category2](category2.md)
[collections-categories](collections-categories.md)
[collections-categories2](collections-categories2.md)
[collections-tags-2](collections-tags-2.md)
[collections-tags](collections-tags.md)
[complex](complex.md)
[dates](dates.md)
[debug-helpers](debug-helpers.md)
[example](example.md)
[gist-helper](gist-helper.md)
[helpers](helpers.md)
[home](home.md)
[html-helpers](html-helpers.md)
[page](page.md)
[nav](nav.md)
[simple3](simple3.md)
[tags_test](tags_test.md)
[tags_test2](tags_test2.md)

@@ -84,24 +127,46 @@

#### category.md
#### collections-categories.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category.md
this.dest: test/actual/multi/dest1/collections-categories.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category.md
this.pagename: category.md
this.basename: category
this.filename: collections-categories.md
this.pagename: collections-categories.md
this.basename: collections-categories
this.extname: .md
this.ext: .md
#### category2.md
#### collections-categories2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category2.md
this.dest: test/actual/multi/dest1/collections-categories2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category2.md
this.pagename: category2.md
this.basename: category2
this.filename: collections-categories2.md
this.pagename: collections-categories2.md
this.basename: collections-categories2
this.extname: .md
this.ext: .md
#### collections-tags-2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags-2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags-2.md
this.pagename: collections-tags-2.md
this.basename: collections-tags-2
this.extname: .md
this.ext: .md
#### collections-tags.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags.md
this.pagename: collections-tags.md
this.basename: collections-tags
this.extname: .md
this.ext: .md
#### complex.md

@@ -118,10 +183,10 @@ this.assets: ../../assets

#### dates.md
#### debug-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/dates.md
this.dest: test/actual/multi/dest1/debug-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: dates.md
this.pagename: dates.md
this.basename: dates
this.filename: debug-helpers.md
this.pagename: debug-helpers.md
this.basename: debug-helpers
this.extname: .md

@@ -141,65 +206,65 @@ this.ext: .md

#### helpers.md
#### gist-helper.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/helpers.md
this.dest: test/actual/multi/dest1/gist-helper.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.filename: gist-helper.md
this.pagename: gist-helper.md
this.basename: gist-helper
this.extname: .md
this.ext: .md
#### page.md
#### helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/page.md
this.dest: test/actual/multi/dest1/helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: page.md
this.pagename: page.md
this.basename: page
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.extname: .md
this.ext: .md
#### nav.md
#### home.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/nav.md
this.dest: test/actual/multi/dest1/home.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: nav.md
this.pagename: nav.md
this.basename: nav
this.filename: home.md
this.pagename: home.md
this.basename: home
this.extname: .md
this.ext: .md
#### simple3.md
#### html-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/simple3.md
this.dest: test/actual/multi/dest1/html-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.filename: html-helpers.md
this.pagename: html-helpers.md
this.basename: html-helpers
this.extname: .md
this.ext: .md
#### tags_test.md
#### page.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test.md
this.dest: test/actual/multi/dest1/page.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test.md
this.pagename: tags_test.md
this.basename: tags_test
this.filename: page.md
this.pagename: page.md
this.basename: page
this.extname: .md
this.ext: .md
#### tags_test2.md
#### simple3.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test2.md
this.dest: test/actual/multi/dest1/simple3.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test2.md
this.pagename: tags_test2.md
this.basename: tags_test2
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.extname: .md

@@ -354,3 +419,25 @@ this.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

@@ -501,59 +588,24 @@

#### 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
<h2>ul</h2>
<ul class="nav"><li>
one
</li>
<li>
two
</li>
<li>
three
</li></ul>
<ul class="nav"><li>
<a href="one">two</a>
</li>
<li>
<a href="three">four</a>
</li>
<li>
<a href="five">size</a>
</li></ul>
<h2>ol</h2>
<ol class="nav"><li>
one
</li>
<li>
two
</li>
<li>
three
</li></ol>
<ol class="nav"><li>
<a href="one">two</a>
</li>
<li>
<a href="three">four</a>
</li>
<li>
<a href="five">size</a>
</li></ol>
<h2>href</h2>
<p><a href="http://gist.github.com/jonschlinkert/5193239">helpers.js</a>
<a href="http://github.com">GitHub</a>
<a href="http://github.com">GitHub</a></p>
<h2>gist</h2>
<script src="https://gist.github.com/5193239.js"></script>
<h2>debug</h2>
# Partials Test
## Content
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li><a href="./index.html">Index</a></li>
<li><a href="dest/context.html">Dest Context</a></li>
<li><a href="dest/basic.html">Dest Basic</a></li>
<li><a href="dest/markdown.html">Dest Markdown</a></li>
</ul>
<ul class="nav pull-right"><li><a href="">Visit Assemble</a></li></ul>
</div>
</div>
</div>
## Debug Info
``` json

@@ -18,3 +37,3 @@ { title: 'Partials Test',

basename: 'page',
src: 'test/files/page.hbs',
src: 'test/templates/pages/page.hbs',
dest: 'test/actual/multi/dest1/page.md',

@@ -41,16 +60,19 @@ assets: '../../assets',

### "{{#each pages}}" Links
[alert](alert.md)
[assets](assets.md)
[category](category.md)
[category2](category2.md)
[collections-categories](collections-categories.md)
[collections-categories2](collections-categories2.md)
[collections-tags-2](collections-tags-2.md)
[collections-tags](collections-tags.md)
[complex](complex.md)
[dates](dates.md)
[debug-helpers](debug-helpers.md)
[example](example.md)
[gist-helper](gist-helper.md)
[helpers](helpers.md)
[home](home.md)
[html-helpers](html-helpers.md)
[page](page.md)
[nav](nav.md)
[simple3](simple3.md)
[tags_test](tags_test.md)
[tags_test2](tags_test2.md)

@@ -83,24 +105,46 @@

#### category.md
#### collections-categories.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category.md
this.dest: test/actual/multi/dest1/collections-categories.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category.md
this.pagename: category.md
this.basename: category
this.filename: collections-categories.md
this.pagename: collections-categories.md
this.basename: collections-categories
this.extname: .md
this.ext: .md
#### category2.md
#### collections-categories2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category2.md
this.dest: test/actual/multi/dest1/collections-categories2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category2.md
this.pagename: category2.md
this.basename: category2
this.filename: collections-categories2.md
this.pagename: collections-categories2.md
this.basename: collections-categories2
this.extname: .md
this.ext: .md
#### collections-tags-2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags-2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags-2.md
this.pagename: collections-tags-2.md
this.basename: collections-tags-2
this.extname: .md
this.ext: .md
#### collections-tags.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags.md
this.pagename: collections-tags.md
this.basename: collections-tags
this.extname: .md
this.ext: .md
#### complex.md

@@ -117,10 +161,10 @@ this.assets: ../../assets

#### dates.md
#### debug-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/dates.md
this.dest: test/actual/multi/dest1/debug-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: dates.md
this.pagename: dates.md
this.basename: dates
this.filename: debug-helpers.md
this.pagename: debug-helpers.md
this.basename: debug-helpers
this.extname: .md

@@ -140,65 +184,65 @@ this.ext: .md

#### helpers.md
#### gist-helper.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/helpers.md
this.dest: test/actual/multi/dest1/gist-helper.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.filename: gist-helper.md
this.pagename: gist-helper.md
this.basename: gist-helper
this.extname: .md
this.ext: .md
#### page.md
#### helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/page.md
this.dest: test/actual/multi/dest1/helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: page.md
this.pagename: page.md
this.basename: page
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.extname: .md
this.ext: .md
#### nav.md
#### home.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/nav.md
this.dest: test/actual/multi/dest1/home.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: nav.md
this.pagename: nav.md
this.basename: nav
this.filename: home.md
this.pagename: home.md
this.basename: home
this.extname: .md
this.ext: .md
#### simple3.md
#### html-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/simple3.md
this.dest: test/actual/multi/dest1/html-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.filename: html-helpers.md
this.pagename: html-helpers.md
this.basename: html-helpers
this.extname: .md
this.ext: .md
#### tags_test.md
#### page.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test.md
this.dest: test/actual/multi/dest1/page.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test.md
this.pagename: tags_test.md
this.basename: tags_test
this.filename: page.md
this.pagename: page.md
this.basename: page
this.extname: .md
this.ext: .md
#### tags_test2.md
#### simple3.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test2.md
this.dest: test/actual/multi/dest1/simple3.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test2.md
this.pagename: tags_test2.md
this.basename: tags_test2
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.extname: .md

@@ -353,3 +397,25 @@ this.ext: .md

#### page.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/page.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: page.md
page.pagename: page.md
page.basename: page
page.extname: .md
page.ext: .md
#### page.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/page.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: page.md
page.pagename: page.md
page.basename: page
page.extname: .md
page.ext: .md
### {{#each pages}} "page" context

@@ -500,18 +566,24 @@

#### page.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/page.md
dirname: test/actual/multi/dest1
filename: page.md
pagename: page.md
basename: page
extname: .md
ext: .md
#### page.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/page.md
dirname: test/actual/multi/dest1
filename: page.md
pagename: page.md
basename: page
extname: .md
ext: .md
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li><a href="./index.html">Index</a></li>
<li><a href="dest/context.html">Dest Context</a></li>
<li><a href="dest/basic.html">Dest Basic</a></li>
<li><a href="dest/markdown.html">Dest Markdown</a></li>
</ul>
<ul class="nav pull-right"><li><a href="">Visit Assemble</a></li></ul>
</div>
</div>
</div>
# simple3.md output
## Content
<span class="alert alert-info">This is an alert</span>
## Debug Info
``` json

@@ -12,3 +19,3 @@ { foo: 'bar',

basename: 'simple3',
src: 'test/files/simple3.hbs',
src: 'test/templates/pages/simple3.hbs',
dest: 'test/actual/multi/dest1/simple3.md',

@@ -28,16 +35,19 @@ assets: '../../assets',

### "{{#each pages}}" Links
[alert](alert.md)
[assets](assets.md)
[category](category.md)
[category2](category2.md)
[collections-categories](collections-categories.md)
[collections-categories2](collections-categories2.md)
[collections-tags-2](collections-tags-2.md)
[collections-tags](collections-tags.md)
[complex](complex.md)
[dates](dates.md)
[debug-helpers](debug-helpers.md)
[example](example.md)
[gist-helper](gist-helper.md)
[helpers](helpers.md)
[home](home.md)
[html-helpers](html-helpers.md)
[page](page.md)
[nav](nav.md)
[simple3](simple3.md)
[tags_test](tags_test.md)
[tags_test2](tags_test2.md)

@@ -70,24 +80,46 @@

#### category.md
#### collections-categories.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category.md
this.dest: test/actual/multi/dest1/collections-categories.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category.md
this.pagename: category.md
this.basename: category
this.filename: collections-categories.md
this.pagename: collections-categories.md
this.basename: collections-categories
this.extname: .md
this.ext: .md
#### category2.md
#### collections-categories2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/category2.md
this.dest: test/actual/multi/dest1/collections-categories2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: category2.md
this.pagename: category2.md
this.basename: category2
this.filename: collections-categories2.md
this.pagename: collections-categories2.md
this.basename: collections-categories2
this.extname: .md
this.ext: .md
#### collections-tags-2.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags-2.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags-2.md
this.pagename: collections-tags-2.md
this.basename: collections-tags-2
this.extname: .md
this.ext: .md
#### collections-tags.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/collections-tags.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: collections-tags.md
this.pagename: collections-tags.md
this.basename: collections-tags
this.extname: .md
this.ext: .md
#### complex.md

@@ -104,10 +136,10 @@ this.assets: ../../assets

#### dates.md
#### debug-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/dates.md
this.dest: test/actual/multi/dest1/debug-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: dates.md
this.pagename: dates.md
this.basename: dates
this.filename: debug-helpers.md
this.pagename: debug-helpers.md
this.basename: debug-helpers
this.extname: .md

@@ -127,65 +159,65 @@ this.ext: .md

#### helpers.md
#### gist-helper.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/helpers.md
this.dest: test/actual/multi/dest1/gist-helper.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.filename: gist-helper.md
this.pagename: gist-helper.md
this.basename: gist-helper
this.extname: .md
this.ext: .md
#### page.md
#### helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/page.md
this.dest: test/actual/multi/dest1/helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: page.md
this.pagename: page.md
this.basename: page
this.filename: helpers.md
this.pagename: helpers.md
this.basename: helpers
this.extname: .md
this.ext: .md
#### nav.md
#### home.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/nav.md
this.dest: test/actual/multi/dest1/home.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: nav.md
this.pagename: nav.md
this.basename: nav
this.filename: home.md
this.pagename: home.md
this.basename: home
this.extname: .md
this.ext: .md
#### simple3.md
#### html-helpers.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/simple3.md
this.dest: test/actual/multi/dest1/html-helpers.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.filename: html-helpers.md
this.pagename: html-helpers.md
this.basename: html-helpers
this.extname: .md
this.ext: .md
#### tags_test.md
#### page.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test.md
this.dest: test/actual/multi/dest1/page.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test.md
this.pagename: tags_test.md
this.basename: tags_test
this.filename: page.md
this.pagename: page.md
this.basename: page
this.extname: .md
this.ext: .md
#### tags_test2.md
#### simple3.md
this.assets: ../../assets
this.dest: test/actual/multi/dest1/tags_test2.md
this.dest: test/actual/multi/dest1/simple3.md
this.absolute:
this.dirname: test/actual/multi/dest1
this.filename: tags_test2.md
this.pagename: tags_test2.md
this.basename: tags_test2
this.filename: simple3.md
this.pagename: simple3.md
this.basename: simple3
this.extname: .md

@@ -340,3 +372,25 @@ this.ext: .md

#### simple3.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/simple3.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: simple3.md
page.pagename: simple3.md
page.basename: simple3
page.extname: .md
page.ext: .md
#### simple3.md
page.assets: ../../assets
page.dest: test/actual/multi/dest1/simple3.md
page.absolute:
page.dirname: test/actual/multi/dest1
page.filename: simple3.md
page.pagename: simple3.md
page.basename: simple3
page.extname: .md
page.ext: .md
### {{#each pages}} "page" context

@@ -487,6 +541,24 @@

#### simple3.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/simple3.md
dirname: test/actual/multi/dest1
filename: simple3.md
pagename: simple3.md
basename: simple3
extname: .md
ext: .md
#### simple3.md
assets: ../../assets
dest:
absolute: test/actual/multi/dest1/simple3.md
dirname: test/actual/multi/dest1
filename: simple3.md
pagename: simple3.md
basename: simple3
extname: .md
ext: .md
<span class="alert alert-info">This is an alert</span>
{
"content": "content from common1.json"
"content": "Congratulations! You have officially wasted time reading example content. But I'm sure it's time well wasted... "
}

@@ -1,2 +0,3 @@

var assembleEngine = require('../lib/engine');
var assembleEngine = require('../lib/engine'),
engineHelpers = require('../lib/engine/helpers'),
expect = require('chai').expect;

@@ -43,2 +44,62 @@

describe('Loading custom helpers', function() {
var runTest = function(engine, done) {
var expected = '<!-- bar -->';
engine.compile("{{{foo 'bar'}}}", null, function(err, tmpl) {
if(err) {
console.log('error: ' + err);
done(false);
}
engine.render(tmpl, {}, function(err, content) {
if(err) {
console.log('error: ' + err);
done(false);
}
expect(content).to.equal(expected);
done();
});
});
};
it('loads a custom helper from a file path', function(done) {
var engine = assembleEngine.load('handlebars');
engine.init({
cwd: __dirname,
helpers: './lib/helpers.js'
});
runTest(engine, done);
});
it('loads a custom helper from a glob pattern', function(done) {
var engine = assembleEngine.load('handlebars');
engine.init({
cwd: __dirname,
helpers: './lib/**/*.js'
});
runTest(engine, done);
});
it('loads a custom helper without needing to set the cwd', function(done) {
var engine = assembleEngine.load('handlebars');
engine.init({helpers: './test/lib/**/*.js'});
var expected = '<!-- foo2 -->\n<!-- bar -->';
engine.compile("{{{foo2 'bar'}}}", null, function(err, tmpl) {
if(err) {
console.log('error: ' + err);
done(false);
}
engine.render(tmpl, {}, function(err, content) {
if(err) {
console.log('error: ' + err);
done(false);
}
expect(content).to.equal(expected);
done();
});
});
});
});
});

@@ -35,3 +35,3 @@ var assembleData = require('../lib/data');

it("read markdown file", function(done) {
var data = assembleData.readMarkdown('./test/files/simple1.md', opts);
var data = assembleData.readMarkdown('./test/templates/pages/simple1.md', opts);
expect(data).to.equal(simpleExpected);

@@ -42,3 +42,3 @@ done();

it("convert markdown file with code highlighting", function(done) {
var data = assembleData.readMarkdown('./test/files/complex1.md', opts);
var data = assembleData.readMarkdown('./test/templates/pages/complex1.md', opts);
//console.log(data);

@@ -45,0 +45,0 @@ //expect(complexExpected).to.deep.equal(data);

@@ -26,3 +26,3 @@ /*global require:true */

it("yaml file starts with --- no content", function(done) {
var data = assembleData.readYFM('./test/files/simple1.yml');
var data = assembleData.readYFM('./test/templates/pages/simple1.yml');
expect(simpleExpected.context).to.deep.equal(data.context);

@@ -33,3 +33,3 @@ done();

it("yaml file starts and ends with --- no content", function(done) {
var data = assembleData.readYFM('./test/files/simple2.yml');
var data = assembleData.readYFM('./test/templates/pages/simple2.yml');
expect(simpleExpected.context).to.deep.equal(data.context);

@@ -40,3 +40,3 @@ done();

it("yaml file starts and ends with --- has content", function(done) {
var data = assembleData.readYFM('./test/files/simple3.hbs');
var data = assembleData.readYFM('./test/templates/pages/simple3.hbs');
expect(simpleExpected.context).to.deep.equal(data.context);

@@ -47,3 +47,3 @@ done();

it("hbs file with complex yaml data and content", function(done) {
var data = assembleData.readYFM("./test/files/complex.hbs");
var data = assembleData.readYFM("./test/templates/pages/complex.hbs");
expect(complexExpected).to.deep.equal(data);

@@ -50,0 +50,0 @@ done();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc