markdown-to-html-cli
Version:
Command line tool generates markdown as html.
54 lines (53 loc) • 2.08 kB
TypeScript
import { type ParsedArgs } from 'minimist';
import { type Options } from 'rehype-document';
import { type RehypeRewriteOptions } from 'rehype-rewrite';
export * from './create.js';
export * from './utils.js';
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;
/** Show corners. @default true */
'corners'?: boolean;
/** Disable light and dark theme styles button. */
'dark-mode'?: boolean | 'auto';
/** Setting markdown-style light/dark theme. */
'markdown-style-theme'?: 'dark' | 'light';
/** Markdown string. */
markdown?: string;
/** Markdown wrapper style */
'markdown-style'?: 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;
/** Override default styles */
style?: string;
/** @example `(node_modules)` */
ignoreFile?: string;
/** Convert images in HTML to base64. @default `false` */
'img-base64'?: boolean;
}
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>;
}
export declare function run(opts?: Omit<RunArgvs, "_">): any;
export declare const cliHelp: string;
export declare const exampleHelp: string;