Skip to content

Theme API 2.0 #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ lets you run `documentation` as a [Gulp](http://gulpjs.com/) build task.
* [Node API](docs/NODE_API.md): documentation.js's self-generated documentation
* [FAQ](docs/FAQ.md)

* [Theming HTML](docs/THEME_HTML.md): tips for theming documentation output in HTML
* [Theming](docs/THEMING.md): tips for theming documentation output in HTML
* [See also](docs/SEE_ALSO.md): a list of projects similar to documentation.js

## User Guide
Expand Down
20 changes: 0 additions & 20 deletions docs/THEME_HTML.md

This file was deleted.

39 changes: 18 additions & 21 deletions docs/THEMING.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
This assumes you have node.js installed:
Documentation.js supports customizable themes for HTML output. A theme is a Node.js
module that exports a single function with the following signature:

First install dev-documentation:

```
npm install -g [email protected]
```
/**
* @function
* @param {Array<Object>} comments - an array of comments to be output
* @param {Object} options - theme options
* @param {ThemeCallback} callback - see below
*/

Get a JSDoc-documented project to test against:

/**
* @callback ThemeCallback
* @param {?Error} error
* @param {?Array<vinyl.File>} output
*/
```
git clone [email protected]:mapbox/mapbox-gl-js.git
```

Get a checkout of the default style

```
[email protected]:documentationjs/documentation-theme-default.git
```

Now start theming

```
dev-documentation mapbox-gl-js/js/mapbox-gl.js -t ./documentation-theme-default/
```
The theme function should call the callback with either an error, if one occurs,
or an array of [vinyl](https://github.com/gulpjs/vinyl) `File` objects.

If you have [LiveReload](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei) installed, you can enable it and it'll automatically refresh the page when you edit the theme.
The theme is free to implement HTML generation however it chooses. See
[the default theme](https://github.com/documentationjs/documentation-theme-default/)
for some ideas.
134 changes: 0 additions & 134 deletions lib/format_type.js

This file was deleted.

24 changes: 0 additions & 24 deletions lib/get_template.js

This file was deleted.

151 changes: 0 additions & 151 deletions lib/html_helpers.js

This file was deleted.

Loading