In package com.eden.orchid.api.compilers

class com.eden.orchid.api.compilers.OrchidCompiler

A generic compiler which can be used by a Theme to transform content. When a Theme is requested to compile a file of a given type, it searches the list of registered Compilers and picks the one with the highest priority that is able to compile the given file type.

Constructors

public <init>(kotlin.Int)

Initialize the OrchidCompiler with a set priority. Compilers with a higher priority are chosen first to process a given input content when multiple Compilers can process the same input extension.

Parameters:
  • priority: Int

Methods

public abstract getOutputExtension(): String

Gets the file extension representing the type of the output content.

Parameters:
  • No parameters
public abstract getSourceExtensions(): Array

Get the list of file extensions this OrchidCompiler is able to process.

Parameters:
  • No parameters
public abstract compile(kotlin.String, kotlin.String, kotlin.collections.MutableMap((kotlin.String, kotlin.Any))): String

Compile content with a particular file extension using the optional provided data.

Parameters:
  • extension: String
  • input: String
  • data: MutableMap