---
id: guide_site_publishing
title: Site Publishing
sidebar_label: Site Publishing
---

<AUTOGENERATED_TABLE_OF_CONTENTS>

Dochameleon converts Markdown and React source files into static HTML files. Then you put them on any of the web hosting solution, GitHub, Amazon S3, etc.

### Build

```
npm run build
```

Then all HTML files will be generated into `website/build` folder.

### Hosting

Now you may get all of the files inside `website/build` and copy over to web hosting.

#### GitHub Pages

[GitHub Pages](https://pages.github.com/) is a very natural hosting choice for open source projects. To publish to GitHub Pages,

1. Follow steps to create your GitHub Pages. Select "master branch /docs folder" as `Source`
<img src="../img/github_pages.png" width="420px"/>
2. Copy `website/build/{projectName}` folder to your project `/docs` folder.
3. Commit and push your git repo.

That's it!

##### Skip copy step

By default build command generates HTML files into `website/build/{projectName}` folder. You may configure the destination to another place. For example, to GitHub project 'docs' folder so no copy needed before publish.

```
...

const siteConfig = {
  projectName: 'Dochameleon',
  title: 'Dochameleon',
  tagline: 'Open Source Documentation Site Generator',
  copyright: 'Copyright © ' + currentYear + ' Richard Zhang',

  buildDir: '../docs',

...
```

**Caution:** During build Dochameleon will remove files in buildDir. Make sure `../docs` doesn't have files you needed for other purposes.
