Permalink
Browse files

v6.17.1. Improvement.

- v6.17.1 December 4, 2012
	- Updated misc internals to use the new `File::getOutContent` call
  • Loading branch information...
balupton committed Dec 4, 2012
1 parent 938c0fa commit 5c7a829ba09eab758a1c165af43983d9aa104c9e
Showing with 10 additions and 9 deletions.
  1. +3 −0 History.md
  2. +1 −1 package.json
  3. +5 −6 src/lib/docpad.coffee
  4. +1 −2 src/lib/models/file.coffee
View
@@ -1,5 +1,8 @@
## History
- v6.17.1 December 4, 2012
- Updated misc internals to use the new `File::getOutContent` call
- v6.17.0 December 4, 2012
- Cleaned up the way we handle buffers, data, and meta data - more effecient and simpler api
- Updated
View
@@ -1,6 +1,6 @@
{
"name": "docpad",
"version": "6.17.0",
"version": "6.17.1",
"description": "DocPad is a language agnostic document management system. This means you write your website as documents, in whatever language you wish, and DocPad will handle the compiling, templates and layouts for you. For static documents it will generate static files, for dynamic documents it'll re-render them on each request. You can utilise DocPad by itself, or use it as a module your own custom system. It's pretty cool, and well worth checking out. We love it.",
"homepage": "https://github.com/bevry/docpad",
"installUrl": "http://docpad.org/install",
View
@@ -477,11 +477,10 @@ class DocPad extends EventEmitterEnhanced
return docpad.getBlock(name,true)
# Include another file taking in a relative path
# Will return the contentRendered otherwise content
include: (subRelativePath) ->
result = @getFileAtPath(subRelativePath)
if result
return result.get('contentRendered') or result.get('content')
return result.getOutContent()
else
err = new Error(util.format(locale.includeFailed, subRelativePath))
throw err
@@ -2701,7 +2700,7 @@ class DocPad extends EventEmitterEnhanced
action: 'load contextualize render'
args: [opts]
next: (err) ->
result = document.get('contentRendered')
result = document.getOutContent()
return next(err,result,document)
)
@
@@ -2750,7 +2749,7 @@ class DocPad extends EventEmitterEnhanced
action: 'normalize contextualize render'
args: [opts]
next: (err) ->
result = document.get('contentRendered')
result = document.getOutContent()
return next(err,result,document)
)
@
@@ -3063,7 +3062,7 @@ class DocPad extends EventEmitterEnhanced
templateData = balUtil.extend({}, req.templateData or {}, {req,err})
templateData = docpad.getTemplateData(templateData)
document.render {templateData}, (err) ->
content = document.get('contentRendered') or document.get('content') or document.getData()
content = document.getOutContent()
if err
docpad.error(err)
return next(err)
@@ -3073,7 +3072,7 @@ class DocPad extends EventEmitterEnhanced
else
return res.send(content)
else
content = document.get('contentRendered') or document.get('content') or document.getData()
content = document.getOutContent()
if content
if opts.statusCode?
return res.send(opts.statusCode, content)
@@ -211,8 +211,7 @@ class FileModel extends Model
# Get Content
getContent: ->
content = @get('content') or @getBuffer()
return content
return @get('content') or @getBuffer()
# Get Out Content
getOutContent: ->

0 comments on commit 5c7a829

Please sign in to comment.