npm i -g frost-gen
$ frost --serve
$ frost -- build
To configure frost, by default you use frost.json
as the configuration file in the root of your project.
To overwrite the custom configuration file, you can use --config {file}.json
as a CLI Option, while serving or building the website.
Here is the default schema used by frost
{
"srcDir": "source",
"buildDir": "build",
"staticDir": "static",
"HTMLcompressionLevel": 2
}
srcDir
- It is the source directory of the project where all the templates/pages are stored.
buildDir
- Specifies the export directory on build.
staticDir
- Directory where the static files are stored.
HTMLcompressionLevel
- The amount of compression you want the build to incurr
metadataFile
- The file wher the metadata is stored.
By default the metadata file for frost is frost.metadata.json
, containing all the metadata/variables required in your project.
It can be overwritten using the CLI at anytimes.
Example
Hereโs an example usage:
frost.metadata.json
{
"author": "rhydderchc"
}
index.frost
<body>
<p> The Author is:</p>
<p>
<frost>author</frost>
</p>
</body>
output( on build )
<body>
<p> The Author is:</p>
<p>
rhydderchc
</p>
</body>
Frost has itโs own built-in templating engine, using a html-like syntax with added features.
<p>
<frost markdown> # This is a template </frost>
</p>
Including an external markdown file
<p>
#include "./mark.md"
</p>
Using TypeScript With frostโs engine, using typescript is a piece of cake.
<p>
<frost typescript> let a: string = "Hello World"</frost>
<frost> a </frost>
</p>
<p>
#include "./hello.ts"
</p>
# Extensions