package org.jbake.template.model;

import org.jbake.app.ContentStore;
import org.jbake.app.DocumentList;
import org.jbake.template.ModelExtractor;
import org.jbake.util.DataFileUtil;

import static org.jbake.app.configuration.PropertyList.*;

import java.util.HashMap;
import java.util.Map;

public class DataExtractor implements ModelExtractor<DataFileUtil> {

    @Override
    public DataFileUtil get(ContentStore db, Map model, String key) {
        DocumentList dl = new DocumentList();
        Map<String, Object> config = (Map<String, Object>) model.get("config");

        String defaultDocType = config.get(DATA_FILE_DOCTYPE.getKey()).toString();
        DataFileUtil dataUtil = new DataFileUtil(db, defaultDocType);
        return dataUtil;
    }

}

@@ -67,43 +67,8 @@
 re;%0A
-import org.jbake.app.DocumentList;%0A
 impo
@@ -141,16 +141,37 @@
 leUtil;%0A
+import java.util.Map;
 %0Aimport 
@@ -226,57 +226,8 @@
 *;%0A%0A
-import java.util.HashMap;%0Aimport java.util.Map;%0A%0A
 publ
@@ -380,54 +380,8 @@
 ) %7B%0A
-        DocumentList dl = new DocumentList();%0A
     
@@ -456,17 +456,16 @@
 nfig%22);%0A
-%0A
         
@@ -525,16 +525,34 @@
 getKey()
+.replace(%22.%22, %22_%22)
 ).toStri

Fix data files being referenced from Pebble templates.