     line = buffer.lines[activeEditor.getCursorBufferPosition().row]
 
     try
-      data = @scan(line, /site\.data\.(.*?) /g)[0][0].split(" ")[0]
-      atom.workspace.open(path.join(process.jekyllAtom.config.data_dir, data) + ".yml")
+      @ifConfigLoaded (conf) ->
+        data = module.exports.scan(line, /site\.data\.(.*?) /g)[0][0].split(" ")[0]
+        atom.workspace.open(path.join(conf.data_dir, data) + ".yml")
     catch error
-      if error.message == "Cannot read property 'data_dir' of undefined"
-        # Just in case we havent read the config yet.
-        setTimeout(->
-          atom.packages.getActivePackage('jekyll').mainModule.openInclude()
-        ,500 )
-
-      else
-        @showError(error.message)
+      @showError(error.message)
 
   manage: ->
     atom.workspace.open('atom://jekyll')


module.exports =
  jekyllNewPostView: null

  config:
    postsDir:

    line = buffer.lines[activeEditor.getCursorBufferPosition().row]

    try
      @ifConfigLoaded (conf) ->
        include = module.exports.scan(line, /{% include (.*?)%}/g)[0][0].split(" ")[0]
        atom.workspace.open(path.join(process.jekyllAtom.config.includes_dir, include))
    catch error
      @showError(error.message)

  openConfig: ->
    atom.workspace.open("_config.yml")
