   # Prepare plugins
   mergedPlugins = mergePlugins bundledPlugins, plugins
 
-  # Resolve includes
-  includes = resolveIncludes config, includes, mergePlugins.converters
-
-  liquidOptions =
-    files: includes
-    tags: mergedPlugins.tags
-
-  # Compile layouts
-  compiledLayouts = {}
-  for name, {data, content} of layouts
-    try
-      compiledLayouts[name] = tinyliquid.compile content, liquidOptions
-    catch err
-      callback new Error "Error while compiling layout: #{err.message}"
-      return
-
-  # Run generators
-  async.forEachSeries(
-    mergedPlugins.generators,
-    (generator, cb) -> generator site, cb
-    (err) ->
-      if err then return callback err
-
-      # Filter out any files blanked by generators
-      site.static_files = site.static_files.filter (f) -> !!f
-
-      # Set up state for any custom tags
-      currentState = { site, page: null }
-
-      # Now write all content to disk
-      bundle = { site, config, liquidOptions, compiledLayouts, mergedPlugins }
-      async.series([
-        # Write posts before pages, since pagination, etc depend on
-        # post-conversion HTML
-        (cb) -> writePages site.posts, bundle, cb
-        (cb) -> writePages site.pages, bundle, cb
-        (cb) -> writeFiles bundle, cb
-      ], callback)
-  )
+  convertIncludes includes, mergedPlugins.converters, (err) ->
+    if err then return callback err
+
+    # Resolve includes
+    includes = resolveIncludes config, includes
+
+    liquidOptions =
+      files: includes
+      tags: mergedPlugins.tags
+
+    # Compile layouts
+    compiledLayouts = {}
+    for name, {data, content} of layouts
+      try
+        compiledLayouts[name] = tinyliquid.compile content, liquidOptions
+      catch err
+        callback new Error "Error while compiling layout: #{err.message}"
+        return
+
+    # Run generators
+    async.forEachSeries(
+      mergedPlugins.generators,
+      (generator, cb) -> generator site, cb
+      (err) ->
+        if err then return callback err
+
+        # Filter out any files blanked by generators
+        site.static_files = site.static_files.filter (f) -> !!f
+
+        # Set up state for any custom tags
+        currentState = { site, page: null }
+
+        # Now write all content to disk
+        bundle = { site, config, liquidOptions, compiledLayouts, mergedPlugins }
+        async.series([
+          # Write posts before pages, since pagination, etc depend on
+          # post-conversion HTML
+          (cb) -> writePages site.posts, bundle, cb
+          (cb) -> writePages site.pages, bundle, cb
+          (cb) -> writeFiles bundle, cb
+        ], callback)
+    )
 
 writePages = (pages, bundle, callback) ->
   async.forEachLimit(

    resolved[file] = parsedInclude.code

  resolved

loadLayouts = (config, callback) ->
  log.verbose "generate", "Loooking for layouts in %s", config.layouts

    log.verbose "generate", "Normalized includes: %s", Object.keys(normalized).join ', '
    callback null, normalized

resolveIncludes = (config, includes) ->
  includeDir = path.join config.source, INCLUDE_PATH
  resolved = {}

