markdown-to-html-cli
Version:
Command line tool generates markdown as html.
48 lines (47 loc) • 1.77 kB
TypeScript
import { ParsedArgs } from 'minimist';
import { Options } from 'rehype-document';
import { RehypeRewriteOptions } from 'rehype-rewrite';
export * from './create';
export interface RunArgvs extends Omit<ParsedArgs, '_'> {
version?: string;
source?: string;
output?: string;
/** Add a Github corner to your project page. */
'github-corners'?: string;
/** Github corners style. */
'github-corners-fork'?: boolean;
/** Markdown string. */
markdown?: string;
/** The `<title>` tag is required in HTML documents! */
title?: string;
/** Specify the configuration file. Default: `<process.cwd()>/package.json` */
config?: string;
/** Define a description of your web page */
description?: string;
/** Define keywords for search engines */
keywords?: string;
/** Add a Favicon to your Site */
favicon?: string;
/** Define the author of a page */
author?: string;
}
export interface MDToHTMLOptions extends RunArgvs {
/** [rehype-document](https://github.com/rehypejs/rehype-document#options) options */
document?: Options;
/** Rewrite Element. [rehype-rewrite](https://github.com/jaywcjlove/rehype-rewrite#rewritenode-index-parent-void) */
rewrite?: RehypeRewriteOptions['rewrite'];
/** rewrite URLs of href and src attributes. */
reurls?: Record<string, string>;
/**
* rehype-wrap Options
* Wrap selected elements with a given element
* https://github.com/mrzmmr/rehype-wrap/tree/2402bcdb8ea25bd0948cda72e96d16e65a18c1e9#options
*/
wrap?: {
selector?: string;
wrapper?: string;
};
}
export declare function run(opts?: Omit<RunArgvs, "_">): any;
export declare const cliHelp: string;
export declare const exampleHelp: string;