fix
Helius
2022-07-11 249f6a8da667a1cfe019ce9c647492da9562dd1a
src/main/java/com/xcong/farmer/cms/core/template/TemplateConfiguration.java
@@ -2,6 +2,7 @@
import com.xcong.farmer.cms.core.node.PartNode;
import com.xcong.farmer.cms.core.node.Template;
import lombok.extern.slf4j.Slf4j;
import org.jsoup.nodes.Document;
import java.io.File;
@@ -14,12 +15,13 @@
 * @author wzy
 * @date 2022-07-01
 **/
@Slf4j
public class TemplateConfiguration extends Configuration{
    private TemplateLoader templateLoader;
    public TemplateConfiguration(String templatePath, String staticPath, String outputPath) {
        super(templatePath, staticPath, outputPath);
    public TemplateConfiguration(String templatePath, String staticPath, String outputPath, String baseUrl, String staticUrl) {
        super(templatePath, staticPath, outputPath, baseUrl, staticUrl);
    }
    public void templateLoader(TemplateLoader templateLoader) {
@@ -31,9 +33,10 @@
            throw new RuntimeException("TemplateLoader do not able to be null");
        }
        log.info("解析开始执行--#类型:{}#--#模板名称:{}#--#ID:{}#", map.get("templateType"), templateName, map.get("id"));
        this.templateLoader.data(map);
        Template template = template(templateName);
        template.output(this.outputPath);
        template.output(outputPath);
        // 判断是否有分页,有则执行。从第二页开始
        int i = 2;
@@ -41,13 +44,13 @@
            map.put("page", i);
            this.templateLoader.data(map);
            Template pageTemplate = template(templateName);
            pageTemplate.output(this.outputPath);
            pageTemplate.output(outputPath);
            i++;
        }
    }
    public Template template(String templateName) {
        return template(new File(path(this.templatePath) + templateName));
        return template(new File(path(templatePath) + templateName));
    }
    public Template template(File file) {