-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
var extend = require('../../extend'); | ||
|
||
extend.helper.register('css', function(path){ | ||
return '<link rel="stylesheet" href="' + path + '" type="text/css">'; | ||
if (!Array.isArray) path = [path]; | ||
|
||
var result = []; | ||
|
||
path.forEach(function(item){ | ||
result.push('<link rel="stylesheet" href="' + item + '" type="text/css">'); | ||
}); | ||
|
||
return result.join('\n'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
var extend = require('../../extend'); | ||
|
||
extend.helper.register('js', function(path){ | ||
return '<script type="text/javascript" src="' + path + '"></script>'; | ||
if (!Array.isArray) path = [path]; | ||
|
||
var result = []; | ||
|
||
path.forEach(function(item){ | ||
result.push('<script type="text/javascript" src="' + item + '"></script>'); | ||
}); | ||
|
||
return result.join('\n'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var extend = require('../../extend'), | ||
renderSync = require('../../render').renderSync; | ||
|
||
extend.helper.register('markdown', function(text){ | ||
return renderSync({text: text, engine: 'markdown'}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var extend = require('../../extend'); | ||
|
||
var process_html = function(data) { | ||
return data.text; | ||
}; | ||
|
||
extend.renderer.register('html', 'html', process_html, true); | ||
extend.renderer.register('htm', 'html', process_html, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters