Browse files

v6.64.0. Bugfix. Improvement.

- v6.64.0 March 4, 2014
	- Fixed a possible issue with `@include` template helper not working when the `renderPasses` config option changes
	- DocPad will now auto-set the `site.url` template data to the calculated site URL (e.g. `http://localhost:9778`) if it is falsey
		- This allows you do do `environments: development: templateData: site: url: false` inside your DocPad configuration files, to always use the correct site url regardless of environment
  • Loading branch information...
1 parent 01b5bf4 commit 4e2a5631874bf643b8dae75f9b5c2bfe47d9dcc2 @balupton balupton committed Mar 4, 2014
Showing with 9 additions and 4 deletions.
  1. +5 −0 HISTORY.md
  2. +1 −1 package.json
  3. +3 −3 src/lib/docpad.coffee
View
5 HISTORY.md
@@ -1,5 +1,10 @@
# History
+- v6.64.0 March 4, 2014
+ - Fixed a possible issue with `@include` template helper not working when the `renderPasses` config option changes
+ - DocPad will now auto-set the `site.url` template data to the calculated site URL (e.g. `http://localhost:9778`) if it is falsey
+ - This allows you do do `environments: development: templateData: site: url: false` inside your DocPad configuration files, to always use the correct site url regardless of environment
+
- v6.63.8 February 26, 2014
- Fixed "Object #<DocPad> has no method err" (regression since v6.37.7)
View
2 package.json
@@ -1,7 +1,7 @@
{
"title": "DocPad. Streamlined web development.",
"name": "docpad",
- "version": "6.63.8",
+ "version": "6.64.0",
"description": "DocPad is a next generation web architecture that lets you create fast static websites with dynamic abilities and powerful abstractions. Write your website as files on your computer, entries in a database, or even RSS feeds and DocPad will import it, generate & render it, then output a static website for deployment anywhere or a dynamic node website for advanced server-side functionality. Use it as a module or standalone. It's purely awesome. Check it out.",
"homepage": "http://docpad.org",
"installUrl": "http://docpad.org/install",
View
6 src/lib/docpad.coffee
@@ -595,7 +595,6 @@ class DocPad extends EventEmitterGrouped
# Prepare
userTemplateData or= {}
docpad = @
- {renderPasses} = @config
locale = @getLocale()
# Set the initial docpad template data
@@ -678,7 +677,7 @@ class DocPad extends EventEmitterGrouped
file = @getFileAtPath(subRelativePath)
if file
if strict and file.get('rendered') is false
- if renderPasses is 1
+ if docpad.getConfig().renderPasses is 1
docpad.warn util.format(locale.renderedEarlyViaInclude, subRelativePath)
return null
return file.getOutContent()
@@ -687,9 +686,10 @@ class DocPad extends EventEmitterGrouped
throw err
# Fetch our result template data
- templateData = extendr.extend({}, @initialTemplateData, @pluginsTemplateData, @config.templateData, userTemplateData)
+ templateData = extendr.extend({}, @initialTemplateData, @pluginsTemplateData, @getConfig().templateData, userTemplateData)
# Add site data
+ templateData.site.url or= 'http://'+(docpad.getHostname() or 'localhost')+':'+(docpad.getPort())
templateData.site.date or= new Date()
templateData.site.keywords or= []
if typeChecker.isString(templateData.site.keywords)

0 comments on commit 4e2a563

Please sign in to comment.