Skip to content

Commit

Permalink
docs: Update THEMING.MD (#1026)
Browse files Browse the repository at this point in the history
* Docs: Update THEMING.MD

Add instructions to effectively fork the default theme for the purpose of creating and using your own custom theme.

* Docs: Revise THEMING.MD per Pull Request Feedback

Chanted the script line example to use documentation instead of referring to the node_modules bin folder.
  • Loading branch information
TaylorAckley authored and tmcw committed Mar 1, 2018
1 parent b8a7e0d commit 43682b2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/THEMING.md
Expand Up @@ -23,6 +23,16 @@ The theme is free to implement HTML generation however it chooses. See
[the default theme](https://github.com/documentationjs/documentation/tree/master/src/default_theme)
for some ideas.

### Customizing the Default Theme

**Instructions**

- Copy contents of `default_theme` folder (noted above) into a new folder in your project. One way to do it is to create a new git repository with the folder contents and add this line to your `package.json` `devDependencies` section: `"docjs-theme": "my-gh-username/reponame"`. That way when you install dependencies, your new theme will be in the projects `node_modules` folder.

- In the folder you created, replace `require('../')` on lines 10 and 11 of `index.js` with `require('documentation')` and save.

- You can now make changes that will show up when you generate your docs using your theme. Example `package.json` `scripts` entry: `"documentation build index.js -f html -o docs --theme node_modules/docjs-theme"`

### Theming Markdown

The default Markdown generator for documentation.js isn't customizable - instead
Expand Down

0 comments on commit 43682b2

Please sign in to comment.