Package org.jbake.parser
Class YamlEngine
- java.lang.Object
-
- org.jbake.parser.MarkupEngine
-
- org.jbake.parser.YamlEngine
-
- All Implemented Interfaces:
ParserEngine
public class YamlEngine extends MarkupEngine
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringJBAKE_PREFIX
-
Constructor Summary
Constructors Constructor Description YamlEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentModelparse(JBakeConfiguration config, java.io.File file)Parse given file to extract as much infos as possiblevoidprocessBody(ParserContext context)This method implements the contract allowing use of Yaml files as content files.voidprocessHeader(ParserContext context)This method implements the contract allowing use of Yaml files as content files-
Methods inherited from class org.jbake.parser.MarkupEngine
parse, validate
-
-
-
-
Field Detail
-
JBAKE_PREFIX
public static final java.lang.String JBAKE_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public DocumentModel parse(JBakeConfiguration config, java.io.File file)
Description copied from class:MarkupEngineParse given file to extract as much infos as possible- Specified by:
parsein interfaceParserEngine- Overrides:
parsein classMarkupEngine- Parameters:
config- The project configurationfile- file to process- Returns:
- a map containing all infos. Returning null indicates an error, even if an exception would be better.
-
processHeader
public void processHeader(ParserContext context)
This method implements the contract allowing use of Yaml files as content files- Overrides:
processHeaderin classMarkupEngine- Parameters:
context- the parser context
-
processBody
public void processBody(ParserContext context)
This method implements the contract allowing use of Yaml files as content files. As such there is no body for Yaml files so this method just sets an empty String as the body.- Overrides:
processBodyin classMarkupEngine- Parameters:
context- the parser context
-
-