org.jbake.app
Class Renderer

java.lang.Object
  extended by org.jbake.app.Renderer

public class Renderer
extends Object

Render output to a file.

Author:
Jonathan Bullock

Constructor Summary
Renderer(File source, File destination, File templatesPath, org.apache.commons.configuration.CompositeConfiguration config)
          Creates a new instance of Renderer with supplied references to folders.
Renderer(File source, File destination, File templatesPath, org.apache.commons.configuration.CompositeConfiguration config, List<Map<String,Object>> posts, List<Map<String,Object>> pages)
          Creates a new instance of Renderer with supplied references to folders.
 
Method Summary
 void render(Map<String,Object> content)
          Render the supplied content to a file.
 void renderArchive(List<Map<String,Object>> posts, String archiveFile)
          Render an archive file using the supplied content.
 void renderFeed(List<Map<String,Object>> posts, String feedFile)
          Render an XML feed file using the supplied content.
 void renderIndex(List<Map<String,Object>> posts, String indexFile)
          Render an index file using the supplied content.
 void renderTags(Map<String,List<Map<String,Object>>> tags, String tagPath)
          Render tag files using the supplied content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Renderer

public Renderer(File source,
                File destination,
                File templatesPath,
                org.apache.commons.configuration.CompositeConfiguration config)
Creates a new instance of Renderer with supplied references to folders.

Parameters:
source - The source folder
destination - The destination folder
templatesPath - The templates folder

Renderer

public Renderer(File source,
                File destination,
                File templatesPath,
                org.apache.commons.configuration.CompositeConfiguration config,
                List<Map<String,Object>> posts,
                List<Map<String,Object>> pages)
Creates a new instance of Renderer with supplied references to folders.

Parameters:
source - The source folder
destination - The destination folder
templatesPath - The templates folder
posts - The list of posts
pages - The list of pages
Method Detail

render

public void render(Map<String,Object> content)
            throws Exception
Render the supplied content to a file.

Parameters:
content - The content to render
Throws:
Exception

renderIndex

public void renderIndex(List<Map<String,Object>> posts,
                        String indexFile)
Render an index file using the supplied content.

Parameters:
posts - The content to render
indexFile - The name of the output file

renderFeed

public void renderFeed(List<Map<String,Object>> posts,
                       String feedFile)
Render an XML feed file using the supplied content.

Parameters:
posts - The content to render
feedFile - The name of the output file

renderArchive

public void renderArchive(List<Map<String,Object>> posts,
                          String archiveFile)
Render an archive file using the supplied content.

Parameters:
posts - The content to render
archiveFile - The name of the output file

renderTags

public void renderTags(Map<String,List<Map<String,Object>>> tags,
                       String tagPath)
Render tag files using the supplied content.

Parameters:
tags - The content to render
tagPath - The output path


Copyright © 2013. All Rights Reserved.