@bctnry/camus-cli
GitHub repository: https://github.com/CamusMarkup/camus-cli
@bctnry/camus-cli is the official command line utility for Camus. It includes a basic static site generator.
Install & Usage
Install with:
npm install --global @bctnry/camus-cli
Currently the following commands are supported:
camus-cli singleRender [fileName]: process single file into HTML.camus-cli init: generate brand newcamus-cli.jsonfile. This file controls the static site generation.camus-cli run [camusCliJson]: generate the whole site.
Static site generation
@bctnry/camus-cli make uses of Camus's {ref} link. All .cm files reachable from the starting point (specified by the basePath and the main field in camus-cli.json) will be processed.
The structure of camus-cli.json
basePath: string. The base path of all relative path incamus-cli.json. For example, if:- the
camus-cli.jsonfile is in directory/home/usr0/myblog - the value of this field is
blog - the value of the field
mainis 'index.cm'
camus-cliwill start the generation from/home/usr0/myblog/blog/index.cm.- the
main: the starting point.preamble: the preamble.enabled: boolean. Whethercamus-clishould add preamble to generated output.path: string. The relative (tobasePath) path of the preamble file.
postamble: the postamble.enabled: boolean. Whethercamus-clishould add postamble to generated output.path: string. The relative (tobasePath) path of the postamble file.
rss:enabled: boolean. Whethercamus-clishould generate an RSS feed.
sourceHighlight: GNU source-highlight related configurations.enabled: boolean. Whether source-highlight is enabled.command: array of strings. The command used to invoke source-highlight. One can use the variable%lang%to refer to the language part of#{codeblock. For example, if the command field is set to["source-highlight", "-s", "%lang"], thencamus-cliwill execute the commandsource-highlight -s pythonwhen converting a#{code pythonblock.