0.2.3 • Published 2 months ago

@jaybeeuu/compost v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

compost

npm

A CLI took that compiles markdown files and metadata json into HTML and a manifest of posts.

It makes use of marked and prism, and uses yargs to provide the CLI.

Usage

This package provides a node executable so you can run it from the command line. To see the options available run:

compost --help

options

OptionsDescriptionTypeDefault
--versionShow version numberboolean
-r, --hrefRootThe root path to apply when compiling hrefs (e.g. links).string"/"
-a, --additionalWatchPathsPaths other than --source-dir to watch when in watch mode.array
-u, --includeUnpublishedWhether or not to compile posts not marked as published in their metadata.json file.booleanfalse
-m, --manifestFileNameThe nam of the output JSON manifest file.string"manifest.json"
--codeLineNumbersInclude tags and classes in code blocks that can be styled to show line numbers with the Prism line number styles.booleanfalse
--oldManifestLocatorThe path or URL of the old manifest. If none is given then the output-dir and manifest-file-name options will be used to infer the location. If this option is given and no manifest is found compost will fail.array
-o, --outputDirThe directory into which the compiled files should be written.string"./lib"
--removeH1Indicates whether the process will remove H1 (#) headings. Useful if you will render that with a custom heading in your page.booleanfalse
--requireOldManifestIndicates whether the process will fail if the old manifest is not found.booleanfalse
-s, --sourceDirThe directory containing the source files.string"./src"
-w, --watchWatch the source files and recompile the posts when changes occur.booleanfalse
-h, --helpShow helpboolean