From 3a8ab80f0672524e8415393ecb181b171584550a Mon Sep 17 00:00:00 2001 From: Taylor Ackley Date: Wed, 28 Feb 2018 15:27:42 -0800 Subject: [PATCH 1/2] Docs: Update THEMING.MD Add instructions to effectively fork the default theme for the purpose of creating and using your own custom theme. --- docs/THEMING.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/THEMING.md b/docs/THEMING.md index 52313f6f5..c18b03abf 100644 --- a/docs/THEMING.md +++ b/docs/THEMING.md @@ -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: `"node_modules/.bin/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 From 6ca00832383d9f3e2de9527f2882333b276634db Mon Sep 17 00:00:00 2001 From: Taylor Ackley Date: Thu, 1 Mar 2018 08:45:59 -0800 Subject: [PATCH 2/2] 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. --- docs/THEMING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/THEMING.md b/docs/THEMING.md index c18b03abf..4069507e8 100644 --- a/docs/THEMING.md +++ b/docs/THEMING.md @@ -31,7 +31,7 @@ for some ideas. - 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: `"node_modules/.bin/documentation build index.js -f html -o docs --theme node_modules/docjs-theme"` +- 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