Mandy

Making a project

Mandy project structure

The only task of Mandy is to take content written in the Extended Jirai format, some HTML templating code, and a configuration file and use this information to produce a directory containing HTML files and other assets, if specified, and make these available and ready to serve as a fully-functional website. This directory with static HTML files and other assets will henceforth be referred to as a compiled Mandy project. The list below contains a list of the types of files in a Mandy project:

The Configuration File

The configuration file is written in the Jirai Data Language and must contain the dist_dir key. The other following keys are optional:

Layout Files

Layout files must be stored in the layouts directory of a Mandy project and these files determine the layout of the content on a page. These files must end in the .layout extension and are HTML templates. The content is rendered through variables inside the template. These template variables are surrounded by { and }. If an item is iterated over, the open curly braces and close curly braces are doubled. The following variables are accessible inside a template:

Content Files

Each content file is written in the Extended Jirai format. This format has two sections. The first section contains data and the second section contains content. The content is written in the Jirai format. format. The data section is written in the same format as the configuration file. Together, they make up Extended Jirai. Each content file must have this format and must end in the .ejirai file extension. The variables that must be set in the data section are listed below and are accessed in a template via the {page.data} variable:

Data Files

Each data file is in the Jirai Data Language format and is located in the data directory at the root of a Mandy project. This directory can be present, but must not be. Every file in this directory must have a top-level key called items and the value of this key must be a list of JMU blocks containing string key-value pairings. The name of each file must have a name of the following pattern: name.jmu. The data in this file can be accessed in layouts by iterating over the variable data.name.items.