index.md
v0.1.18
Published
Flexible CLI that creates HTMLs from your Markdown files.
Maintainers
Readme
index.md
Flexible CLI that creates HTMLs from your Markdown files.


Installation
You can install it from npm.
> npm install -g index.mdUsage
The main command converts and with init it generates a config file.
Run
Convert all the .md files to .html files.
> index.mdIf the command doesn't work for you and your OS treats it as a file instead of an executable, try this:
> index-mdOptions
Here are all the options or configurations for index.md:
versionMust be set, do not edit this.sourceRelative path to read your.mdfiles (default is".").outputRelative path to save your converted.htmlfiles (default is".").templateUse an HTML template for standard web page (default istrue).baseTemplateRelative path to your base HTML template (default isnull).nameAsTitleUse MD file name as HTML title (default isfalse).firstLineAsTitleUse first line of MD file as HTML title (default istrue).cssVariablesCSS3 Theming of default base template.--primary--body-color--body-bg--heading-color--content-bg
extraHeadList of custom HTML head elements.headingsIdAdd IDs to headings.headingsIdSlugifySlugify the heading IDs.
Arguments
Here are all the args or parameters when running index.md command:
initCreates the config file with default values for each option.helpPrints out this README file.versionPrints out the current version.
Custom Base HTML Template
If you don't want the default base HTML template/theme you can make your own. All you need to do is to include certain variables so index.md can use it.
Variables
You need these exact characters in the template, so they work.
<!-- TITLE -->(required)<!-- PAGE -->(required)<!-- EXTRA_HEAD -->(optional)<!-- CSS_VARIABLES -->(optional)
Starter Template
Here's a starter template for you base HTML template:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- EXTRA_HEAD -->
<title><!-- TITLE --></title>
<style>
/* CSS_VARIABLES */
</style>
</head>
<body>
<!-- PAGE -->
</body>
</html>Development
Here are the commands for development:
npm run buildCompile the TS files to JS.npm run startRun theapp.js.npm run lintCheck code quality.
