Skip to content

Commit 43682b2

Browse files
TaylorAckleytmcw
authored andcommitted
docs: Update THEMING.MD (#1026)
* 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.
1 parent b8a7e0d commit 43682b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/THEMING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ The theme is free to implement HTML generation however it chooses. See
2323
[the default theme](https://github.com/documentationjs/documentation/tree/master/src/default_theme)
2424
for some ideas.
2525

26+
### Customizing the Default Theme
27+
28+
**Instructions**
29+
30+
- 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.
31+
32+
- In the folder you created, replace `require('../')` on lines 10 and 11 of `index.js` with `require('documentation')` and save.
33+
34+
- 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"`
35+
2636
### Theming Markdown
2737

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy