@aaron-cw/markdown-generator 中文文档教程

发布于 6年前 浏览 59 项目主页 更新于 3年前

Markdown Generator

Build Status

从降价文件创建静态站点。

该软件仍在开发中,尚未准备好投入生产。

Github Repository

Installation

npm install markdown-generator --save-dev

API Usage

const markdownGenerator = require('markdown-generator');

markdownGenerator();

Configuration Options

用法:

const markdownGenerator = require('markdown-generator');

const configuration = {

    // The directory where the generator will search for markdown files.
    inputLocation: path.resolve(__dirname, '../documentation'),

    // The directory where html will be output.
    outputLocation: path.resolve(__dirname, '../deploy/docs'),

    // The file to use as the template for rendering html
    templateLocation: path.resolve(__dirname, './templates/index.html'),

    // If true, do not output any files.
    dryrun: false,

    // If true, search will be enabled. If search is disabled, you may want to remove it from the default template.
    enableSearch: true,

    // The title to use for the static site.
    title: 'Default Documentation',    
};

markdownGenerator(configuration);

Markdown Format

markdown 生成器使用 GitHub Flavored Markdown 并使用 marked 进行解析。

备忘单可用:[https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet] Markdown

有一个非标准扩展。 Markdown Generator 能够内嵌代码文件。

这样做:

```javascript?./inline-example.js

\```

它呈现为:


Markdown Generator

Build Status

Creates a static site from markdown files.

This software is still in development and not production ready.

Github Repository

Installation

npm install markdown-generator --save-dev

API Usage

const markdownGenerator = require('markdown-generator');

markdownGenerator();

Configuration Options

Usage:

const markdownGenerator = require('markdown-generator');

const configuration = {

    // The directory where the generator will search for markdown files.
    inputLocation: path.resolve(__dirname, '../documentation'),

    // The directory where html will be output.
    outputLocation: path.resolve(__dirname, '../deploy/docs'),

    // The file to use as the template for rendering html
    templateLocation: path.resolve(__dirname, './templates/index.html'),

    // If true, do not output any files.
    dryrun: false,

    // If true, search will be enabled. If search is disabled, you may want to remove it from the default template.
    enableSearch: true,

    // The title to use for the static site.
    title: 'Default Documentation',    
};

markdownGenerator(configuration);

Markdown Format

markdown generator uses GitHub Flavored Markdown and is parsed with marked.

A cheatsheet is available: [https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet]

There is one non-standard extension to markdown. Markdown Generator has the ability to inclde code files inline.

To do so:

```javascript?./inline-example.js

\```

And it renders as:


    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文