From aa11e2955a08831f1670122f910815c7a1e05575 Mon Sep 17 00:00:00 2001 From: Jonathan Bullock Date: Wed, 22 Dec 2021 21:24:43 +0000 Subject: [PATCH] Fix data files being referenced from Pebble templates. --- .../java/org/jbake/template/model/DataExtractor.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/jbake-core/src/main/java/org/jbake/template/model/DataExtractor.java b/jbake-core/src/main/java/org/jbake/template/model/DataExtractor.java index 2f33ea29..b818825e 100644 --- a/jbake-core/src/main/java/org/jbake/template/model/DataExtractor.java +++ b/jbake-core/src/main/java/org/jbake/template/model/DataExtractor.java @@ -1,23 +1,17 @@ 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; +import static org.jbake.app.configuration.PropertyList.*; public class DataExtractor implements ModelExtractor { @Override public DataFileUtil get(ContentStore db, Map model, String key) { - DocumentList dl = new DocumentList(); Map config = (Map) model.get("config"); - - String defaultDocType = config.get(DATA_FILE_DOCTYPE.getKey()).toString(); + String defaultDocType = config.get(DATA_FILE_DOCTYPE.getKey().replace(".", "_")).toString(); DataFileUtil dataUtil = new DataFileUtil(db, defaultDocType); return dataUtil; }