Dochameleon

- 文档
- 帮助
- 博客

› GitHub上的项目

- 安装指南

- 配置

- 文档

- Assets

- 主页

Dochameleon is aware of GitHub conventions. Follow this steps to quickly create website for your GitHub project.

###
Installation

Just make sure run `dochameleon-init` at your project repo root.

    > cd $path_to_project$
    > dochameleon-init
    > cd website
    > npm run start

###
Configuration

Modify `siteConfig.js` with your project information, particularly:

- projectName

- title

- copyright

- rootUrl

- baseUrl

- icon

- favicon

###
Docs

By default Dochameleon loads docs from `website/docs`. You may copy files over, or just change the config. For example, by GitHub convention it is the `docs` folder under your repo. Add this line to your `website/siteConfig.js`

    docsDir: '../docs'

Caution: Do not set docsDir and buildDir to the same path, since building process would remove and add files.

###
Assets

In case you have assets like images, put them under `docs/assets` folder of your repo. Dochameleon will keep them so the references still work as usual.

###
Home Page

You may want to make README.md as home page instead of the default one.

The library actually has already created a `readme.html` page with your README.md. You may just copy this source code

    cp node_modules/dochameleon/lib/core/pages/readme.js pages/index.js

Now `npm run start`.

← 发布网站 渐进式 →